QuiraQuira
v2.2.0 is now available

Build RAG that
actually performs.

A Python framework for retrieval-augmented generation. Speculative Retrieval eliminates latency. Context Tetris maximizes every token.

~pip install quira
85%
Lower latency
2.6×
Denser context
40%
Fewer tokens

Speculative Retrieval

Why wait for the LLM to finish thinking? Quira predicts the required context and pre-fetches it asynchronously. Built-in Lexical Intent Debouncing ensures we only query your database when intent changes, eliminating latency without exploding API costs.

Read how it works
Prefetching complete (12ms)
CHUNK_A98%
CHUNK_B92%
Context Window4,096 / 4,096

Context Tetris

Language models have strict context window limits. Instead of blindly passing the top-K retrieved chunks, Quira employs a dynamic scoring algorithm to pack the most valuable chunks into your remaining token budget based on relevance, recency, diversity, and density.

Explore the algorithm

Differential Retrieval

In a multi-turn chat session, standard frameworks continuously re-fetch the same documents from the database. Quira maintains state on the server and only fetches the delta from the vector database, slashing redundant retrieval latency and API costs.

Learn about deltas
Old State (2,400 tokens)
Delta Update (+120 tokens)

How Quira Works

A streamlined, high-performance RAG pipeline designed from the ground up for minimal latency.

Query
Quira Pipeline
Speculative
Tetris
Processing
LLM

Performance at Scale

Real-world metrics demonstrating the impact of Speculative Retrieval and Context Tetris.

Latency
1.2s
Standard
0.18s
Quira
85% reduction in time-to-first-token
Token Usage
8k
Standard
4.8k
Quira
40% fewer tokens per request

Quickstart

Production-ready in minutes

Initialize a pipeline, pick your providers, and integrate directly with LangChain or LlamaIndex. No boilerplate, no configuration hell.

  • pip install quira
  • Drop-in LangChain retriever
  • Automated vector packing
  • Streaming first-class citizen
main.py
from quira import quiraPipeline, UserSession
from quira.integrations import QuiraRetriever
pipeline = quiraPipeline(
vector_store="qdrant",
cache="redis",
llm="openai/gpt-4o"
)
# 100% LangChain compatible
retriever = QuiraRetriever(pipeline=pipeline)
docs = retriever.invoke("What is Context Tetris?")
# Full pipeline with streaming
session = UserSession("user_123")
async for chunk in pipeline.process_submission_stream(
session, "What is quantum mechanics?"
):
print(chunk, end="", flush=True)

The people behind Quira

Every developer who has shipped code, docs, or fixes — pulled live from GitHub. Thank you. ♥

08 — Changelog

Shipping, in the open.

We constantly iterate to make Quira faster, leaner, and more powerful. Here are the latest updates to the framework.

v1.0.0July 25, 2026

Enterprise Edition & Session Store

Added RedisSessionStore for horizontal scaling and native observability with OpenTelemetry and LangSmith.

v0.2.2June 22, 2026

Streaming Output & Multi-Format Ingestion

Added process_submission_stream and extended DocumentIngestor to natively parse .html, .docx, and .md.

v0.2.1June 15, 2026

Provider Abstraction Layer

Initial implementation of PAL supporting Qdrant, Pinecone, Chroma, OpenAI, Anthropic, and Groq.

Frequently Asked Questions

Everything you need to know about the product and billing.

No. Quira works out-of-the-box with your existing vector databases (Qdrant, Pinecone, Chroma, etc.). It acts as a lightweight wrapper that orchestrates the Speculative Retrieval layer on top of your current infrastructure.

Ready to ship faster?

Quira is open-source, MIT-licensed, and designed for teams that care about performance. Start building today.