The brain

🧠 One file. Your agents remember.

Every AI coding agent forgets the same things you had to work out twice. The brain is a plain-folder memory store they all read before work and write to after it. One JavaScript file installs it. No dependencies, no database, no network.

Loading the file size...

What you get

Shared memory

One folder every agent in your project reads and writes. What one learned, the next one knows.

Plain Markdown

One file per entry. Read it with a text editor, grep it, commit it, diff it. Nothing to lock.

Outlives compaction

Decisions and gotchas live outside the conversation, so summarising the chat cannot erase them.

Searchable

Full text across titles, tags and bodies, filtered by project and type, plus an HTTP API.

A visualizer

A local web UI: every entry as a card, filtered by project. Add and edit without touching a file.

Health checks

brain doctor catches empty titles, unregistered projects and dangling references, and exits non-zero.

Install it

  1. Fastest: hand it to your agent. Drag brain-install.js into a chat with your AI coding agent and say: "Save this as brain-install.js in my project root and run it." It writes a complete brain, picks a free port, and verifies itself.
  2. Or run it yourself. Save the file into your project folder, then:
    node brain-install.js
    
    # options
    --to <dir>        install into a different folder
    --name <name>      name this brain (gives it its own port)
    --keep-scope         keep whatever scope your registry already has
    --force              install over an existing brain
    It refuses to clobber an existing brain without --force, and it never overwrites an existing AGENTS.md. It writes the agent instructions as a separate suggested file instead so you can read them before adopting them.
  3. Or skip the installer. Copy a whole brain/ folder into your project. It works exactly as it ships. The installer just saves you writing the files out.

Requires Node 18 or newer. That is the entire dependency list.

After it installs

# find something an agent already worked out
./brain/brain search "build command"

# write something down so nobody re-derives it
./brain/brain add --scope myproject --type knowledge \
  "Build is vite, not webpack" "Run npm run build. Webpack config is a leftover."

# everything about one project, and is the corpus healthy?
./brain/brain list --scope myproject
./brain/brain doctor

# browse it, and open a local UI
./brain/brain serve

On Windows use brain\brain.cmd. The launcher finds Node itself, so it works whether or not Node is on your PATH. Every command takes --json.

The four entry types

TypeWhat goes in it
knowledgeA durable fact, established by evidence. "This API rate-limits at 60/min."
memoryWhat happened: a session outcome, current state, an open thread.
decisionA choice and its reason. The reason is the part nobody can re-derive.
noteEverything else.

What it does not do