BrainBox
About
Hebbian memory for AI agents — learns file access patterns, builds neural pathways, predicts next tools/files, saves tokens
Details
- Author
- thebasedcapital
- Categories
- Developer Tools, AI, Knowledge Base, Productivity
Jump to
Setup
Install BrainBox in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/thebasedcapital/brainbox
Follow the installation instructions in the repository README, then restart your MCP client.
Hebbian memory for AI coding agents. Learns which files you access together, which errors lead to which fixes, and which tool chains you use most — then recalls them instantly.
Not a vector database. Not RAG. Procedural memory.
If BrainBox saved you tokens,give it a star— it helps others find it. Built by@thebasedcapital
Session 1: agent greps for auth.ts, reads it, edits it (2000 tokens) Session 5: agent recalls auth.ts directly, skips search (500 tokens saved) Session 20: auth.ts is a superhighway — instant recall, zero search cost
That's it. The postinstall script automatically:
- AddsPostToolUsehook to~/.claude/settings.json(learns from every file read/edit/search)
- AddsUserPromptSubmithook (injects neural recall into prompts automatically)
- Registers the MCP server viaclaude mcp add(6 tools for manual recall/recording)
- Creates~/.brainbox/database directory
BrainBox learns passively from your next Claude Code session. No configuration needed.
ThemacOS daemon(system-wide FSEvents file watcher) is completely separate and opt-in:
# Only if you want BrainBox to learn from VS Code, Xcode, vim, shell, etc. brainbox daemon install # installs LaunchAgent, starts watching brainbox daemon status # check if running brainbox daemon uninstall # remove completely
The daemon watches file changes across all your editors — not just Claude Code. It requires explicit opt-in because it registers a LaunchAgent and monitors your configured project directories.
brainbox uninstall # removes hooks + MCP server, preserves database
Kill cold start by bootstrapping from your existing git history:
brainbox bootstrap --repo /path/to/project --imports
This seeds the neural network from git commit co-changes and import graphs so BrainBox starts with knowledge instead of from zero.
BrainBox implements neuroscience-inspired learning:
- Neurons— files, tools, and errors you interact with
- Synapses— connections formed when things are accessed together ("neurons that fire together wire together")
- Myelination— frequently-used paths get faster (like muscle memory)
- Spreading activation— recalling one file activates related files
- Decay— unused connections weaken naturally, keeping the network clean
https://github.com/thebasedcapital/brainbox/raw/main/assets/brainbox-animation.mp4
https://github.com/thebasedcapital/brainbox/raw/main/assets/brainbox-spreading.mp4
https://github.com/thebasedcapital/brainbox/raw/main/assets/brainbox-superhighway.mp4
https://github.com/thebasedcapital/brainbox/raw/main/assets/brainbox-immune.mp4
If you're not using Claude Code, you can run the MCP server standalone:
# 6 tools: record, recall, error, predict_next, stats, decay npx tsx node_modules/brainbox-hebbian/src/mcp.ts
{ "plugin": ["node_modules/brainbox-hebbian/src/kilo-plugin.ts"] }
BrainBox can be deployed as an OpenClaw memory slot plugin. SeeNeuroVaultfor the reference implementation.
brainbox recall "authentication login" brainbox record src/auth.ts --context "authentication" brainbox stats brainbox error "TypeError: cannot read 'token'" brainbox predict Read brainbox embed # add vector embeddings for semantic recall brainbox hubs # most connected neurons brainbox stale # decaying superhighways brainbox projects # list project tags brainbox sessions # recent sessions with intents brainbox streaks # anti-recall ignore streaks brainbox graph # ASCII neural network brainbox highways # show superhighways brainbox decay # weaken unused connections
Files accessed together form synapses. Accessauth.tsthensession.ts10 times and BrainBox learns they're related — recalling one activates the other.
When you fix a bug, BrainBox remembers which files fixed which errors. Next time a similar error appears, it suggests the fix files immediately.
After 20 Grep-Read-Edit chains, BrainBox predicts you'll Read after Grep and pre-loads likely files.
Strong synapses resist further strengthening (like real neural synapses). Prevents any single connection from dominating the network.
Files recalled but never opened get progressively stronger decay. Consecutive ignores escalate: 1st = 10%, 2nd = 19%, 3rd = 27%. Opening the file resets the streak.
Identify the most-connected neurons in your network and detect decaying superhighways before they fade.
Auto-tag file neurons by project. Recall scoped to current project reduces cross-project noise.
src/ hebbian.ts # Core engine: record, recall, decay, SNAP, BCM, spreading activation db.ts # SQLite schema: neurons, synapses, access_log, sessions embeddings.ts # Optional vector embeddings (all-MiniLM-L6-v2, 384 dims) installer.ts # Auto-installer: adds hooks + MCP to ~/.claude/settings.json mcp.ts # MCP server (6 tools) hook.ts # Claude Code PostToolUse hook prompt-hook.ts # Claude Code UserPromptSubmit hook kilo-plugin.ts # Kilo/OpenCode native plugin bootstrap.ts # Git/vault/import seeder daemon.ts # FSEvents file watcher (macOS, opt-in) cli.ts # CLI interface test.ts # 59 tests, all passing
- Node.js 18+
- macOS or Linux (FSEvents daemon is macOS-only, everything else is cross-platform)
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Persistent AI memory across tools — remember your preferences, code standards, and decisions across Claude Code, Cursor, Codex, and any MCP tool. Local-first, zero-cloud.
ByteRover Team Memory is a paid remote MCP endpoint for OpenAI Codex memory MCP. It exposes structured JSON tools, a public server card, token-based access, usage receipts, and audit-ready w
Zero-config session continuity for Claude Code. Auto-captures context via Claude Hooks, provides 24 tools for memory, tasks, solutions, and knowledge graph. Multilingual semantic search (94+ languages).
Persistent memory MCP server for Claude — store decisions, code, and knowledge across sessions.
Provides perfect memory for AI-assisted development by capturing project context snapshots, enabling natural language search, evolution tracking, and code intelligence.
A persistent development partner that prevents context drift and maintains project memory across all development sessions.
Your AI's memory shouldn't live on someone else's server — 12 MCP tools that give it persistent context from your local markdown, no cloud, no API keys, single binary.
Local-first cross-agent memory MCP. 6-layer structured brain (goal/context/emotion/impl/caveat/learning) with token-saving file diff cache (86% measured savings on re-reads)
Give your AI the ability to remember key facts and everything you've ever discussed
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





