One engine for vector, text, filter & graph.
corvid is an embedded, in-process Rust data store for AI applications. Vector search, full-text search, metadata filtering, graph traversal, and rank fusion compose into a single transactionally consistent builder call β no glue, no reconciliation, no separate services.
An honest note. corvid is a personal experiment, and it was entirely vibe coded β built by directing an AI coding agent, not hand-written line by line. It is not a product, has no roadmap, and comes with no support promises.
It is also not a toy. The code is solid and genuinely usable: ~390 tests, >90% line coverage, zero-warning clippy, criterion benchmarks on the hot paths, and a correctness-first design β filters are true predicates, indexes are never stale, writes are transactional. If a corner is rough, it's a missing feature, not a broken one.
Why it exists
AI apps usually bolt together a vector database, a full-text engine, and a metadata store, then reconcile them in application code. corvid puts them behind one embedded engine and one query builder. The filter runs before ranking, so the top-k is computed among matching documents β a true predicate, never a post-hoc trim.
Vector search
Cosine / dot / L2. Exact brute-force baseline, or HNSW β in-memory and on-disk β used transparently once indexed.
Full-text (BM25)
Inverted index with positions for phrase search. Stop-word removal and a conservative stemmer, shared by index and query.
Filters as predicates
eq / range / in / between / starts_with / contains, and/or/not, dotted paths. Pushed down before ranking.
Fusion & rerank
Reciprocal Rank Fusion across sources, MMR diversification β first-class operators in the builder.
Property graph
Directed edges over document keys: link / neighbors / in-neighbors / multi-hop traverse, atomic with the write.
Geospatial
Haversine radius, bounding box, and k-nearest β with an on-disk grid index for sub-linear queries.
On-disk indexes
HNSW, inverted text, scalar/compound, and geo state stored as ordinary records: bounded memory, no rebuild on open.
Quantization
Binary (~32Γ) and scalar (~4Γ) vector compression, plus product quantization on the on-disk index.
Transactional
redb-backed, single-writer MVCC. Every secondary index reflects the same committed state β the core invariant.
Schema, TTL, reactive
Optional declared schema, per-record expiry, in-process change feeds, and a vector-keyed semantic cache.
MCP sidecar
corvid-mcp exposes the engine to agentic tools over MCP (JSON-RPC on stdio) as 27 tools.
Pure, portable Rust
#![forbid(unsafe_code)]. Builds for desktop, server, mobile (aarch64), and WASM (β0.2 MB gzipped).
Get started
Add it as a git dependency (corvid targets stable Rust, 2024 edition). Then open a database and start a collection.
# Cargo.toml
corvid = { git = "https://github.com/i-rocky/corvid" }
Or run the MCP sidecar and point an agentic client at it:
cargo run -p corvid-mcp -- app.corvid # omit the path for in-memory