Skip to content

Latin nidus, a nest

A nest for your vectors and memory.

Remember text, recall the relevant bits. A small, pure-Rust memory that embeds for you — or takes the vectors you already have — and answers by similarity from a single directory.

cargo add nidus

nidus (Latin, “nest”) is two things in one small, pure-Rust package. It’s a vector store — the storage-and-search core you build semantic search, code indexing, RAG, and agent memory on — and an all-in-one memory layered on top that embeds text for you, so you can remember natural language and recall the relevant bits. Bring your own vectors, or let nidus make them. Not a database, no SQL, no query engine — sized for development and small-scale use.

// Text in — nidus embeds it for you.
memory.remember(
"notes", "login",
"Users sign in with a bearer token.",
attrs, RememberMode::Raw,
).await?;
// Relevant text out — ranked by similarity.
let hits = memory.recall("notes", "how do users sign in?", &RecallOpts {
top_k: 5,
..Default::default()
}).await?;

Why it exists

Remember text, recall the relevant bits

Hand nidus natural language and it embeds it for you — optionally summarizing first — with the provider you choose: Voyage, OpenAI, Ollama, Cohere, Gemini, Mistral, Jina, or any OpenAI-compatible endpoint. Already have vectors? The raw API is untouched — bring your own. The memory layer is opt-in and off by default, so the core stays lean.

Search by similarity, filter as you go

Hand nidus a query and get the closest records back, ranked with scores — exact by default (100% recall at the scale it targets) by cosine, dot, or Euclidean, or an approximate index (HNSW/IVF) and int8/binary quantization when you want more speed. Store typed metadata beside every vector and narrow results before they score: equality, ranges, globs, sets, negation.

One directory, crash-safe

A whole store is a single append-only directory, fsync’d per batch and CRC-checked. A crash loses at most the in-flight write, and a torn tail repairs itself the moment you reopen — nothing to back up but a folder.

From a folder to the cloud

Start against a local directory, then move the same store to S3, GCS, or Redis/Valkey by changing one URL — no migration, no rewrite. Begin on a laptop and grow into the cloud when you need to.

Where to next