mnemo
MCP-native memory database for AI agents. Rust core. 4 primitives.
Embedded memory database built in Rust, exposed natively over MCP. Four primitives — REMEMBER, RECALL, FORGET, SHARE. Hybrid vector + keyword search via RRF, AES-256-GCM at rest, cognitive forgetting, branching / replay, RBAC. DuckDB or PostgreSQL backends. SDKs for Python, TypeScript, Go.
The 4 primitives
Built to expose to LLM agents directly as MCP tools. Each primitive is a single MCP call — no orchestration layer required.
REMEMBERPersist a memory chunk with optional metadata, TTL, and tenancy. Indexed by hybrid (vector + BM25) search via RRF fusion.
RECALLQuery memories by semantic similarity OR exact-match keywords. Returns ranked + scored results. Sub-millisecond on the DuckDB backend.
FORGETCognitive-forgetting model — memories decay on a configurable curve unless reinforced by access. Or hard-delete by ID for compliance.
SHARECross-tenant memory sharing with explicit grants. RBAC-aware. Tracks provenance so an agent always knows where a memory came from.
Architecture pillars
Hybrid search (RRF)
Vector embeddings + BM25 keyword index, fused via Reciprocal Rank Fusion. Beats either signal alone on real-world agent recall tasks.
AES-256-GCM at rest
Memory chunks encrypted with authenticated AEAD. Per-tenant keys. Compliance teams can ship mnemo to regulated production environments without a custom encryption layer.
Cognitive forgetting
Configurable decay curve — recently-accessed memories stay sharp, unused memories fade. Closer to how human agents work than naïve TTL eviction.
Backends
DuckDB
Embedded zero-config backend. Local-first, single-binary deploys. Default for development.
PostgreSQL
pgvector + GIN indexes for hybrid search. Multi-tenant production deploys. RDS / Supabase / Neon all supported.
SDKs
Thin language bindings over the Rust core. All four primitives available in every SDK. Same wire format — switch languages without re-indexing.
Try it
Apache-2.0. Single-binary release for the DuckDB backend. PostgreSQL schema migrations included.
Star on GitHub