BrainDB skill
BrainDB keeps agent memory in PostgreSQL: entities, relations, search and rules, with two skills wiring it to Claude Code.
- 116 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- Entity text is sent to the model provider chosen for the built-in agent.
- The service stores durable data and runs Docker containers on the machine.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/braindbDetects 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.
- Entity text is sent to the model provider chosen for the built-in agent.
- The service stores durable data and runs Docker containers on the machine.
This is third-party code. Review the repository files before installing.
What it does
BrainDB is a memory database with a REST API for AI agents. It stores five entity types, thoughts, facts, sources, documents and rules, linked by `supports`, `contradicts`, `elaborates`, `derived_from` and `similar_to` relations. Search combines fuzzy and semantic (pgvector) matching, graph traversal runs up to three hops, unused items lose weight over time, and rules marked `always_on` enter every context. Two Claude Code skills ship in the repository. `skills/braindb/SKILL.md` makes direct curl calls and gives full control, while `skills/braindb-agent/SKILL.md` sends a natural-language request to `POST /agent/query`, where a built-in agent handles it. The service runs in Docker Compose with a file watcher and a wiki scheduler.
Who it is for. Developers who want durable structured agent memory on their own PostgreSQL instead of scattered markdown files.
Good fit when
- Claude Code must remember decisions and facts between sessions.
- A note base grows into a wiki and file search no longer copes.
- Contradicting statements need explicit links and a certainty score.
- A team wants a set of behavioural rules injected into every context.
Not a fit when
- You need one short note: a project memory file is enough.
- Docker cannot run on the machine.
- Data must not go to external model providers.
Example request
Recall what I decided about the database schema in earlier sessions and save a new fact with a certainty score.Limitations
Needs Docker Desktop or Docker Engine with Compose 2.20 or newer, plus the PostgreSQL extensions `pg_trgm` and `pgvector` (already included in the bundled database). The built-in agent calls an OpenAI-compatible API: DeepInfra is the recommended default, with NIM, Ollama, LM Studio and local vLLM possible, so entity text goes to the chosen provider. The skills do not edit `settings.json` but can run `docker compose up -d` themselves when the database is down. The project is young and the API may still change.
How to disable. Delete `~/.claude/skills/braindb` and `~/.claude/skills/braindb-agent`, then stop the stack with `docker compose down`. The `braindb_pgdata` volume with data is removed separately.
FAQ
Which skill should I pick?
`braindb` gives full control through curl but uses more context. `braindb-agent` hands the request to the built-in agent and keeps the conversation cleaner.
Do I need my own PostgreSQL?
No. The bundled database starts with the stack when `COMPOSE_PROFILES=internal-db` is set. For your own database remove that line and set `DATABASE_URL`.
How is it different from plain RAG?
RAG retrieves similar chunks every time. BrainDB keeps named entities with relations, weight and decay, and search returns a ranked neighbourhood graph.
How do I reset to an empty database?
Run `docker rm -f braindb_db && docker volume rm braindb_pgdata`. This wipes all data in the bundled database.
Which models does the built-in agent support?
Any OpenAI-compatible backend: DeepInfra is recommended, with NIM, Ollama, LM Studio and vLLM on your own GPU possible.
Discussion
No questions or reviews yet.
Related
SkillsGBrain stores sourced facts, searches them and gives Claude Code, Codex and Cursor one shared memory the owner can correct.
BrainAPI turns text into a knowledge graph on your server and serves agents over MCP, REST and a console with fact-path answers
A plugin with a local document and code index: hybrid semantic and keyword search, a dependency graph and three helper agents
Persistent project memory in Markdown: decisions, requirements and constraints stay in the repo for each new session.
RoBrain passively records team and agent decisions and warns when an agent re-proposes an approach you already rejected
AgentDB keeps agent memory in an .rvf file and, with 41 MCP tools, recalls past solutions while learning from feedback
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| BrainDB (this card) | no | 116 | ||
| MCP Memory Service | no | not required | 2,117 | stores memories and a knowledge graph through MCP and REST; BrainDB adds typed entities, certainty scores, decay and a built-in agent |
| agentmemory | yes | not required | 30,314 | gives agents shared memory and cross-agent signals; here memory is a PostgreSQL graph with a wiki scheduler |
README in short
The service is designed as external memory driven by an LLM over HTTP. The built-in agent lets callers speak plain text instead of assembling API calls by hand.