AgentDB MCP
AgentDB keeps agent memory in an .rvf file and, with 41 MCP tools, recalls past solutions while learning from feedback
- 97 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Stores agent memories in local files and gives write and delete tools, so a bad write skews future answers
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/agentdbDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Stores agent memories in local files and gives write and delete tools, so a bad write skews future answers
This is third-party code. Review the repository files before installing.
What it does
AgentDB is vector memory for agents that improves search from feedback. Vectors, indexes, learning state and a cryptographic audit trail sit in one `.rvf` file, and the engine runs in Node, the browser and edge runtimes, including offline. The agent records which search results proved useful (`recordFeedback`), and a Thompson Sampling bandit tunes ranking, the RL algorithm choice and the compression tier. The author claims search quality gains of up to 36% from feedback alone. Memory follows six patterns: episodic replay (Reflexion), a skill library, causal reasoning, hierarchical context (working, short and long), semantic clustering and working memory. Search is hybrid: BM25 and dense vectors fused by rank fusion, with a graph layer that takes Cypher queries. There are three ways to use it: the `npm install agentdb` library, the `npx agentdb` CLI or the MCP server `claude mcp add agentdb -- npx agentdb@latest mcp start`. The MCP server registers 41 tools: `agentdb_pattern_store`, `agentdb_pattern_search`, `agentdb_hierarchical_store`, `agentdb_causal_edge`, `agentdb_skill_library`, `agentdb_reflexion` and others. Node.js 20.9 or newer is required.
Who it is for. Agent developers on Claude Code, Cursor or Cline who need long memory across sessions without an external database or keys.
Good fit when
- The agent should recall past successful solutions by the meaning of a query, so the exact word is optional
- You need a skill library and failure reviews as Reflexion records the agent rereads itself
- Memory should live in one file and work offline, in a browser or at the edge
- You want memories linked by causal edges and searched with graph queries
Not a fit when
- You need a ready cloud database with a console: AgentDB embeds as a library or runs locally
- Node is older than 20.9: Node 18 is no longer supported
- A plain notes file is enough for the agent: forty-one tools are overkill
Example request
Store the successful database migration pattern in AgentDB with a score of 0.9 and, on the next migration, first search for similar past solutionsMCP
- Transport
- stdio
- Authentication
- not required
Environment variables
AGENTDB_INJECTION_GUARD- Screening of stored memories for prompt injection: warn or block
Limitations
- Node.js 20.9.0 or newer is required. Node 18 is no longer supported.
- The search quality gain of up to 36% and the 150x speed over SQLite are the author's own figures, and results on your data may differ.
- Embeddings need your own model: any vectors of the right dimension (384 in the example) work, and local Transformers embeddings need extra dependencies.
- Prompt-injection screening of stored memories is opt-in through `AGENTDB_INJECTION_GUARD` (`warn` or `block`).
How to disable. Remove the `agentdb` block from MCP settings with `claude mcp remove agentdb`. The `.rvf` and `agentdb.db` files hold the memory: delete them by hand if you no longer need it.
FAQ
How do I connect AgentDB to Claude Code?
Run `claude mcp add agentdb -- npx agentdb@latest mcp start`. It registers 41 MCP tools and needs Node.js 20.9 or newer. In Cursor and Cline add the same launch to the MCP settings.
How is it different from a regular vector database?
It watches which results the agent actually used: `recordFeedback` passes a score and a bandit retunes ranking. Memory holds episodes, skills, causal links and hierarchy, and storage is a single `.rvf` file.
What do the pattern, hierarchical and causal tools do?
`agentdb_pattern_store` and `agentdb_pattern_search` save and look up successful solutions, `agentdb_hierarchical_store` and `agentdb_hierarchical_recall` work with tiered memory (working, short, long) and `agentdb_causal_edge` links memories with causal edges.
Do I need API keys or an external database?
No: the README describes single-file storage with no servers or API keys. Embeddings come from your own model, and vectors of the right dimension are accepted from any.
How can I try it without installing?
Run `npx agentdb init`, then `npx agentdb reflexion store "session-1" "implement_auth" 0.95 true "Used OAuth2 with PKCE"` and `npx agentdb reflexion retrieve "authentication" --k 5`. The `agentdb.db` file appears in the current folder.
Discussion
No questions or reviews yet.
Related
MCP serversA local MCP memory server for coding agents: decisions, errors and facts stay on your machine, with semantic and graph recall
Agent memory in Rust: forgets the unimportant, merges similar items, flags contradictions, runs locally, over HTTP and via MCP.
Local persistent memory for coding agents: hooks record every session, and Claude Code, Codex or Cursor recall past decisions through 54 MCP tools
Local project memory for agents: constraints, decisions and lessons live in an evidence-backed tree and return before a task.
A long-term memory MCP server for AI agents: facts fade along a forgetting curve and related records are compressed into a summary
A long-term memory MCP server for agents: search, store and correct facts across sessions in the cloud or a local core
README in short
The README opens with the pitch of vector memory that gets smarter with use, shows three lines of code for self-learning search and a table of three usage routes (library, CLI, MCP). It then describes capabilities (self-learning, six memory types, nine RL algorithms, hybrid search, a graph), a table of 41 MCP tools, injection-guard notes and benchmarks.