# MenteDB > The Mind Database for AI Agents — a Rust database that pre-digests knowledge for single-pass transformer consumption. ## What is MenteDB? MenteDB is an open-source (Apache 2.0) embedded database purpose-built for AI agent memory. It stores memories with vector embeddings, knowledge graphs, temporal reasoning, and cognitive features like pain signals and contradiction detection. ## Key Features - HNSW vector search + BM25 hybrid retrieval - Knowledge graph with causal edges - Temporal validity (memories expire, get superseded) - Write-time inference (auto-detect contradictions, obsolescence) - Pain signals (learn from mistakes) - Phantom detection (identify knowledge gaps) - Speculative context pre-assembly ## MCP Server Install the MCP server for any AI coding assistant: ``` npx mentedb-mcp@latest setup ``` Supports: GitHub Copilot CLI, Claude Desktop, Cursor, Windsurf, and any MCP-compatible client. ## Action rules Rules about how to perform an action (commit style, PR format) are tagged trigger: (trigger:git-commit, trigger:pr-create) and fetched with recall_for_action (embedded) or the get_action_rules tool (hosted) at the moment the agent performs the action, not by topic similarity. Deterministic tag index lookup, superseded rules excluded, newest first. The Claude Code connector surfaces them automatically through a PreToolUse hook before git commits and PR creation; hooks self update on version change. ## Blog - [Infinite Context Window for AI with Memory](https://mentedb.com/blog/infinite-context-window-for-ai-with-memory): benchmark on four real public agent files, 100 percent rule compliance at 2 to 8 times fewer tokens than the file in context, including a held out file - Blog index: https://mentedb.com/blog - Why your agent keeps repeating facts you already corrected: https://mentedb.com/blog/why-your-agent-keeps-repeating-facts-you-already-corrected Agents repeat facts you already corrected because a raw vector store sees two similar facts and cannot tell which one replaced the other. MenteDB solves this with supersession: the old fact gets a Supersedes edge in the graph and is excluded from recall by belief propagation, so the prompt only sees the current value, with no model call on every write. ## Links - Documentation: https://mentedb.com/docs - MCP Server Guide: https://mentedb.com/mcp - Blog: https://mentedb.com/blog - vs mem0 benchmark: https://mentedb.com/compare/mem0 - GitHub: https://github.com/nambok/mentedb - Dashboard: https://app.mentedb.com - Crates.io: https://crates.io/crates/mentedb - npm: https://www.npmjs.com/package/mentedb-mcp