Capture
Every Claude Code session fires a hook. The hook does one thing: append a 50-millisecond pointer to a queue. No LLM, no commit, no waiting. You never feel it.
A knowledge corpus that captures your decisions, voice, and relationships while you work. Read by every AI agent. Yours forever.
Memory is "what did I say last Tuesday." Vendor memory features handle that fine.
The actual problem is your knowledge corpus lives half in your head, half in scattered notes, half in a thousand AI sessions you can't get back. Your voice. Your taste. The decisions you've made and the why behind them. Your relationships and how you talk to each one. Every AI agent you start fresh has to be brought up to speed.
nanobrain captures that corpus while you work, distills it in your voice, and lets every agent read it. The brain builds itself. You don't have to remember to remember.
Every Claude Code session fires a hook. The hook does one thing: append a 50-millisecond pointer to a queue. No LLM, no commit, no waiting. You never feel it.
A background drainer wakes every 30 minutes. It checks if you're idle. If you're typing, it skips. If you've been quiet for 5+ minutes, it pulls one session from the queue and distills it into your brain — in your voice.
/brain who is jane. /brain links ledger. Or wire any agent
(Claude, Cursor, Codex, Gemini, Aider) through MCP — they all read the same markdown,
context-filtered.
Claude session → ┌────────────────────────────────────────────┐ Gmail thread → │ hook: 50ms pointer → queue/*.pending │ Calendar → │ drainer (idle): distill → brain/*.md │ Slack → │ graph: [[wikilinks]] auto-indexed │ └────────────────────────────────────────────┘ │ ▼ /brain who is jane /brain links project-x /brain spawn branding-agent
| nanobrain | Claude Memory | ChatGPT Memory | Mem0 / Letta | Notion AI | |
|---|---|---|---|---|---|
| Plain markdown | ● | — | — | — | — |
| Works without internet | ● | — | — | ○ | — |
| You own the data | ● | — | — | ○ | — |
| Readable in 50 years | ● | — | — | — | — |
| Multi-agent (Claude / Cursor / Codex / Gemini) | ● | — | — | ○ | — |
| Greppable from your terminal | ● | — | — | — | — |
| Open source | ● MIT | — | — | mixed | — |
/brain
Query the brain. Who is X. What's connected to Y. Where does Z live.
/brain-save
Force-save a decision or learning mid-session. Routes to the right file, redacts secrets, commits.
/brain-spawn
Mint a specialized agent with declared scope. Branding agent on the work side. Investing agent on the personal side. Each one boundary-locked.
/brain-doctor
Health check. Sources, contexts, GitHub sync, queue state, failed entries with retry hints.
/brain-restore
Non-destructive time travel. Branches from any git tag. Never resets, never force-pushes, never destroys current work.
/brain-ingest · pull one source into INBOX
/brain-distill · distill INBOX entries into brain files
/brain-init · scaffold a new brain
/brain-index · rebuild the entity catalog
/brain-log · append one operation line, greppable
/brain-lint · catch orphan pages, broken refs, missing tags
/brain-graph · rebuild [[wikilink]] backlink index
/brain-hash · integrity check via BRAIN_HASH.txt
/brain-compact · weekly cleanup, archives stale entries
/brain-evolve · monthly self-improvement proposal
/brain-checkpoint · force-capture mid-session
/brain-redact · scrub a leaked secret from history
# Clone the framework
git clone https://github.com/siddsdixit/nanobrain ~/nanobrain
# Create a PRIVATE repo for YOUR brain content
gh repo create my-brain --private --clone
# Install (capture hooks + idle distill drainer + skills)
bash ~/nanobrain/install.sh ~/my-brain \
--work you@company.com \
--personal you@gmail.com \
--gh-repo my-brain
# Use Claude Code normally. Step away at some point.
# A few minutes after you go idle:
cat ~/my-brain/brain/decisions.md
Capture wires into Claude Code's Stop, SessionEnd, and
PreCompact hooks — each is a sub-50ms file append, invisible to you.
The distill drainer runs every 30 min via launchd, but only does LLM work
when your keyboard's been idle for 5+ minutes. The brain builds itself in the background.
You never wait on it.
Native capture via Stop hook.
Read via MCP.
Read via MCP today.
Capture wrapper in v2.2.
Read via MCP today.
Capture wrapper in v2.2.
Read via MCP today.
Capture wrapper in v2.2.
Read via MCP today.
Capture wrapper in v2.2.
In April 2026, Andrej Karpathy described the pattern: three-layer corpus (raw / wiki / schema), immutable raw firehose, LLM-owned wiki, schema co-evolution via ADRs, git-native, source-dated entries.
What Karpathy described as a personal practice, nanobrain ships as a framework: same structure, same discipline, plus the capture loop, lint, index, log, and graph machinery that keep the corpus honest at scale.
autoresearch · git history as agent memoryCapture once. Read everywhere. Forever.