Welcome to the nanobrain research preview.
nanobrain

Second brain · Markdown · Vendor-neutral

Anthropic gave you Memory inside Claude. Google's giving it inside Gemini. OpenAI's giving it inside ChatGPT.
Each one locks you in.

nanobrain is the markdown + git equivalent. Yours forever, portable across every agent.

~/my-brain · nanobrain demo
nanobrain CLI demo. status, who, list, show, works with

Why nanobrain

Your context outlives any single AI vendor.

01

Plain markdown

No DB. No schema. Your brain is human-readable forever, even if every AI vendor disappears tomorrow. Open it in any editor. Diff it in any tool. It's just files.

02

Vendor-neutral

One brain. Every agent. Switch from Claude to Codex to Gemini without losing context. Built for the multi-agent decade, when each tool tries to lock your memory inside itself.

03

Captures itself

A throttled stop hook distills each session, redacts secrets, commits + pushes to your git remote. Your brain compounds in the background while you ship.

How it works

Three loops on one brain. The capture loop fills it. The use loop reads it. The maintain loop keeps it healthy.

01

Capture loop

on session end
Sources
Claude Cursor Codex Gemini Aider Granola Repos + via _TEMPLATE
Stop hook
code/hooks/capture.sh
throttled · runs locally
Redact
code/hooks/redact.sh
scrub secrets pre-write
Distill
summarize · categorize · auto-link with [[wikilinks]]
brain/*.md
git commit + push · vendor-neutral
02

Use loop

every agent query

An MCP server exposes the brain to any LLM. Claude Code, Cursor, Codex, Gemini, and Aider all hit the same 7 tools.

brain_searchfull-text + tag
brain_get_entityfetch by name
brain_list_by_typeperson · project · decision · concept
brain_relationshipsbacklinks + outlinks
brain_query_graphtraverse the wiki graph
brain_add_to_inboxappend-only writes
brain_statusbrain health metadata
03

Maintain loop

cron + on-demand

A markdown wiki without maintenance rots. nanobrain ships nine slash commands. Two of them run on schedule via macOS LaunchD plists.

/brain-compactmonthly cleanup · cron
/brain-evolveself-improvement · monthly cron
/brain-redactscrub secrets retroactively
/brain-checkpointsnapshot before risky ops
/brain-hashverify integrity
/brain-graphexplore the link graph
/brain-spawnbuild agents from brain context
/brain-saveforce-save mid-session
/brainbase command · search, who, list, show

Architecture

Three layers. Borrowed from Karpathy's LLM Wiki pattern. Each layer has one job.

Layer 3 · the rules

Schema

One file per agent runtime, all referencing the same brain. Tells the agent how to read, edit, and maintain the wiki.

CLAUDE.mdAGENTS.mdGEMINI.md
Layer 2 · what the LLM owns

Wiki

Markdown files the agent reads, edits, cross-links with [[wikilinks]]. Top-level indexes plus per-entity folders. Lives in your git repo.

self.mdprojects.mdpeople.mddecisions.mdperson/project/decision/concept/
Wikilinks in the example brain: [[Jane Doe]] [[Ledger]] [[Sam Park]] [[2026-04-15 — vendor pick]]
Layer 1 · ground truth

Sources

Raw, immutable. The agent reads but never modifies. Each source has its own ingest + distill recipe. Adding a source is a folder.

data/claude/INBOX.mddata/granola/INBOX.mddata/repos/INBOX.md
Add your own: code/sources/_TEMPLATE/

RAG retrieves on every query. The LLM Wiki accumulates. nanobrain is the pipeline that fills it. Real [[wikilinks]], real backlinks, real cross-references. Just markdown.

Install in 30 seconds

No accounts. No SaaS. Just markdown in your git repo.

~/my-brain
$ git clone https://github.com/siddsdixit/nanobrain.git ~/nanobrain
$ ~/nanobrain/install.sh ~/my-brain

   stop hook installed
   MCP server registered (7 tools)
   slash commands available
   first commit pushed

$ claude   # your agent now has a second brain

Works with

One brain. Every agent. Add yours via a 50-line wrapper.

CLAUDE CODEX GEMINI CURSOR AIDER

Heritage

Standing on the shoulders of an honest giant.

“A wiki is a beautiful primitive. LLMs make it 100× more powerful. The bookkeeping that humans abandon (cross-references, summaries, contradictions) is exactly the labor LLMs don't get bored doing.”
Andrej Karpathy on the LLM Wiki pattern
2025

nanochat

“the best ChatGPT $100 can buy”

Karpathy showed an entire ChatGPT pipeline could fit in a single hackable repo. The "nano" ethos: small things that compose forever.

2025

LLM Wiki

“knowledge that compounds, not retrieves”

The three-layer pattern: raw sources → markdown wiki → agent schema. RAG retrieves; the wiki accumulates. The LLM owns the wiki, edits it, keeps it current.

2026

nanobrain

“the capture layer for the LLM Wiki”

Karpathy gave us the pattern. nanobrain ships the infrastructure: auto-capture from every agent session, secret redaction, git commit + push, MCP read/write. The wiki maintains itself in the background.

nanobrain is not the LLM Wiki. nanobrain is what fills it. Across every agent you use.

About

Try without installing

The starter brain has Alex, nanobrain, ledger, and 3 real-shaped decisions baked in.

try.nanobrain
$ BRAIN_DIR=examples/starter-brain
$ node code/mcp/server.js