Your coding agent forgets your codebase. NeuralMind remembers it.
Local-first memory for Claude Code, Codex, Cursor and any MCP agent. NeuralMind maps your repo, learns which files belong together as you work, and hands your agent the right code first — the gold file on 40 of 40 benchmark queries at 51–242× fewer tokens than pasting every source file, with every miss on a larger 150-question eval published. No telemetry. MIT core.
- 40 of 40
- Gold file found
- 51–242×
- Fewer tokens
- 93.3%
- Top-5 hit rate
- Free
- Every feature, 1 seat
public-benchmark queries, 4 repos
than pasting every source file
150-question eval, 5 repos, every miss published
MIT core, no signup, never expires
AI coding agents have no long-term memory
Claude Code, Codex, Cursor and every other agent reason well over what is in the window — and forget it when the session ends. So they pay, every time, to find their way around a codebase they have seen before.
Every session starts from zero
Your agent rediscovers the same files each session — reading, grepping, re-reading. What it worked out yesterday is gone, and so is whatever it learned before the last context compaction.
Context is the bill
Pasting files is the default way to hand an agent context. Pasting every source file of the public benchmark repos costs 42K–232K tokens per question; NeuralMind’s assembled context averages under 1,000.
Grep is not understanding
Keyword search matches words, not meaning. On three of the four benchmark repos ripgrep’s gold-file recall was 0.79–0.85, while it still read 27K–45K tokens per question.
NeuralMind is the missing layer: a persistent code graph plus associations learned from how you work, queried on your machine — a local index lookup, not another model call — so your agent starts every session already knowing where things are.
How it works
Three steps. After that, neuralmind init-hook . keeps the index current on every commit.
- 01 / 03
Index
~15 minneuralmind build .parses your codebase into a graph with tree-sitter — functions, classes, imports, call edges. Ten languages, zero config, embedded on your machine. - 02 / 03
Query
Your agent asks over MCP or a Claude Code hook. Progressive L0–L3 disclosure returns a project map, the relevant symbols and their call edges — a local index lookup, not another model call.
local lookup - 03 / 03
Remember
A Hebbian synapse layer learns which files you use together and recalls them next session, budget-neutral by design.
Across sessionsneuralmind memory publishwrites it to a file you commit, and teammates inherit it.
What your agent gets
Persistent memory, cheaper context, and the controls a team needs — in one local install.
Memory that learns how you work
Associations strengthen when you use code together and fade when you stop, so recall can reflect how your team works, not just what the files say. Whether it helps on your repo is measurable: neuralmind eval . --synapse-ab runs your questions with synapse recall on and off.
Hebbian synapse layer
Files you open, edit and query together get a weighted edge; unused edges decay. Recall displaces the weakest hits one-for-one instead of adding to them, so it is budget-neutral by design.
Session-start memory for Claude Code
Learned hub files and associations are exported to SYNAPSE_MEMORY.md, which Claude Code loads at session start — your agent begins already oriented.
Cognition loop
neuralmind cognition-loop runs one maintenance pass on demand: the synapse store’s half-life decay plus read-dedup cleanup. It never decays twice, so it’s safe for cron; Claude Code’s hooks already decay at every session start.
Session summaries
Periodic, semantically recallable digests of what an agent did, decided and touched — so the next session can pick up without re-reading the logs.
Decision memory
Architecture decisions stored with rationale, evidence, commit SHA, affected files and rejected alternatives — full-text searchable. When a commit changes a decision’s files after it was recorded, the post-commit hook from neuralmind init-hook marks it stale.
Stale-decision guard
Before your agent edits a file, a PreToolUse hook surfaces any decision governing it that has gone stale or been invalidated — with the reason and how to restore one that still holds — so a retired decision can’t silently steer the edit.
Context that costs less
The agent gets a map, the relevant symbols and their call edges — not whole files — and asks for more depth only where it needs it.
Progressive L0–L3 disclosure
Project map, then relevant clusters, then symbol detail, then search — only as deep as the question needs. 51–242× fewer tokens than full-file context across 40 pre-registered queries on four public repos.
Hard context budget
Set a per-query token budget and NeuralMind trims L3 → L2 → L1 to fit, so the context it hands over never exceeds it — useful for cost-controlled multi-agent workflows.
Read dedup for repeat reads
In Claude Code, a repeat read of a file your agent already has — same session, unchanged — comes back as a short stub instead of the whole file again. The next read is always full, and compaction resets it.
Local retrieval, no model call
Recall is a local index lookup, not another round trip to a model. The ChromaDB-free TurboVec backend keeps 4-bit vectors 8–16× smaller with fact recall 0.800 vs 0.744 for float32 — parity gated in CI.
Works with the stack you already run
No new IDE, no model swap, no hosted service. NeuralMind sits between your agent and your code.
MCP server for any agent
neuralmind install-mcp registers the server with Claude Code — or Cursor, Cline, VS Code and Claude Desktop via --client — and Codex, Continue or any other MCP client points at neuralmind-mcp. One memory, every agent.
Ten-language code graph
Bundled tree-sitter indexes Python, TypeScript, Go, Rust, Java, C, C++, C#, Ruby and PHP out of the box — plus OpenAPI, SQL DDL and Protocol Buffers schemas.
One-command setup
neuralmind init scans your languages, builds the graph and embeddings, and starts the file watcher. neuralmind doctor verifies the install end to end.
Graph view & dashboard
neuralmind serve opens a force-directed code graph with the synapse overlay, plus a read-only dashboard: memory health, ingestion, savings and latency trends.
Commit-time drift guard
neuralmind init-hook . adds a pre-commit check that flags code skipping a pattern its siblings share — the eleventh handler that forgot the auth check the other ten have.
Business-context seeding
Links decisions, SOPs and meeting notes to the code they describe with deterministic, LLM-free associations — so "why" questions reach the right files.
Self-documenting code
DocEvolver finds undocumented methods, generates doc-comment variants and keeps the ones that measurably improve retrieval.
Built for teams and audits
Memory your whole team inherits, with the controls and evidence a security review asks for — all evaluable free at one seat.
Team memory in git
neuralmind memory publish writes a learned-weights bundle (no source code) that you commit. Teammates inherit it on their next session — a fresh clone starts with the team’s intuition.
Governance & audit log
Publishing honours the scope and weight threshold an admin sets, removing an association retracts it for every teammate, imported memory passes a review queue, and each publish, import, review and admin change lands in a hash-chained audit log you can verify and export.
Local-first engine
By default NeuralMind sends no telemetry and transmits no repository content off your machine; your agent receives only the slice it asked for. One public model download on first build, pre-seedable for air-gapped installs.
Compliance annotations
Finds control annotations across CMMC 2.0, NIST SP 800-53, SOX ITGC, HIPAA, SOC 2 and ISO 27001 — # NIST AC-1:, # CMMC AC.L2-3.1.1: — and answers "are we covered on access control?" over MCP.
Audit export & CI gate
neuralmind export --controls produces control-to-code mappings for evidence packages; neuralmind ci-check fails a build when annotation health drops.
Benchmarks
neuralmind benchmark . for your own.- Gold file found
40 of 40
pre-registered queries on 4 pinned OSS repos. A small sample: a 150-question eval on 5 repos puts the gold file in the top five 93.3% of the time, misses listed. Reproducible, not a CI gate
- Tokens vs. pasting every file
51–242×
same 40 queries, against pasting every source file — the easiest baseline to beat, so the next figure is the one to weigh
- Tokens vs. grep-and-read
31–67×
same 40 queries, against ripgrep opening its top five files whole, which found the gold file on 32 of 40. An agent that reads only the matching lines pays less than this baseline; that is not measured
- Learned recall
Never worse
CI asserts synapse recall ≥ no-recall on the same warm graph, at a neutral token budget — on a ~500-line fixture, so it shows direction, not size
- Learning on your repo
Not yet shown
nothing published shows the synapse layer improving retrieval on a real codebase over time. neuralmind eval . --synapse-ab measures it on yours: your own questions, synapse recall on and off
- Facts vs. naive truncation
+0.26
at an equal token budget on the prose-heavy CI fixture, measured at v4.12.0 with CI’s command (v4.11.1: +0.03; v4.3.4 was a published loss, −0.054). CI fails the build below −0.10
- Field report, one repo
48.8×
~9,300-node private TypeScript codebase, vs. the fixed 50K-token estimate the CLI used before v4.5.0 — method reproducible, not CI-gated
- Task outcomes
Not measured
every figure here is retrieval — what reaches the agent’s window and whether the right file is in it. Whether agents finish tasks faster or with fewer mistakes is not measured yet
- Setup time
~15 min
one CLI command; post-commit hook keeps it current
Every number above comes from the public benchmark — four pinned OSS repos, 40 pre-registered queries, one command to rerun it. That page publishes the per-repo tables, the vector baseline that costs fewer tokens and still ranks the gold file higher on two repos, and the misses on a larger 150-question eval.
Plus one labeled field report (measured with the CLI, not CI-gated): 48.8× on a real ~9,300-node TypeScript SaaS platform, through a major rebuild, against the fixed 50K-token estimate the CLI used before v4.5.0. Read the field report →
See it in 30 seconds
Clone the repo and run the demo on the bundled fixture, then run neuralmind benchmark . on your own codebase. Email the output to [email protected] with your team size for a free spend model.
Prove it on your own repo
30-second demo on a fresh clone
One script: isolated venv, index build, three real questions against the bundled fixture project.
$ git clone https://github.com/dfrostar/neuralmind && cd neuralmind
$ bash scripts/demo.sh
Then measure YOUR codebase
No clone needed: install from PyPI and point it at your repo. The fixture above is tiny (~500 lines, ~5.5×); before v4.5.0, neuralmind benchmark reported 12–50× on real repos against a fixed 50K-token estimate — a maintainer field report on a ~9,300-node private TypeScript codebase measured 48.8×. It now divides the measured size of your own code, so the ratio scales with the repo. Read your own number.
$ pip install neuralmind
$ cd /path/to/your-repo
$ neuralmind build .
$ neuralmind benchmark .
Verify what you installed
Check the SBOM, release integrity and disclosure policy on the security page — and the one-repo production field report, before/after numbers included.
What the demo prints (bundled fixture)
Q: How does authentication work in this codebase?
naive = 4,736 tok neuralmind = 829 tok reduction = 5.7×
Average reduction: 5.5× across 3 queries
Avg context size: 859 tokens (vs 4,736 naive)
Small fixture, small multiplier — by design. It runs in CI on every commit as a regression gate. Real repos have more to prune, so the ratio grows with the codebase; your own number is one neuralmind benchmark . away.
What we can prove, and what we can't yet
Reproducible public benchmark
40 pre-registered queries on 4 pinned OSS repos: the gold file found on all 40, at 51–242× fewer tokens than pasting every source file. One command reruns it — python -m evals.public.run — and the raw per-query data is committed.
See the benchmark →CI-gated regression floors
Every PR asserts: token reduction ≥ 4.0× on the fixture, synapse recall never lowers hit rate, and the faithfulness delta against naive truncation stays above −0.10 — at v4.12.0 it measured +0.25 (at v4.3.4 it was −0.054, a loss we published).
CI config on GitHub →Production field report
48.8× token reduction on a ~9,300-node TypeScript SaaS codebase through a major rebuild, against the fixed 50K-token estimate the CLI used before v4.5.0. One repo, maintainer-measured, anonymized by request — method and before/after data published.
Read the field report →What we don't have yet
- Testimonials from users outside the project
- Named case studies — the one field report is anonymized
- A side-by-side video of a real repo, before and after
- Adoption numbers large enough to be meaningful
The biggest missing piece is social proof from real users, not another benchmark. So the honest way to evaluate NeuralMind is to pip install neuralmind, neuralmind build ., neuralmind benchmark . — and read your own number.
If you do, send it to [email protected]. We publish results attributed or anonymized — your choice — including the ones that don't flatter us. How to measure your own →
The savings are free. Teams pay for seats and support.
The savings are free
- Token reduction ships in the free MIT core — the savings cost nothing, and you can measure them on your own repo in ~15 minutes.
- Modeled at 30 code questions per developer per day, a 50-developer team saves ~$310/mo on inference alone. The figure barely moves with the exact ratio — 48.8× and 65.6× (both against the fixed 50K-token estimate the CLI used before v4.5.0) differ by under 1% of the saving, because both already remove ~98% of the retrieval tokens.
- Time may be the bigger line, but it is modeled, not measured. The business case’s worked scenario — 15 developers each losing 15 minutes a day to context-limit thrashing — puts it at ~$4,125/mo at a $50/hr fully-loaded rate. How much of that NeuralMind wins back is what the free assessment measures in your team; we don’t claim a figure.
- Recall is a local index lookup, not another model call — nothing in the loop between "I need to know X" and "I know X" waits on an API.
Fewer wrong turns, faster teams
- The gold file found on 40 of 40 pre-registered queries on four public repos, and in the top five on 93.3% of a larger 150-question eval — with every miss published rather than dropped.
- Team memory travels with git: a new hire’s agent starts with the associations the team has already earned instead of relearning them.
- Read-only dashboard for synapse memory health, ingestion, savings and latency trends — local, no hosted service.
- By default NeuralMind sends no telemetry and transmits no repository content off your machine. It works with the agents you already run — Claude Code, Codex, Cursor, Cline, any MCP agent. No rip-and-replace.
See your savings before you spend a dollar
pip install neuralmind and you have the whole product. For teams evaluating at scale, we run a free AI-spend assessment: measured on your code, modeled in your numbers, no obligation.What the assessment gives you
- A measured token-reduction ratio on one of your own repos — run locally, with none of your code transmitted
- A spend model in your numbers: per-seat subscriptions, usage-based API (OpenRouter, Bedrock, Vertex), and self-hosted GPU
- A productivity model: hours lost to context-limit thrashing and re-prompting, valued at your fully-loaded rate
- An honest fit verdict — if your workload is generation-heavy or caching already covers you, we say so
The core is MIT-licensed and free. Fixed-fee help with deployment and rollout is on the services page.
Common questions
Does NeuralMind work with Claude Code, Cursor, Codex and other agents?
NeuralMind runs as a standard MCP server, so any MCP-compatible agent can use it. Claude Code is tested end to end and also gets lifecycle hooks — memory at session start, prompt-time recall and a stale-decision guard. Cursor, Cline, Continue and Codex connect through the same protocol; the MCP handshake is verified against Codex, but we have not driven those agents end to end in CI, so the README labels them theoretical. "neuralmind install-mcp" registers the server with Claude Code (add --client for Cursor, Cline, VS Code or Claude Desktop), and other clients point their MCP config at "neuralmind-mcp". There is also a CLI and a Python API.
How much does NeuralMind reduce Claude Code token usage?
It depends on your repo, so measure it. On the public benchmark — 40 pre-registered queries on requests, click, flask and rich — NeuralMind’s context was 51–242× smaller than pasting every source file, and it found the gold file on all 40. Pasting everything is the easiest baseline to beat: against ripgrep opening its top five files, closer to how an agent works, it was 31–67× smaller, and ripgrep found the gold file on 32 of 40. An agent that reads only the matching lines pays less still, and that is not measured. On private repos, "neuralmind benchmark ." reported 12–50× before v4.5.0, against a fixed 50K-token estimate; it now divides the measured size of your own code, so run it and read yours. That is the retrieval slice of your bill; end-to-end savings are smaller, because generation, conversation history and tool output cost tokens too — the published business case models that honestly. NeuralMind no longer claims savings on tool output: its old compression hooks, measured against how Claude Code actually handles hook output, added tokens instead of saving them, so they were switched off (docs.neuralmind.uk/benchmarks/compression.html).
How is this different from RAG or a vector database?
Plain RAG retrieves text chunks that look similar to the question. NeuralMind keeps a graph of your code — symbols, imports, call edges — assembles a structured context from it (project map, relevant symbols, their callers), and adds a synapse layer that learns which files you use together. On pure findability a vector index is a strong baseline: in the public benchmark, NeuralMind’s own index alone (top 8 entries, names and docstrings, no code) costs fewer tokens on every repo and still ranks the gold file higher on flask and rich, though NeuralMind’s recall is now at or above it everywhere — and we publish that. NeuralMind spends its extra tokens on context an agent can answer from, and on memory that persists between sessions.
Does NeuralMind get better the more I use it?
It is built to: the synapse layer strengthens links between files you use together and lets unused ones fade, and recall uses those links to re-rank results. What is shown so far is narrower. CI checks that learned recall never lowers the hit rate, on a ~500-line fixture, which shows direction rather than size. Nothing we publish yet shows it improving retrieval on a real codebase over weeks of use, and nothing measures whether agents finish tasks faster. You can measure the first on your own repo: write down questions with the file that answers each (past incidents, phrased as the symptom), then run "neuralmind eval . --synapse-ab" (v4.14.0+), which runs them with synapse recall on and off and records the difference each time.
How is NeuralMind different from CLAUDE.md or Cursor rules?
CLAUDE.md and rules files are instructions you write and maintain by hand. NeuralMind is memory the agent builds by working: a queryable index of the whole codebase plus associations learned from use. The two compose — NeuralMind exports its learned hub files and associations to SYNAPSE_MEMORY.md, which Claude Code loads at session start and your CLAUDE.md can import.
Does any of my code leave my machine?
By default, NeuralMind itself sends no telemetry and transmits no repository content off your machine — the graph, embeddings and synapse store live in your project directory. Its only default outbound request downloads a public embedding model on first build (again only if the cached copy is removed), and you can pre-seed it for air-gapped installs. One opt-in feature, off by default, sends README and architecture-doc prose to Anthropic under your own API key. What does leave is the context slice your agent sends to its own model provider, which NeuralMind makes smaller but does not control.
Is NeuralMind free? What does the paid tier buy?
The core is MIT open source, including everything that reduces tokens. A free 1-seat license auto-issues the first time you run "neuralmind wakeup ." — no signup, no expiry — and it unlocks every feature, including shared-memory governance, the hash-chained audit log and self-hosted deployment. NeuralMind Team ($29/user/mo, annual, 5–50 seats) buys seats beyond one, priority support and an annual invoice. You pay for seats and support, not for features.
How does team memory work?
Run "neuralmind memory publish" and the project’s learned associations are written to .neuralmind-team-memory.json at the repo root — learned weights, no source code. Commit that file, and every teammate’s agent imports it on the next session or build; each association is quality-scored on the way in, and borderline ones wait in a review queue. A new hire’s agent starts already knowing that the auth handlers go with the JWT utilities, instead of relearning it from scratch.
Where does NeuralMind lose?
Four places, all published. It finds all 40 public-benchmark queries, but 40 is a small sample: on a 150-question retrieval eval it misses the gold file in the top five on 10, most of them where vector search ranks that file outside the 20 candidates NeuralMind re-ranks. If all you need is to locate a file, a bare vector index is cheaper, and on flask and rich it still ranks the gold file higher. On the CI fixture it took until v4.12.0 to beat naive truncation at the same token budget (+0.26; v4.3.4 was a loss, −0.054), and that fixture is small. And the synapse layer needs real use to learn: a fresh install has no learned associations yet.
Why not just use Cursor, Windsurf or Aider memory?
Built-in memory is tied to one agent. NeuralMind is agent-agnostic: the same memory serves Claude Code, Codex, Cursor and anything else that speaks MCP, survives switching tools, lives in your repo, and is inspectable. It composes with those tools rather than replacing them.
What languages does it support?
Ten out of the box via bundled tree-sitter grammars: Python, TypeScript (and JavaScript/JSX, parsed with the TypeScript grammars), Go, Rust, Java, C, C++, C#, Ruby and PHP — plus OpenAPI, SQL DDL and Protocol Buffers schema files. Markdown and text can be indexed too, as their own content project.
What is the business case for a team?
Two lines: the measured token reduction (free — verify it on your own repo in about 15 minutes) and time lost to context-limit thrashing and re-prompting, which the business case models but does not measure. The full model and its assumptions are published, and the free assessment measures both in your numbers. If your workload is generation-heavy or prompt caching already covers you, we say so.
Stop paying for tokens you don't use.
One command to install, one to index, one to measure it on your own repo. Your agent remembers what matters.
$pip install neuralmind- No telemetry
- Runs on your machine
- MIT core, free at 1 seat