Keep what matters.
Decisions, notes, and lessons stay in your files. A local index connects the pieces.
NOTES → LOCAL INDEXA LOCAL MEMORY FOR CODING AGENTS
Your memory. Your stack.
Combine vector recall and graph connections. Change the engines, keep the knowledge.
Open source · Apache-2.0 · Free for everyone
A model brings intelligence. You bring the history. Local Brain connects your memory files, project docs and notes through adapters, so the context you built can return across sessions.
Session 01 → 05 · Starting context across sessions. Conceptual illustration, not a performance benchmark.
Decisions, notes, and lessons stay in your files. A local index connects the pieces.
NOTES → LOCAL INDEXHost hooks surface relevant memories as you type. Guidance returns before matching risky actions.
CONTEXT → ACTIONCalibrate against your own corpus. Compare retrieval with grep and the agent working alone.
MEASURE → CALIBRATEThree illustrative terminal scenes: automatic recall, an exact trigger phrase, and guidance before a risky action. Example memories, not a live agent.
Let’s continue the payments refactor.
Related memories, found automatically
memories / payments.mdPhase 2 stopped at the webhook retry. Tests live in tests/payments.
memories / idempotency.mdEvery retry carries an idempotency key.
A host hook reads your prompt and attaches only memories above your corpus’s retrieval threshold.
Declare a phrase in a memory’s front matter. Type it to bring that context back directly, without a relevance score.
Your guidance appears before push, rebase or migration. Discover rules from your own tool history.
brain rules --discoverAnd when the agent asks: eight MCP tools.
recallrememberneighborsbrain_statusbrain_suggestbrain_feedbackreindextimelineThe core stays the same. Hosts, AI engines, sources, databases and schedulers plug in around it. Vector search and graph traversal work together — Qdrant + Neo4j is a combined setup, not an either/or choice.
Vector database
Similarity search
Graph database
Connected context
brain addMemories remain plain Markdown files. The built-in local copy is canonical; dedicated databases are serving indexes. Switching means syncing, not re-embedding. A ledger sends only changes. Before sync, or if a database is unavailable, the local copy answers.
Ask both stores the same questions and verify matching answers. Move your memory between machines with brain export / brain import.
MEASURED · AUTHOR’S CORPUS · 2026-10-07
Similarity search · Qdrant
All-document, one-hop neighbors · Neo4j
1,909 documents · 9,590 chunks · 3,376 links. Matching answers on every compared query. These are corpus-specific measurements, not promised speeds for your setup.
README ↗Install by role with pinned images. Ports bind only to 127.0.0.1. Data lives in ordinary folders under the brain home, not Docker volumes, and survives reinstalling. Database usage reporting is disabled and verified by measurement.
Retrieval thresholds are measured on your documents. A Kalman filter learns the safety margin as feedback accumulates.
KalmanCompare accuracy, recall, text read and speed against grep and an agent alone. Every test runs the controls first.
brain score --compareLexical search opens no sockets. AI engines are opt-in. Secret-shaped values are masked before they can become context.
brain privacyYour agent can ask through MCP. The server picks up new code without restarting, keeping the connection alive.
MCPZero third-party dependencies in the core. Python 3.8+ standard library. Add engines and dedicated databases only when you need them.
Python 3.8+An HTML dashboard shows status and performance comparisons. Six interface languages. Your memories travel with export and import.
brain dashboardOpen source. Apache-2.0. Free for everyone.
Read the code, make it yours, build on it.
Clone, then install recall hooks and the action guard. Or give SETUP-PROMPT.md to your agent and let it guide installation.
git clone https://github.com/honeyground-org/local-brain ~/tools/local-brain
cd ~/tools/local-brain && ./install.sh --with-hook --with-guardOptional: install Qdrant for vectors and Neo4j for graph connections together with Docker. An existing install can use brain stores --docker.
./install.sh --all --stores dockerOptional: point the OpenAI-compatible adapter at a local Ollama server with nomic-embed-text available. No AI engine is required for lexical search.
brain engines --set embed=openai --base-url http://localhost:11434/v1 --model nomic-embed-text