Rostam

A high-performance vector database and sub-microsecond key-value store in a
single Go engine — run it as a standalone server, replicate it across a Raft
cluster, or embed it directly in your binary with no server at all.
At matched recall it serves ~2× the queries of Milvus and pgvector and
~4× Qdrant, with the fastest load in the set (1M × 768d in 282 s) and
the highest recall measured. → How it compares
Three ways to run it, one engine:
| |
|---|
| Standalone server | REST, gRPC and a binary TCP protocol. Talk to it from Python or any language. |
| Replicated cluster | Per-shard Raft, online resharding, backups to S3, RBAC/JWT/mTLS. |
| Embedded library | Import it into a Go binary. No server, no cgo required. |
Agent memory over MCP
rostam-server mcp runs Rostam as an MCP
stdio server, giving Claude Code, Claude Desktop, Cursor, or any MCP client
persistent agent memory and vector-DB tools. No daemon, no cloud account, and
no embedding API key required — memory works out of the box on built-in
BM25, and pointing it at an OpenAI-compatible endpoint upgrades recall to
hybrid dense+BM25.
claude mcp add rostam -- rostam-server mcp
→ MCP server for the full tool
reference, client config snippets, and embedder configuration.
LLM response caching
rostam-server llm-proxy is an OpenAI-compatible caching reverse proxy:
change one line (base_url="http://localhost:8484/v1") and an eligible
repeated chat-completions request — cacheable shape, matching scope, and a
prompt that hits the cache — is answered from a local semantic cache instead
of hitting the upstream API. Exact byte-identical matching works out of the
box with no embedding key; pointing it at an OpenAI-compatible embedder
upgrades it to matching near-duplicate prompts too.
rostam-server llm-proxy
→ LLM caching proxy for
flags, cache-scoping rules, and what's never cached.
RAG in a box
rostam-server rag chunks and indexes your documents, then answers
questions from them with cited sources — no separate vector-store setup or
ingestion pipeline required:
rostam-server rag ingest ./docs
rostam-server rag ask "How does the LLM proxy decide what's cacheable?"
Retrieval works out of the box on BM25 full-text search; pointing it at an
OpenAI-compatible embedder upgrades it to dense+BM25 hybrid fusion by default
(-no-hybrid selects pure dense search). rag query does retrieval alone,
with no LLM required.
→ RAG CLI for flags,
embedded-vs-remote mode, and supported file types.
And two engines, usable together or entirely on their own:
- a vector search engine (
vector/) — HNSW, IVF and Vamana
indexes, SQ8/binary/PQ quantization, hybrid dense+sparse fusion, BM25 full
text, and metadata filtering with an exact filter-first query planner that
does not fall off a recall cliff. Depends on nothing else in the repo.
- a key-value store — an in-process session cache, a replicated store, or a
TCP server, all behind one
Store interface, with server-side custom ops and
sandboxed WASM stored procedures.
Both are built for the latency-sensitive end of the spectrum: reads are
zero-copy and lock-light, the hot paths are allocation-free, and the distance
kernels are hand-vectorized.
Status: Beta. Actively developed and tested (race-clean, benchmarked).
APIs may still change ahead of a 1.0 release.
📚 docs.rostamlabs.com — quickstart, concepts,
guides, and full API references (HTTP, gRPC, Go, Python). The site is built from
the docs/ tree in this repository (mkdocs.yml), so
it can also be read here or served locally.
How it compares
Under VectorDBBench — a neutral,
third-party harness — on Cohere-1M (768d, cosine). Six engines, 27 cases, one
continuous session, with HNSW m=16 / ef_construction=200 / k=100 pinned
identically on every engine and ef swept.