brain-core is a local memory system designed for Claude Code agents, aimed at solving the problem of starting from scratch in every session. It provides five tools through a local MCP server, enabling agents to remember project context, decisions, and corrections, and to automatically recall them in subsequent sessions.
Purpose
brain-core is mainly used when an individual runs one or more agents on a local computer, providing agents with persistent memory across sessions. It is not suitable as a hosted service or team product.
Main capabilities
- Five tools: Agents manage sessions through brain_session('start'/'end'), write memories with brain_remember, retrieve memories with brain_recall, and check health status with brain_status.
- Local storage: Memories are stored as Markdown files in a vault folder on the user's disk, indexed by a SQLite full-text index (FTS5) and optional Hindsight vector storage.
- Session structure: At session start, it returns today's briefing, execution status, mental models, recall of the first two tasks, inbox count, and a last-session crash flag; at session end, it archives and rewrites the state.
- Memory writing: The agent actively calls brain_remember to write text and type, supports search keys (keys), skips duplicate content, and marks fact changes while retaining old values.
- Recall mechanism: brain_recall is based on the SQLite FTS5 keyword index, sorted by bm25 and recency, results are annotated with file and date, weak matches trigger weak_match, and results are limited to 6k tokens.
- Mental models: The models block is configured through brain.yaml, brain models generates short Markdown files, each declaration cites the source file and line number, and is automatically marked when stale.
- Scheduled tasks: brain daily generates the next day's briefing and backs up Hindsight; brain weekly archives sessions older than 30 days, refreshes mental models, and drafts rules.
- Installation and integration: Provides a one-line installation command, supports macOS, Linux, and Windows, and can be integrated into Claude Code and the Claude desktop app. The installer createsCreate the agent folder, CLAUDE.md, rules files, skills, hooks, .mcp.json, and an empty vault.
- Evaluation: The project provides a recall evaluation based on 143 annotated questions, comparing the effects of keyword indexing versus vector hybrid, and discloses unfavorable numbers.
How to use
- Run the install command (one line for macOS/Linux, one line for Windows PowerShell), specifying the agent name (--agent) and user name (--user).
- The installer installs the agent, Hindsight (about 2GB, optional --lite to skip), scheduled tasks, Claude Code, and desktop app connections.
- In Claude Code, the agent automatically uses five tools; users do not need to run anything manually.
- Check the installation status via brain doctor, or use brain_status() to view a health report within the session.
- To update, re-run the install command or follow the prompts; the program is updated without affecting files in the agent folder.
Use cases
- Individual developers using Claude Code for long-term project development who need the agent to remember project context, decisions, and corrections.
- Users who want memory data stored entirely locally, readable and editable.
- Users who need to evaluate memory recall performance.
Limitations
- Intended for personal use only, not a hosted service or team product.
- Keyword indexing has limited recall for paraphrased questions (about one-third of paraphrased questions are still missed); a vector database is better suited for large volumes of documents without search keys.
- Hindsight vector storage requires an LLM for inference, using an Anthropic API key or Claude Code login by default (personal use only); --lite mode skips Hindsight but loses meaning-based search, mental models, and weekly reflection features.
- Mental model generation requires an Anthropic API key (default) or Claude Code login (opt-in required).
- Installing Hindsight requires about 2GB of space.
- Evaluation labels were written by a model and have not yet been human-checked.
- The desktop app's built-in memory and brain-core may produce duplicate facts, requiring manual configuration of a single source.