# agentdb [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/ruvnet/agentdb  
**GitHub Stars:** 110  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agentdb

## Description
Vector memory that gets smarter every time your agent uses it.

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What agentdb does

agentdb provides persistent vector memory for agents through the Model Context Protocol. Its MCP interface exposes 41 tools over the same engine available through the npm package and command-line interface. The tool set includes pattern storage and search, hierarchical memory, causal edges, a skill library, reflexion records, and deletion.

Memory is stored in a single `.rvf` cognitive container that can hold vectors, indexes, learning state, and an audit trail. The package is designed for local and offline use, with support for Node.js, browser environments, and edge runtimes. The MCP setup uses the `agentdb` command through `npx`.

## How it works

AgentDB performs vector retrieval with HNSW indexes and can combine dense vector results with BM25 keyword matches through Reciprocal Rank Fusion. An agent can report whether a retrieved result was useful by recording feedback. A Thompson Sampling bandit then adjusts ranking, reinforcement-learning selection, and compression choices based on that signal.

The memory model includes several patterns for agent state: episodic replay through Reflexion, reusable skills, causal reasoning, hierarchical context, semantic clustering, and working memory. Graph-oriented features include Cypher queries, causal relationships, hyperedges, and graph attention capabilities.

The underlying RuVector engine is accessed through Rust and NAPI bindings. Optional native packages can accelerate graph transformation, min-cut processing, and binary quantization; JavaScript fallbacks are available for the listed optional integrations.

## Setup and configuration

Node.js 20.9.0 or newer is required. Register the MCP process with Claude Code using:

```bash
claude mcp add agentdb -- npx agentdb@latest mcp start
```

This starts the server through `npx` and makes the MCP tools available to the client. The underlying library can also be installed with `npm install agentdb`, while `npx agentdb init` creates a local database for command-line use.

AgentDB can use local storage without API keys or a separate database service. The optional `aidefence` integration adds prompt-injection screening for stored memories; its behavior is controlled with `AGENTDB_INJECTION_GUARD=warn` or `AGENTDB_INJECTION_GUARD=block`.

## Tools and capabilities

The MCP tool collection covers:

- Pattern storage and semantic search
- Hierarchical memory storage and recall
- Reflexion memory recording and retrieval
- Skill-library operations
- Causal-edge creation and graph-oriented memory
- Vector and hybrid keyword search
- Feedback recording for self-learning retrieval
- Memory deletion

The storage format supports quantization options including PQ8, PQ4, and binary quantization. AgentDB also advertises JWT authentication, API-key rotation, Argon2id hashing, audit trails, and a cryptographic witness chain for deployments that need these controls.

## Limitations and notes

The server requires Node.js 20.9.0 or newer; Node.js 18 is no longer supported. Search quality improvements depend on the agent providing useful feedback after retrieval. Optional native integrations are not required, but their accelerated paths depend on additional packages. The MCP interface is intended for clients that can launch the standard `npx agentdb@latest mcp start` process.

_Full upstream README: https://allmcps.com/mcp/agentdb/readme_

