Open source · MIT · 100% offline

Your agent makes the same mistake twice. Your teammate's makes it a third time.

neuron is shared memory for your team's coding agents: every fix, convention and decision recorded once, as markdown in the repo, reviewed in pull requests, and injected automatically into Claude Code, Codex, Cursor and Copilot when it's relevant.

curl -fsSL https://raw.githubusercontent.com/kovartravis/neuron/main/install.sh | sh
or with Node.js: npm install -g @kovartravis/neuron

macOS · Linux · Windows  ·  standalone binary or npm  ·  no account, no API key, 100% offline

claude — a teammate's session, next day, same repo
# yesterday, on Alice's machine: her agent hit a flaky test, fixed it, and recorded why
$ neuron memory add --category learning "Fix for false-positive Bash-command match: the pattern was a bare substring test, so any command that merely quoted the phrase got logged as a real invocation. Anchor it to a shell separator."
{"id":"e9d606cd…","status":"created"}

# today, on Bob's machine, after a git pull: his agent runs a shell command. Before it
# executes, Claude Code's PreToolUse hook calls neuron and injects what's relevant.
$ npm test
PreToolUse:Bash hook additional context:
- [learning] Fix for false-positive Bash-command match: the pattern was a bare substring test, so any command that merely quoted the phrase got logged as a real invocation. Anchor it to a shell separator.
# nothing to paste into CLAUDE.md. no "remember to check memory" instruction. no third debugging session.

Measured, not just claimed

Every number below comes from a re-runnable harness checked into the repo. Click any card for the methodology and raw results.

Token figures: SWE-bench Lite instances matplotlib-24265 and django-11019, real checkouts pinned before the fix landed, k=4 sessions per arm, deterministic grading. npm run bench:swebench-ab:dry-run validates the fixtures for free.

How it works

Three moving parts. None of them depend on the model remembering to do anything.

neuron init

Wire it in once

Detects Claude Code, Codex CLI, Cursor or Copilot CLI, pre-downloads the local models, and registers the recall hooks. One command, no config to hand-write.

neuron memory add --category learning "…"

Your agent writes what it learns — into the repo

Fixes, conventions and decisions land in .neuron/*.md as schema-checked entries, committed with the code. A pre-stop hook nudges the agent to record before it ends the turn.

# next session — nothing to remember

Every teammate's agent gets it, automatically

After a pull, on every prompt and before every shell command, the hook queries the store and injects only what clears the relevance gate. No prompt instruction the model can skip.

Built for a team, not a session

Harness-native memory is yours alone, on your machine, invisible to review. neuron's is the team's.

The pull request is the product

A fix and the memory of the fix ship together. Reviewers see three new lines in.neuron/learning.md next to the code change — readable, greppable, and rejectable like any other diff. No database you need a viewer for.

Declare a field as required in neuron.yaml and the CLI refuses any write that omits it, from a human or an agent. neuron status --check catches anything that drifts afterwards; run it in CI next to your tests.

This isn't a toy example: neuron's own repository runs on its own .neuron/ store, and its memory changes are reviewed in pull requests like everything else.

example pull request · fix: stabilise test teardown · 2 files changed
src/test/server.ts
   afterEach(async () => {
     await server.close();
+    await waitForPortRelease(server.port);
   });

.neuron/learning.md
+---
+id: 4c1e7a2b-…  importance: 4
+tags: [failure-fix, testing]
+---
+Fix for ECONNRESET in the integration suite: the
+mock server's port is reused before the OS frees
+it. Wait for release in afterEach; a fixed sleep
+hid the race on CI runners.
terminal — a write that doesn't meet the schema
$ neuron memory add --category decisions "Chose Postgres"
Error: --ticket is required for category "decisions"
(neuron.yaml categories.decisions.fields.ticket).
Pass --ticket <value>, or add a "default:" in neuron.yaml.

Works with the agent you already use

neuron init detects what's installed and wires the deepest hook each harness exposes. Where a harness has no per-turn hook, neuron says so instead of pretending.

HarnessMemory recallPre-command lookupWrite nudge
Claude CodedeterministicEvery turn, automaticallyEvery shell commandYes
OpenAI Codex CLIdeterministicEvery turn, automaticallyEvery shell commandYes
GitHub Copilot CLIsession-startOnce per sessionVia neuron execYes
Cursorsession-startOnce per session + MCPVia neuron execYes
Windsurf, Zed, Claude Desktop, Roo CodeMCPMCP toolsMCP tools—

Per-harness details, hook points and known limits: harness adapters.

Why not just…

You can keep your CLAUDE.md, and your harness's own memory. neuron is the part neither of them can be: shared, reviewed, and enforced.

…a CLAUDE.md or AGENTS.md?

It's one file, read in full on every prompt whether it's relevant or not, and nobody prunes it. neuron injects only the entries that clear a relevance gate and enforces structure on what goes in. Keep your CLAUDE.md for standing instructions; neuron handles what the agent learns.

…Claude Code's or Cursor's built-in memory?

That memory lives in your home directory — per user, per machine. Your teammate's agent never sees it, and it never appears in a pull request. neuron's memory is the team's: in the repo, in the diff, on every harness. Source.

…Mem0 or Zep?

Those are hosted APIs for general-purpose agents. neuron is offline, in git, and built only for coding agents.

…nothing?

Measured on real SWE-bench Lite tasks with the same agent, memory hook on vs. off: 57.7% fewer tokens, and every session in both arms answered correctly. See the numbers.

CLAUDE.md / AGENTS.mdHarness built-in memoryHosted memory APIneuron
Where the memory livesOne growing prose fileYour home directoryBehind a hosted APIMarkdown in your repo
Shared with the teamYes, if committedNoVia the vendorYes — it is in git
Works across harnessesPer file nameNoVia SDKClaude Code, Codex, Cursor, Copilot, MCP
What goes into each promptThe whole file, every timeFirst N lines of an indexWhatever the API returnsOnly what clears a relevance gate
StructureNoneNoneVendor schemaYour schema, enforced at write time
Review changesgit diffNot reviewableVendor dashboardgit diff, same as code
Works offlineYesYesNoYes — no API key, ever
Recall is guaranteedOnly if the model reads itOnly if the model reads itOnly if the agent calls itHarness hook runs it

Named comparisons — Mem0, Zep, claude-mem, agentmemory, Beads, and harness-native memory — on the alternatives page.

Questions

Does neuron send my code or memory to the cloud?

No. neuron runs 100% offline — it embeds text locally with ONNX models and stores everything in a local SQLite/markdown store. No API keys, no telemetry, nothing leaves your machine.

Does neuron work with Cursor and Codex, or only Claude Code?

neuron ships harness adapters for Claude Code, OpenAI Codex CLI, Cursor, and GitHub Copilot CLI. Claude Code and Codex CLI get memory injected automatically on every turn; Cursor and Copilot CLI get it once per session, since those harnesses only expose a session-start hook. Any MCP-aware editor can use the neuron mcp server.

Does neuron replace Claude Code's built-in auto memory?

They can coexist, but they solve different problems. Claude Code's auto memory is stored per user under ~/.claude/projects/<repo>/memory/ and loaded for you alone; neuron's store is committed to the repo, so every teammate's agent — on Claude Code, Codex, Cursor or Copilot — reads the same entries, and changes to it go through code review.

How is neuron different from a CLAUDE.md or AGENTS.md file?

A CLAUDE.md or AGENTS.md file is static prose an agent rereads in full every prompt, whether it's relevant or not, and it only grows over time. neuron stores memory as structured, schema-enforced entries and surfaces only what's relevant to the current query, instead of dumping one file into every prompt. You can keep both.

Will it slow my agent down?

The recall hook runs a local hybrid search (SQLite FTS plus ONNX embeddings) and typically returns in well under a second on a warm cache. The first neuron init pre-downloads the models so there is no cold start mid-session.

Can I use it in CI?

Yes. neuron scan --check exits non-zero when the codebase drifts from the stored architecture card, and neuron status --check validates the store against your declared schema — both are ordinary CI steps.

Is neuron free to use?

Yes. neuron is MIT-licensed and installs via npm or a standalone curl/PowerShell binary, with no account or API key required.

Give your team's agents one memory in the next five minutes

Install, run neuron init in a repo, commit .neuron/ — and the next session, on anyone's machine, already knows what the last one learned.

npm install -g @kovartravis/neuron && neuron init