Superhuman cognitive architecture for your AI agents—without needing to be a brain surgeon to understand or operate it.
Most AI coding tools force an impossible trade-off: either settle for flat markdown files (AGENTS.md, MEMORY.md, TODO.md) that your agent forgets or ignores the moment context compacts, or spend weeks manually wiring vector databases, graph engines, AST indexers, and custom git hooks.
NeuroStrata eliminates that trade-off.
Through one unified MCP interface, NeuroStrata gives your coding agents six distinct ways to think, remember, plan, and verify work—combining an embedded vector & property graph database, a six-language Tree-sitter AST software graph, a W3C RDF/SPARQL/SHACL semantic layer with RDFS/OWL closure, three alternative deterministic retrieval surfaces, digital-twin state versioning, and binary-enforced task gates.
And here is the best part: 100% of it is automated. Your agent installs the plugins, wires the hooks, builds the knowledge graph, propagates context to every subagent, enforces its own completion gates, and upgrades itself across versions—with zero manual configuration from you.
👉 Explore the Complete Feature & Benefit Catalog (docs/features-api/feature-catalog.md)
Every time you start a new session, switch worktrees, or compact context, ordinary agents get amnesia. NeuroStrata gives them a persistent Tri-Strata Memory (Global, Project Domain, and Task Working Memory):
- Three Retrieval Surfaces, Not One Fused Pipeline: A query runs on one of three surfaces, chosen with the
modeargument — LadybugDB HNSW vector search (the default,NomicEmbedTextV15at 768 dims), Tantivy full-text search, or the in-house 5-field BM25 scorer — followed by a bounded 1–2 hop graph expansion overGOVERNS/RELATES_TO/CONTAINS/DEPENDS_ON/EXTRACTED_FROMedges. The surfaces are alternatives; their scores are never fused. There is no rank fusion, no Personalized PageRank, and no neural reranker. - Negative Exemplars (Never Repeat a Dead End): Failed approaches are stored as first-class evidence (
outcome: "failed"), so future sessions immediately see what didn't work and why. - Procedural Memory (Habits with Rehearsal Budgets): Recurring routines (
session-start,before-edit,after-mutation) fire automatically as tracked procedures (neurostrata_procedure_perform) until they become ingrained.
Instead of burning tokens on blind grep loops and breaking callers three files away, your agent thinks in terms of live software structure:
- Unified Six-Language AST + Rule Graph: Incremental Tree-sitter parsing (Rust, TypeScript, TSX, Python, Go, Java) links functions, structs, classes, and imports directly to the architectural
[rule]memories that govern them (GOVERNS,DEPENDS_ON,calls,imports). - Automatic Graph-First Reflex: Before editing a file, one deterministic lookup (
neurostrata_memories_for_file, withinclude_ast_edgesfor the call-graph and blast radius) reveals every governing constraint and the transitive upstream/downstream impact.
Vector similarity is great for concepts, but terrible for strict invariants. NeuroStrata embeds a native W3C Semantic Web engine (oxrdf / oxttl for the quads, spargebra for SPARQL 1.1, shacl for shapes) alongside its property graph:
- SPARQL 1.1 Queries (
SELECT/ASK/CONSTRUCT): Agents run exact multi-hop logical queries across code symbols, tasks, and domain rules (neurostrata_sparql_query). - RDFS/OWL Closure & SHACL Closed-World Validation: Automatically materializes transitive
subPropertyOfand subclass closure (plus thebroaderrelation between domain slugs) and validates memory/graph writes against strict structural shapes. The closure is computed inside the store; there is no separateneurostrata_owl_reasontool.
Prompts get rationalized away; binary locks do not. NeuroStrata's Central Executive governs the entire work lifecycle through Three Resilient Soft Locks:
- Zero-Action Start: Agents are mechanically blocked from editing files or running mutating commands until they call
neurostrata_get_snapshotand claim an active task (neurostrata_task_claim). - Lock 3 — The Breath Working-Memory Prompt: Every 3–5 mutation steps, the agent pauses and records a state checkpoint on the task (
neurostrata_task_update) so crash recovery is instant. - Lock 2 — Done-Funnel Mandatory Extraction: A task cannot transition to
done(neurostrata_task_complete) unless the agent extracts at least one architectural rule or lesson into permanent memory. Every finished task makes the system smarter. - Lock 1 — Pre-Push Git Gate:
git pushrunsneurostrata-mcp task gate <namespace> --strict. Anyin_progresstask, anydonetask without an extracted memory, or any P0 task open for more than 24 hours blocks the push automatically. Deferral wording is caught separately by the lexical task-intent detector, which nudges the agent to file a tracked task instead of letting it evaporate; the vocabulary it detects is listed in the feature catalog.
When an orchestrator delegates to a subagent (worker, checker, craftsman, Task), context normally evaporates. NeuroStrata makes context propagation automatic:
- Auto-Retrieved Subagent Injection (
subagent_prompt_injection): Creating or claiming a task automatically runs a hybrid vector + 1-hop graph search and returns a ready-to-pastesubagent_prompt_injectionblock containing the active Goal, governing[rule]constraints, and AST neighbors. - Zero-Dependency Harness Interception: Embedded plugins for OpenCode, Claude Code, Hermes Agent, OpenAI Codex CLI, GitHub Copilot CLI, and OpenClaw automatically prepend that context block into every spawned subagent call.
- Brokerless Team Sync (
SynapticMesh): Share approved rules and procedures across machines and teammates over standardgit pushandgit pull --ff-onlywhile keeping private memories sovereign on your disk.
- Digital Twins & Neuroplasticity Telemetry: Agents model complex system state with versioned Digital Twins (
neurostrata_twin_set,neurostrata_twin_get,neurostrata_twin_list,neurostrata_twin_diff) and read rolling time-series performance summaries (neurostrata_metrics_query,neurostrata_metrics_list). - Prefrontal Cortex Safety Sandbox: Proposed shell commands and file edits are evaluated against semantic
guard_rulememories (neurostrata_guard_validate) and dry-run inside an ephemeral, rootlesspodman --network=nonecontainer with the workspace mounted read-only, before touching your real filesystem.
All of that cognitive machinery lives inside one self-managing binary. There is no Docker Compose stack, no Python virtualenv to babysit, no YAML configuration labyrinth, and no manual database maintenance.
No plugin build step needed for a fresh checkout.
src/task/harness_plugins.rsembedsplugins/opencode/dist/index.jswithinclude_str!, and that bundle is tracked in the repository, so it is present on a fresh clone and the Rust build compiles without any manual step. The CI include-str guard runs before the first compiling step to assert the bundle exists.
Rebuilding the OpenCode plugin. If you edit plugin sources under
plugins/opencode/, you must rebuild the bundle and commit it before the change ships — the Rust binary embeds the committeddist/index.js, not the source. From the repository root:(cd plugins/opencode && npm install && npm run build)This step needs Node 18 or newer (the plugin declares
engines >= 18). The same applies to every other embedded plugin underplugins/— each one ships a trackeddist/bundle that the Rust binary embeds.
# 1. Build and install the single Rust binary (includes embedded LadybugDB + Tantivy + FastEmbed ONNX)
scripts/build.sh
# 2. Register and start the local loopback daemon (127.0.0.1:34343)
neurostrata-mcp setupOpen your AI coding agent in any repository (new or existing) and say:
"Initialize NeuroStrata for this project."
NeuroStrata and your agent handle everything else automatically:
- Calls
neurostrata_bootstrap(new repo) orneurostrata_task_setup(existing repo). - Auto-detects your active CLI/terminal harness (OpenCode, Claude Code, Hermes, Codex CLI, GitHub Copilot CLI, or OpenClaw), extracts and wires the embedded zero-dependency plugin under
.NeuroStrata/plugins/<harness>/, installs theneurostrataskill (.agents/skills/neurostrata/SKILL.md+ global harness skill dir), and patches existing subagent.mddefinitions with the Graph-First &subagent_prompt_injectionrules. - Installs and activates both
.git/hooks/pre-commit(graph-query ledger) and.git/hooks/pre-push(strict task gate + SynapticMesh sync). - Scans your repository, ingests the multi-language AST graph, and seeds your initial architectural rules.
When a new version of NeuroStrata ships, replace the binary (scripts/build.sh or download the release binary) and keep working. On the very next session start (neurostrata_get_snapshot), NeuroStrata automatically detects the version delta, upgrades your git hooks, refreshes your harness plugins and skills, backfills schema defaults, and reconciles any new lifecycle wires.
For the complete 12-part breakdown of every subsystem, tool, and code reference, see
docs/features-api/feature-catalog.md.
| Subsystem | How It Helps Agents Think & Work | Deep-Dive Docs |
|---|---|---|
| Zero-Touch Harness Auto-Installer | Auto-detects and wires plugins, skills (SKILL.md), and subagent rules for OpenCode, Claude Code, Hermes, Codex CLI, GitHub Copilot CLI, and OpenClaw. |
Features §1–2 |
| Graph-First & Subagent Injection | Auto-retrieves vector + 1-hop AST/rule context on task claim and injects subagent_prompt_injection into every spawned subagent. |
Features §3 |
| Central Executive (Tasks & 3 Soft Locks) | Zero-Action Start, Lock 3 Breath checkpoints, Lock 2 Done-Funnel (mandatory memory extraction), Lock 1 Pre-Push Gate, and lexical TODO detection. |
Central Executive |
| Memory Core (SynapticGraph) | Embedded LadybugDB vector + graph store, three alternative retrieval surfaces (HNSW vector, Tantivy full-text, in-house BM25) with bounded graph expansion, negative exemplars, and Leiden communities. | SynapticGraph · Tri-Strata |
| Six-Language AST & Impact Graph | Incremental Tree-sitter AST ingestion for six languages, call-graph and blast-radius summaries, and GLiNER entity extraction. | Features §6 |
| W3C Semantic Graph | Native RDF quad projection, SPARQL 1.1 queries (SELECT/ASK/CONSTRUCT), RDFS/OWL closure, and closed-world SHACL validation. |
Features §7 |
| Prefrontal Cortex (Safety Guard) | Semantic rule matching against guard_rule memories + rootless podman --network=none dry-run sandbox before disk mutation. |
Prefrontal Cortex |
| Digital Twins & Telemetry | Versioned state modeling and structural diffs (neurostrata_twin_set / _get / _list / _diff), and rolling time-series metrics (neurostrata_metrics_query / _list). |
Features §9 |
| Procedural Memory & Laya Judge | Triggered habits with finite rehearsal budgets (neurostrata_procedure_perform) + local trainable Laya duplicate/contradiction judgment. |
Procedural Memory · Judgment |
| SynapticMesh (Git Team Sync) | Brokerless team memory sharing over standard git push / git pull --ff-only with sovereign private rows and visible conflict resolution. |
Features §11 |
| Thalamic Bus & Security | In-process pub/sub bus, rolling 500 KB episodic session logs, fail-closed secret rejection, caller-path authority (J6), and shipped Vault-LD Markdown sync across MCP, CLI, and HTTP (neurostrata_vault_sync; see Obsidian). |
Thalamic Bus · Security · Obsidian |
- Documentation Index: NeuroStrata Documentation Hub (
docs/README.md) · Complete Feature & Benefit Catalog (docs/features-api/feature-catalog.md) - Architecture & Cognitive Science: Cognitive Architecture · SynapticGraph Engine · Tri-Strata Isolation · Why Agent Memory Fails · Nomenclature
- Cognitive Organs: Central Executive · Prefrontal Cortex · Dendritic Bridge (Embedders) · Thalamic Bus · Procedural Memory
- Operations & Reference: Zero-Touch Upgrading · CLI Reference · Security & OWASP Mitigations · SynapticMesh Team Sync · Obsidian & NeuroVault (planned) · Crash & WAL Recovery · Visual UI Guide · Building from Source · Release Changelogs
- Runtime memory knobs:
NEUROSTRATA_EMBED_ARENAdefaults off (1opts in to ONNX Runtime's CPU memory arena);NEUROSTRATA_BUFFER_POOL_MBdefaults to384MiB (0uses the engine's uncapped default; any other value below the 128 MiB floor is raised to that floor, and an unparseable value falls back to the configuredstorage_hygiene.buffer_pool_mbvalue (treated the same way)); both are documented in Building from Source (neurostrata-igg4). - Contributing: Contributing Guide (
CONTRIBUTING.md) · Agent Rules (AGENTS.md)
We welcome contributions from humans and AI agents alike. NeuroStrata dogfoods its own Spec-Driven Development workflow and memory/task gates, so every change starts with a tracked task and an approved spec.
See the Contributing Guide (CONTRIBUTING.md) for the full SDD workflow, TDD and verification gates, and infrastructure conventions. Agent contributors must also follow AGENTS.md.
MIT — LICENSE.



