v0.42.0 — latest release · release notes
Your agent learns your codebase the way a senior engineer would — what files go together, what you usually edit next, what patterns matter. The memory persists across sessions and surfaces automatically.
100% local engine. NeuralMind makes zero network calls of its own — only the minimal relevant slice ever reaches your AI tool, never your whole codebase. Side effect: 40–70× cheaper code questions, measured in CI on every commit.
Works with Claude Code · Cursor · Cline · Continue · VS Code · any MCP agent
Why NeuralMind
Every claim below ships with a committed eval. The first two run on real, pinned OSS repos (requests, click) and are fully reproducible — python -m evals.public.run. The last two are measured A/Bs on the bundled reference fixture, so they're real but smaller-scope.
100% gold-file recall at 38–85× fewer tokens than pasting files — and beats ripgrep on both recall and cost.
Public benchmark, real OSS repos.
100% gold-file recall, MRR 0.96 — ranks the correct file at the top; beats the incumbent codebase-memory-mcp on retrieval ranking (0.96 vs 0.23).
Same public benchmark, real repos.
A Hebbian synapse layer that learns co-edited files lifts top-k retrieval hit-rate +11.7 points (71.7%→83.3%), budget-neutral (no extra tokens).
Synapse A/B eval — reference fixture (smaller scope).
At a matched token budget, its context carries more of the gold facts than naive truncation: faithfulness +0.143, grounding 1.00.
Faithfulness/parity gate — reference fixture (smaller scope).
The problem
Traditional agents load whole files to answer a question — 50,000+ tokens of mostly irrelevant context, re-paid on every query, every session. NeuralMind keeps a learned, persistent index and surfaces only the code that matters.
How it works
Each layer is independently useful; together they compound. Everything runs locally with no cloud APIs and no telemetry.
A 4-layer semantic index surfaces only the context your question needs — not the entire codebase. Built-in tree-sitter backend indexes ten languages — Python, TypeScript, Go, Rust, Java, C, C++, C#, Ruby, and PHP — standalone; SCIP gives an optional compiler-accurate precision pass.
PostToolUse hooks compress Read/Bash/Grep output 88–91% smaller before the agent sees it. neuralmind last recovers the raw cache when the agent needs what was dropped — no re-running commands.
A persistent synapse graph learns Hebbian associations between co-active code nodes, plus directional edit-order transitions. Decay prunes stale links; spreading activation primes related code on every prompt — no MCP call required.
neuralmind serve opens an Obsidian-style force-directed graph of your codebase: structural edges, the learned synapse overlay, a live activity feed, and one-click "open in editor". Makes the brain inspectable — no black-box retrieval.
What changes
Three concrete behaviors appear once the synapse layer has watched a few coding sessions. None require extra tool calls — the memory surfaces automatically.
payment_service.py, asks "anything else?"npm test floods the conversation with 800 lines. The agent re-reads 50K tokens of output.middleware.py ↔ handlers.py ↔ session.py — auth flow." The agent boots knowing the shape of your code.payment_service.py you usually update webhook_handler.py (45%) and the test file (28%) — want me to do those too?" Learned from your edit history.neuralmind last recovers the raw cache on demand.The brain layer learns continuously from how you actually work — file co-edits via a watcher daemon, query intent from MCP calls, tool-use patterns from hooks — and decays unused associations so stale knowledge doesn't crowd out current patterns.
Proof, not promises
Retrieval reduction is measured in CI on every commit and reproduces in 30 seconds on a fresh clone. The learning layer's lift is gated in CI too — regressions fail the build.
~800 tokens of structured context instead of 50,000+ per code question. The bundled demo fixture (intentionally small, ~500 lines) averages 5.5× and catches regressions in CI; community-submitted real-world repos measure 46–66×, and you get your own number with neuralmind benchmark . --contribute.
The synapse layer lifts top-k retrieval hit rate from 72% to 83% (+12 pts) with recall on. The onboarding eval shows a deterministic +6.5-point top-k lift from inheriting a committed team memory — budget-neutral by design, CI-gated at lift ≥ 0.
The docs include a skeptic's companion — when NeuralMind isn't worth installing, what "40–70×" does and doesn't mean, where the sample is too small to extrapolate — alongside the business case with ROI math you can change.
Compare
| Capability | NeuralMind | Cursor @codebase | Claude Projects | Long context |
|---|---|---|---|---|
| Works with any agent | ✓ Any MCP agent | ✗ Cursor only | ~ Claude only | ✓ Yes |
| 100% local & offline | ✓ Yes | ✗ No | ✗ No | ✗ No |
| Learns from your usage | ✓ Persistent synapses | ✗ No | ✗ No | ✗ No |
| Token reduction | 40–70× | 2–3× | 0× (loads all) | 0× (loads all) |
| Enterprise compliance | ✓ NIST AI RMF + audit trail | ~ Basic | ~ Basic | ~ Basic |
View detailed comparisons → · The full context engineering stack: NeuralMind + Ponytail + Headroom →
Quickstart
One package. The built-in tree-sitter backend means no external graph tool is required (v0.15.0+) — pip install, and build.
# Install — built-in tree-sitter backend, no graphify needed pip install neuralmind # Index your project cd /path/to/your-repo neuralmind build . # Ask a question — ~800 tokens of context instead of 50K neuralmind query . "How does authentication work in this codebase?" # One command registers the MCP server with Claude Code, Cursor, # Cline, and Claude Desktop (auto-detected, non-destructive, idempotent) neuralmind install-mcp --all
# Skeptical? Reproduce the numbers on a fresh clone in 30 seconds: git clone https://github.com/dfrostar/neuralmind && cd neuralmind bash scripts/demo.sh
Enterprise
Process sensitive code without exfiltration — zero cloud APIs, zero telemetry, air-gap installable. Compliance claims are consolidated in a one-page summary for audit review.
Every query logged locally with export for compliance and auditor review. SOC 2 & GDPR-ready posture: full transparency, no vendor lock-in, no third-party processor.
CycloneDX SBOM attached to every release, an auto-built multi-platform container image on GHCR, and a documented air-gapped install path.
RBAC, rate limiting, secret detection, and audit logging on the MCP server boundary.
Default auto backend prefers the ChromaDB-free turbovec path (8–16× smaller vectors, byte-identical embeddings); ChromaDB, PostgreSQL pgvector, or LanceDB if that's your infrastructure.
Release timeline
Shipped in small, verifiable increments — every release gated by the CI benchmark.
The code graph learns to answer "what does this touch?" graphify already extracts typed structural edges — calls, inherits, imports_from, contains — into every graph.json; the embedder loaded them but nothing queried them. v0.42.0 surfaces them as a first-class, agent-visible capability. (1) Structural neighbors — neuralmind structural <symbol> (CLI) and the neuralmind_structural_neighbors MCP tool return a symbol's callers, callees, base/sub classes, and importers straight from the static graph — precise and available day-one. (2) Blast radius — --blast-radius / blast_radius=true gives the transitive set of code a change would affect (everything that calls, imports, or subclasses the symbol) — depth-bounded, cycle-safe, hub-capped. (3) Structural recall in retrieval (opt-in) — with NEURALMIND_STRUCTURAL_RECALL=1 a query hit's callers/callees fold into L3 context, budget-neutral (displacement, not addition). The query surface is on by default; folding into retrieval is opt-in because it interacts with the tuned synapse reranker, so default retrieval stays byte-identical to v0.41.0. Structure says what can be related; synapses say what actually gets used together — a static index can copy the structure, not the fusion. No new extraction, no schema bump; killable with NEURALMIND_STRUCTURAL=0. Release notes →
Reuse-vs-rewrite feedback loop and a structured relevance sidecar. Two features that make NeuralMind's half of a modular agent stack real — the retrieval layer now learns from what the agent did, and emits the relevance signal it already computes. (1) Reuse-vs-rewrite feedback — a new Edit/Write PostToolUse hook (edit-activity) detects when new code reaches for existing graph symbols (reuse) and feeds that back into the synapse layer, so future retrieval prefers what was actually reused; the implicit complement to v0.38.0's explicit neuralmind_feedback MCP tool. Language-agnostic, never forces a build, fails open; off-switch NEURALMIND_REUSE_FEEDBACK=0. (2) Structured relevance sidecar — retrieval can attach a machine-readable relevance block (per-file, per-node vector score / synapse boost / recall flag + line spans, built from post-boost L3 hits) via neuralmind_query(include_relevance=true) (MCP) or neuralmind query --relevance (CLI), so a downstream compressor can protect the load-bearing spans; versioned and stably-keyed, so it's order-independent. Both opt-in; default retrieval is unchanged. Release notes →
Schema artifact indexing: OpenAPI, SQL, and Protocol Buffers. NeuralMind now indexes non-code schema artifacts alongside source. (1) OpenAPI/AsyncAPI (.yaml/.yml) — one node per path+method (POST /payments/charge), one per schema component (schema:Payment), one per AsyncAPI channel; plain YAML config files silently skipped. (2) SQL DDL (.sql) — one node per CREATE TABLE/VIEW/PROCEDURE/FUNCTION/TRIGGER/INDEX/TYPE. (3) Protocol Buffers (.proto) — one node per message, service, rpc, and enum. All three use the existing document node type; neuralmind_query and neuralmind_search surface them automatically — no new tools, no config change. Synapse layer learns cross-artifact associations automatically. Release notes →
Trust, transparency, and quality — six improvements in one release. (1) neuralmind build --dry-run — scans the project and reports estimated token savings before touching the index; safe for CI gating. (2) Faster synapse decay on file deletion — the file watcher now fires decay_node() immediately when a file is removed, so stale memory never outlasts the code that created it. (3) neuralmind query --explain — structured trace of how the L0–L3 budget was spent, communities loaded, top search hits, and synapses that fired. (4) neuralmind review — diff-aware co-break detection via spreading activation from git diff changed nodes; also available as the neuralmind_review MCP tool. (5) neuralmind savings — cumulative token savings dashboard from the opt-in JSONL event log. (6) neuralmind probe now queries by rationale — the label-free self-test uses each symbol's docstring/intent as the query (not its name), turning a string-match near-tautology into a genuine NL→code measurement. Release notes →
Hybrid search, explicit feedback, and CI auto-index. Three retrieval-quality improvements: (1) BM25 hybrid search — a code-aware keyword index (camelCase/snake_case split) built alongside the vector store and merged via Reciprocal Rank Fusion, so "UserService" queries score exact-name matches first; budget-neutral; toggle off with NEURALMIND_BM25=0. (2) neuralmind_feedback MCP tool — explicit positive/negative signal on a retrieved node: positive fires immediate Hebbian reinforcement; negative applies a targeted decay tick (LTP-protected edges never fully removed). (3) CI auto-index GitHub Action (.github/workflows/neuralmind-autoindex.yml) — auto-builds index on push, caches .neuralmind/, and commits updated team memory; no secrets, 100% local. Release notes →
Multi-language: PHP. The built-in tree-sitter backend now indexes PHP (.php) out of the box, taking the bundled producer to ten languages — Python, TypeScript, Go, Rust, Java, C, C++, C#, Ruby, and PHP — and completing the C#/Ruby/PHP breadth tier. class/interface/trait/enum become type nodes; methods and top-level functions become function nodes; properties (the $ stripped from the label), class constants, and enum cases become code nodes; extends/implements resolve to inherits edges; use namespace imports resolve to imports_from edges (by class name, exactly like Java imports); and /** */ doc comments feed the rationale layer. Behind the same _SUFFIX_LANG → _EXTRACTORS seam, proven at parity by the CI gate (54/54 symbols, 100% structural coverage, zero dangling edges). PHP maps almost 1:1 onto the proven Java extractor plus a namespace layer; calls are best-effort and disclosed honestly (no $obj->method receiver-type resolution; require/include path imports aren't modelled — use is the edge source; trait-use-inside-a-class-body isn't modelled as inheritance). Release notes →
Multi-language: Ruby. The built-in tree-sitter backend now indexes Ruby (.rb) out of the box, taking the bundled producer to nine languages — Python, TypeScript, Go, Rust, Java, C, C++, C#, and Ruby. class/module become type nodes; def/def self. methods become function nodes; constant assignments (e.g. ATTEMPTS = 3) become code nodes; class Foo < Bar resolves to inherits edges; require_relative resolves to imports_from edges (relative-path resolved); and # doc comments feed the rationale layer. Behind the same _SUFFIX_LANG → _EXTRACTORS seam, proven at parity by the CI gate (46/46 symbols, 100% structural coverage, zero dangling edges). Ruby is dynamic, so calls are best-effort and disclosed honestly (no receiver-type resolution; mixins via include/extend aren't modelled as inheritance; attr_accessor accessors/ivars aren't emitted as fields — constants are the symbol layer). Release notes →
Multi-language: C#. The built-in tree-sitter backend now indexes C# (.cs) out of the box, taking the bundled producer to eight languages — Python, TypeScript, Go, Rust, Java, C, C++, and C#. class/interface/struct/record/enum become type nodes; methods/constructors become function nodes; fields, properties, and enum members become code nodes; base_list resolves to inherits edges; using directives resolve to imports_from edges; and /// doc comments feed the rationale layer (calls are bare-name best-effort). Behind the same _SUFFIX_LANG → _EXTRACTORS seam, proven at parity by the CI gate (52/52 symbols, 100% structural coverage, zero dangling edges). C# maps almost 1:1 onto the proven Java extractor, so it rides a proven shape at the smallest risk. Release notes →
Answerability, not just findability. Gold-file recall measures whether the right file lands in the window — locating, not answering. The new opt-in answerability arm (python -m evals.public.run --judge) closes that gap: for each query it takes the real context each backend would put in the window (whole files for full-file/ripgrep, retrieved chunks for embedding-rag, the compact L0–L3 assembly for neuralmind), asks a pinned model (claude-opus-4-8) to answer using only that context (it must say "insufficient context" otherwise), then a separate judge call grades the answer against the same def-site gold anchor on a 0–2 scale plus a grounded flag. Hard to dismiss: same prompts + same pinned model for every backend (a low-recall window scores low instead of being papered over from prior knowledge); the answerer prompt, judge rubric, model id, and every raw transcript are committed under bench/public/judge/. Off the deterministic path — needs ANTHROPIC_API_KEY, never runs in CI, recall table byte-identical with or without --judge. A clearly-labeled secondary signal; recall-at-N×-tokens stays the headline. Release notes →
The competitor head-to-head, run for real. The public benchmark's competitor row is no longer a scaffold — it's a live, reproducible head-to-head vs. codebase-memory-mcp 0.8.1 (the obvious incumbent) on the same pinned repos, same questions, same objective def-site gold, scored by the same quality.py as every other backend, at retrieval depth matched to embedding-rag (top-8). On reproducible retrieval ranking NeuralMind hits 100% gold-file recall and ranks the right file far higher (MRR 0.96 vs 0.23 on requests, 0.60 vs 0.50 on click) while the competitor surfaces the gold file only ~half the time, at an order of magnitude more read cost. Honest framing: this measures pure retrieval — no LLM agent loop on either side, exactly how we test NeuralMind's own search; we used the competitor's most-favorable reproducible keyword mapping; and we cite its published LLM-agent numbers (~90% of an "Explorer" agent; C at 0.58) as-is rather than reproduce them. The win is on reproducible retrieval ranking, not their agent-driven figures. Off the default run — reproduce with pip install codebase-memory-mcp==0.8.1 (pins 0.8.1, no API key) and python -m evals.public.competitor. Release notes →
Multi-language: C and C++. The built-in tree-sitter backend now indexes C (.c/.h) and C++ (.cpp/.cc/.cxx + .hpp/.hh/.hxx) out of the box, taking the bundled producer to seven languages — Python, TypeScript, Go, Rust, Java, C, and C++. Functions, struct/union/enum (+ fields and constants), typedefs, C++ classes with member methods/fields, and namespace-qualified ids become code nodes; #include "local.h" resolves to imports_from edges; C++ base classes become inherits edges; and foo.h/foo.c pair onto a shared module key so a declaration and its definition land in the same neighborhood. Behind the same SUPPORTED_SUFFIXES seam, proven at parity by the CI gate (100% symbol coverage, zero dangling edges). Honest scope: macros aren't indexed as symbols, templates aren't specialized, and #ifdef isn't evaluated — we index the parseable code at full parity and disclose what's out (a competitor advertising 158 languages scored 0.58 on C). Release notes →
The honest public benchmark. The "40–70× fewer tokens" claim now ships with reproducible evidence built to survive hostile scrutiny. neuralmind benchmark --public clones real, pinned OSS repos (requests @0e322af877, click @874ca2bc1c) and scores cost and correctness together against full-file paste, ripgrep, and a same-encoder vector RAG. Result: 100% gold-file recall (objective def-site oracle, no LLM judge) at 38–85× fewer tokens than pasting files, beating ripgrep on both recall and cost. Reported honestly: a well-tuned vector RAG is also strong at findability — credibility comes from showing the losses, not just the wins. Synapse injection is OFF for a fixed reproducible number (the +11.7pt learning lift is measured separately); forkable runner + raw data committed. Run it from a source checkout — the evals/public harness ships in the repo, not the pip wheel. Release notes →
Team memory: agents inherit each other's intuition. NeuralMind's synapse layer learns what code goes with what from how you work; v0.30 lets a team commit that learned signal so every teammate's agent inherits it automatically. neuralmind memory publish writes a committed .neuralmind-team-memory.json; on a teammate's next session/build it's imported once into the shared namespace (content-hash-gated, shared-only, off-switch NEURALMIND_TEAM_MEMORY=0, fail-open). A fresh git clone starts with the team's earned intuition — zero setup, 100% local, no source in the bundle. The differentiator a static code-index can't copy. Release notes →
ChromaDB-free by default. On mainstream platforms (Linux, Apple Silicon, Windows x64), pip install neuralmind no longer pulls ChromaDB — the default is the ChromaDB-free turbovec/ONNX backend (byte-identical embeddings), removing ChromaDB's dependency tree and CVE surface from the default. The backend is platform-gated by wheel availability, so the install never breaks: Intel macOS / Windows ARM auto-install ChromaDB as a transparent fallback. ChromaDB is one opt-in away (pip install "neuralmind[chromadb]", then backend: graph). Retrieval is unchanged; a previously chroma-indexed repo auto-reindexes once into turbovec (old index kept as a fallback). Honest framing: ChromaDB-tree-free, not "smaller" — it trades the sprawl for one focused native dep (onnxruntime). Release notes →
Multi-language: Java. The built-in tree-sitter backend now indexes Java out of the box, taking the bundled producer to five languages — Python, TypeScript, Go, Rust, and Java. Classes, interfaces, enums, records, methods, constructors, fields, and enum constants become code nodes; extends/implements become inherits edges; import statements resolve to imports_from edges by fully-qualified name; Javadoc becomes the rationale layer. Behind the same SUPPORTED_SUFFIXES seam, proven at parity by the CI gate (100% symbol coverage, zero dangling edges). Release notes →
Multi-language: Rust. The built-in tree-sitter backend now indexes Rust out of the box, taking the bundled producer to four languages — Python, TypeScript, Go, and Rust — indexed in one pass. Structs, enums, traits, impl methods, struct fields, enum variants, and free functions become code nodes; impl Trait for Type becomes an inherits edge; use paths resolve to imports_from edges; //////! doc comments become the rationale layer; and target/ is skipped like node_modules. All behind the same SUPPORTED_SUFFIXES seam (nothing downstream of graph.json changed), proven at parity by the CI gate (100% symbol coverage on the reference fixture, zero dangling edges). Release notes →
The selector starts tuning itself. Phases 1–2 of the self-improvement engine: NeuralMind's memory now logs query and wakeup events with a session_id, and an opt-in tuner reads that signal back to adjust the selector's L2 recall depth — how many community summaries a query surfaces. It's driven by the re-query rate (consecutive same-session queries whose recalled communities overlap heavily mean the first one under-disclosed and the agent had to come back), persisted in the synapse store's meta table, with a transition-margin dampener that suppresses a widen when the directional-transition graph already predicts the next hop decisively. Off by default behind NEURALMIND_SELECTOR_AUTOTUNE=1 — with the flag unset, behavior is byte-identical to v0.25, zero extra hot-path I/O. New read-only neuralmind self-improve status. Release notes →
One learning system: the synapse layer. The old learned_patterns cooccurrence reranker is removed and neuralmind learn becomes an exit-0 deprecation no-op. The Hebbian synapse layer — which already learns continuously from queries, edits, and tool calls, and lets unused edges decay — is now the single learning signal. A 2×2 A/B on the benchmark fixture showed the reranker moved top-k hit rate by 0.0 points whether synapses were on or off (71.7% → 71.7% cold, 83.3% → 83.3% warm), while the synapse layer alone adds +11.6 points. Warm-path behavior is unchanged; the only visible difference is that L3 output no longer prints reranker (+X.XX boost) labels (synapse labels stay). Release notes →
Memory namespaces & branch isolation. The synapse layer becomes namespace-aware: branch:<name> / personal / shared / ephemeral memory live separately in the same store, so a feature-branch spike can't pollute what the agent learned about main. Recall reads a transparent merged view (active branch 1.0× > personal 0.8× > shared team baseline 0.5×, attributed per-namespace in query --trace), and the new neuralmind memory {inspect,reset,export,import} moves memory as versioned JSON bundles — the team-memory on-ramp. Existing learned memory migrates losslessly into personal. Release notes →
Four future-proofing foundations: a schema-versioned index contract (IR) checked by the new neuralmind validate, a retrieval-quality harness (benchmark --quality: precision@k / recall@k / MRR over 30 golden queries, failing CI on regression), debug traces (query --trace shows why a result came back), and an experimental local daemon that keeps project state warm. Release notes →
ChromaDB-free by default. import neuralmind no longer requires ChromaDB; the default auto backend prefers turbovec when its deps are installed, with a one-time auto-reindex and chroma fallback — nothing deleted. Release notes →
ChromaDB-free retrieval. The turbovec backend pairs TurboQuant compressed indexing (8–16× smaller vectors) with bundled ONNX embeddings byte-identical to ChromaDB's, at/above retrieval parity (fact-recall 0.744 → 0.800). Release notes →
Measured onboarding lift. neuralmind eval --onboarding turns the headline differentiator into a number: a deterministic +6.5-point top-k lift from inheriting a committed team memory, budget-neutral, gated in CI. Release notes →
One-command MCP setup. neuralmind install-mcp --all auto-detects Claude Code, Cursor, Cline, and Claude Desktop and registers the MCP server with each — non-destructive, idempotent. Release notes →
Documentation
First-time setup for all platforms.
All commands and flags.
Always-on services, cloud sync, CI/CD.
Walkthroughs, from cost optimization to air-gapped installs.
Common issues & solutions.
NIST AI RMF, SOC 2, GDPR claims in one page.