A Rust database that pre digests knowledge for single pass transformer consumption. Not a wrapper. A ground up storage engine that thinks.
AI has a memory problem
Current AI systems consume context in a single pass with no ability to revisit, reflect, or recognize what they are missing.
AI gets a single context window. No re-reading, no follow ups. Every token must count.
AI can't sense what it doesn't know. It can't feel uncertainty or detect its own knowledge gaps.
AI reads linearly but attends associatively. Raw text dumps waste compute on noise.
Your agent.md has limits
Static instruction files work for small projects. But as context grows, decisions accumulate, and you work across devices, you need something that actively manages knowledge for you.
Your AI reads every conversation and decides what is worth remembering. Facts, preferences, decisions, and corrections are stored without you lifting a finger.
"What did we decide about auth?" works via embeddings, not string matching. MenteDB finds relevant memories even when you use different words.
If you said Postgres last month and MySQL this month, MenteDB flags the inconsistency. A static file cannot detect when your decisions change.
Past mistakes surface automatically when you are about to repeat them. Anti-patterns you recorded are matched against your current context.
Your laptop and desktop share the same brain. Cloud mode means every device sees every memory instantly.
An agent.md works until it is too big for the context window. MenteDB stores thousands of memories and retrieves only the relevant ones via vector search.
A cognitive engine, not just storage
Fifteen core systems that transform MenteDB from a database into an active participant in your AI's reasoning.
Background pipeline extracts semantic facts, links entities, detects communities, and builds user profiles from raw conversations. Like the brain consolidating memories during sleep.
Continuous memory ingestion with real time belief updates as conversations unfold.
Automatically derives new knowledge from stored memories at write time, not query time.
Maps conversation paths through topic space to predict where dialogue is heading.
Detects knowledge gaps and creates placeholder memories so the AI knows what it does not know.
Prevents contradictory memories from polluting context by isolating conflicting beliefs.
Records negative feedback and emotional triggers to prevent the AI from repeating mistakes.
Predicts upcoming queries and pre builds context windows, like branch prediction for knowledge.
Memories carry valid_from/valid_until timestamps. Temporal invalidation instead of deletion, with point-in-time queries.
LLM judges whether new memories invalidate, update, or are compatible with existing ones. 100% accuracy on 62 test cases.
BM25 + HNSW vector + RRF fusion for best-of-both-worlds retrieval. Keyword precision meets semantic understanding.
Connect via Streamable HTTP MCP in seconds. Give ChatGPT, Cursor, or Copilot persistent memory with one URL.
Rust, Python, and TypeScript bindings with native performance. pip install, npm install, or cargo add and start building.
Create, revoke, and monitor API keys from the dashboard. Scoped access control for teams and production deployments.
Get real-time notifications when memories change. HMAC-signed payloads with delivery logs, status tracking, and automatic retries.
The difference memory makes
Same user. Same question. Completely different experience.
Deploy to production
Running deploy script...
✗ Deploy failed — wrong AWS region
I told you LAST WEEK it's us-west-2!
Sorry, I don't have context from previous sessions.
🤦 This is the THIRD time...
Deploy to production
Deploying to us-west-2 (your production account)...
✓ Deploy successful
Simple by design
One call per conversation turn. MenteDB handles extraction, storage, retrieval, contradiction detection, and background enrichment automatically.
use mentedb::MenteDb;use mentedb::process_turn::{ProcessTurnInput, DeltaTracker};let db = MenteDb::open("./agent-memory")?;let mut delta = DeltaTracker::default();let result = db.process_turn(&ProcessTurnInput {user_message: "I switched from Postgres to SQLite".into(),assistant_response: Some("Got it!".into()),turn_id: 0,project_context: None,agent_id: None,}, &mut delta)?;// result.context — memories ready for your prompt// result.facts_extracted — what was learned// result.contradiction_count — conflicts detected// Sleeptime enrichment runs automatically in the background:// → semantic facts extracted from conversations// → entities linked and deduplicated// → community summaries generated// → user profile built and updated
Six layers, one engine
A purpose built stack where every layer is designed for AI memory, from storage pages to cognitive processing.
MenteDB ships a production MCP server with 32 tools across 6 categories. Connect Claude, Cursor, ChatGPT, or any MCP client in seconds — locally via stdio or remotely via Streamable HTTP.
Cloud endpoint: https://api.mentedb.com/mcp
process_turnstoresearchrecallgetforgetforget_allprocess_turn also triggers sleeptime enrichment when an LLM provider is configured
search_textsearch_vectorsearch_by_tagrelateget_relatedfind_pathget_subgraphfind_contradictionspropagate_beliefconsolidateapply_decaycompressevaluate_archivalextract_factsgdpr_forgetrecord_paindetect_phantomsresolve_phantomrecord_trajectorypredict_topicsdetect_interferencecheck_streamwrite_inferenceregister_entityget_cognitive_state$ npx mentedb-mcp@latest setup copilot # also: claude, cursor, vscode
$ npx mentedb-mcp@latest login
Local mode: Works with any MCP-compatible client via stdio: Claude Desktop, Cursor, Copilot CLI, VS Code, Windsurf, custom agents.
Cloud mode: Connect via Streamable HTTP MCP at https://api.mentedb.com/mcp — works with ChatGPT, remote clients, and any environment that supports HTTP MCP.
Simple, transparent pricing
Start free. Upgrade when you need more.
Get started with persistent memory for your AI agents.
For power users and teams who need more capacity.
0.29ms
Avg Insert
<1ms
Context Assembly at 10K
2.3x
Fewer Tokens (Compact)
~80%
Delta Savings (20 turns)
0%
Stale Beliefs Returned
Measured, not promised
Every claim backed by reproducible tests. Quality validated on every commit, performance measured with Criterion.
7/7 passing
Superseded memories correctly excluded via graph edges
90.7% reduction in memory retrieval tokens over 20 turns
100 turns, 3 projects, 0% stale returns, 0.29ms insert
U-curve ordering maintains 100% LLM compliance
100% useful memories vs 80% naive (+20pp improvement)
100% correct on stale beliefs, 4.8x faster than brute-force scan
10,000 memories, 6/6 belief changes tracked, 0 stale returns
Measured across memory counts
| Benchmark | 100 | 1,000 | 10,000 |
|---|---|---|---|
| Insert | 13ms | 244ms | 2.65s |
| Context Assembly | 217us | 342us | 693us |
Same 25 memories, different formats
| Format | Tokens | vs Raw JSON |
|---|---|---|
| Raw JSON | 947 | — |
| Structured | 576 | 1.6x fewer |
| Compact | 414 | 2.3x fewer |
~80%
Delta savings over 20 turns
30%+
More memories per budget
One command. Persistent memory.
Works with Claude, Copilot, Cursor, VS Code, ChatGPT, and any MCP client.
Or connect via HTTP: https://api.mentedb.com/mcp