Open source · MIT · v4.14.3

You don’t manage memory.
Cortex does.

Persistent memory for Claude Code — built on computational neuroscience, not guesswork. Memory that learns, consolidates, forgets intelligently, and surfaces the right context at the right time. 36 cited neuroscience mechanisms. 50 MCP tools. 9 automatic hooks. Native AST call-graph via automatised-pipeline. 97-paper bibliography. 98.20% recall. No GPU.

> /plugin marketplace add cdeust/Cortex
> /plugin install cortex@cortex-plugins

Local-first — SQLite by default. PostgreSQL 15+ with pgvector + pg_trgm optional for larger corpora.

// plugin · cortex-viz · v2.6.3

cortex-viz — six reading angles, one memory store

A separate, read-only companion plugin. Reads Cortex's shared PostgreSQL store read-only; it never writes memories. Renders Graph, an anatomical 3D brain view (MNI152-registered cortical mesh), Trace, Knowledge, Wiki, and Board — filterable by domain, emotion, consolidation stage.

/plugin marketplace add cdeust/Cortex then /plugin install cortex-viz@cortex-plugins (same marketplace as Cortex).

State-of-the-art recall. Verified on the release tree.

Tested against published academic benchmarks with retrieval-only metrics — no LLM reader in the evaluation loop. Verified on the exact v4.14.3 release tree.

98.20% Recall@10 · LongMemEval-S
0.9166 MRR · LongMemEval-S
91.35% Recall@10 · LoCoMo
97 Paper bibliography
BenchmarkScoreNotes
LongMemEval-S (ICLR 2025)98.20% R@10, 0.9166 MRR500 questions, ~115K tokens — +19.8pp vs paper best (78.4%)
LoCoMo (ACL 2024)91.35% R@10, 0.7998 MRR1,986 questions, 10 conversations — 3-run mean
BEAM-100K (ICLR 2026)0.5417 MRRRetrieval proxy — not gated by check_floors, no head-to-head BEAM claim

All benchmarks use retrieval-only metrics. High retrieval MRR bounds downstream QA regardless of reader model.

Memory is invisible.

You don’t manage memory. Cortex does. Every lifecycle stage is automatic.

Session start

Hot memories, anchored decisions, and team context inject automatically. No manual recall needed.

During work

PostToolUse hooks capture significant actions. Decisions auto-detect and protect from forgetting. File edits prime related memories via spreading activation.

Session end

A “dream” cycle runs automatically: decay old memories, compress verbose ones, consolidate episodic into semantic knowledge (CLS).

Between sessions

Memories cool naturally (Ebbinghaus forgetting curve). Important ones stay hot. Protected decisions never decay.

Retrieval pipeline

Signals fused server-side, then reranked client-side via FlashRank.

SignalSourcePaper
Vector similaritypgvector HNSW / sqlite-vecBruch et al. 2023
Full-text searchtsvector + ts_rank_cd / FTS5Bruch et al. 2023
Trigram similaritypg_trgmBruch et al. 2023
Thermodynamic heatEbbinghaus decay modelEbbinghaus 1885
RecencyExponential time decay

Cortex pairs with sister projects.

Cortex is the brain — persistent memory across sessions. Reasoning lives in zetetic-team-subagents. Codebase intelligence lives in automatised-pipeline. All install as independent Claude Code plugins, each in its own marketplace; all three speak to each other via the same MCP layer.

Memory

Cortex

This page. 50 MCP tools, 9 hooks, 36 neuroscience mechanisms, 97-paper bibliography. SQLite default, PostgreSQL + pgvector optional. Stores what you decided, why, and surfaces it back.

  • remember / recall
  • get_causal_chain · navigate_memory
  • open_visualization — drives cortex-viz
  • seed_project
Reasoning

zetetic-team-subagents

97 genius reasoning agents (Pearl, Peirce, Feynman, Dijkstra, Cochrane…) plus 22 team-role specialists = 119 total. 64 skills, 19 lifecycle hooks, 288 tests. Pre-commit hook blocks unsourced constants.

  • 97 reasoning patterns by primary source
  • 22 team-role specialists
  • Pre-commit hook: UNSOURCED / MAGIC_NUMBER / TODO_NO_REF
  • /plugin install zetetic-team-subagents
Code intelligence

automatised-pipeline

Rust MCP server. Indexes codebases across 10 languages into a property graph, resolves call chains across files, detects functional communities (Leiden-class), traces processes from entry points, builds hybrid BM25 + sparse TF-IDF + RRF search.

  • 24 MCP tools, 434 tests, 45,000+ lines Rust
  • 10 stages: extract, verify, graph, cluster, validate, security, semantic-diff
  • Read-only: never writes code, opens PRs, or runs CI
  • /plugin install automatised-pipeline

Specialization

Each agent in zetetic writes to its own topic in Cortex. Engineer’s debugging notes don’t clutter tester’s recall.

Transactive memory

Decisions auto-protect and propagate (Wegner 1987). When engineer decides “use Redis over Memcached,” every agent sees it next session.

Briefing

SubagentStart hook extracts task keywords, queries prior work, fetches team decisions, and injects as context prefix.

Code-aware

Cortex integrates AST symbols from automatised-pipeline. Symbols imported by two projects literally sit between them on the map.

36 cited neuroscience mechanisms. Zero GPU.

Every mechanism from computational neuroscience, implemented as pure server-side inference. No black-box magic — every constant cites a paper.

WRRF retrieval fusion

Vector similarity, full-text search, trigram matching, heat decay, temporal proximity, entity density, emotional resonance, access frequency, and consolidation state — fused server-side.

Surprise momentum

Test-time learning from Titans (Behrouz et al., NeurIPS 2025). Retrieval surprise modulates memory heat via EMA.

LTP / LTD / STDP

Long-term potentiation strengthens accessed memories. Long-term depression weakens neglected ones. Spike-timing-dependent plasticity adjusts Hebbian connection weights.

Coupled neuromodulation

Dopamine, norepinephrine, acetylcholine, serotonin — with cross-channel coupling (Doya 2002, Schultz 1997). Modulates encoding strength and retrieval priority.

Microglial pruning

Stale memories pruned during consolidation. Homeostatic plasticity and adaptive decay preserve important facts while cleaning noise.

Knowledge graph

Causal discovery builds a directed graph with Hebbian weights, facilitation/depression, and release probability. Navigate via Successor Representation BFS.

Cognitive profiling

Extracts your 12D reasoning signature — thinking style, entry patterns, blind spots, cross-domain bridges — and pre-loads it every session via EMA updates.

Sleep compute

Dream replay, interference resolution, CLS (episodic-to-semantic transfer), and engram competition. Background consolidation runs at session end.

Neural visualization

Interactive force-directed graph via the read-only cortex-viz companion. Node size encodes importance, heat is shown on a data-only scale, quality arcs show reliability.

50 MCP tools. Organized by function.

From simple remember/recall to knowledge-graph traversal and cognitive profiling. All via natural language in Claude Code.

Memory

Store & retrieve

  • remember
  • recall
  • recall_hierarchical
  • consolidate
  • checkpoint
  • forget
  • anchor
  • rate_memory
  • validate_memory
Navigation

Graph & profiling

  • navigate_memory
  • get_causal_chain
  • detect_gaps
  • drill_down
  • detect_domain
  • explore_features
  • query_methodology
  • memory_stats
Advanced

Wiki & automation

  • narrative
  • get_project_story
  • assess_coverage
  • create_trigger
  • add_rule
  • sync_instructions
  • seed_project
  • open_visualization

Five layers. Zero I/O in business logic.

Clean Architecture with strict inward-pointing dependencies. Retrieval fusion runs server-side.

LayerResponsibilityKey detail
CorePure business logicZero I/O, imports only shared/
InfrastructureAll I/OSQLite / PostgreSQL, embeddings, file system
HandlersComposition roots50 MCP tool handlers wiring core + infrastructure
HooksLifecycle automation9 hooks — SessionStart/End, PostToolUse, SubagentStart, PreCompact, secret-shield, etc.
SharedPure utilitiesPython stdlib only

97-paper bibliography. The zetetic standard.

Every algorithm, constant, and threshold traces to a published paper, a measured ablation, or a documented engineering source. Nothing is guessed.

Retrieval

Information retrieval

  • Bruch et al. “Fusion Functions” (2023)
  • Nogueira & Cho “Passage Re-ranking” (2019)
  • Collins & Loftus “Spreading Activation” (1975)
  • Joren et al. “Sufficient Context” (2025)
Encoding

Neuroscience — encoding

  • Friston “Cortical Responses” (2005)
  • Bastos et al. “Predictive Coding” (2012)
  • Wang & Bhatt “Emotional Modulation” (2024)
  • Doya “Metalearning” (2002)
  • Schultz “Prediction & Reward” (1997)
Plasticity

Plasticity & maintenance

  • Hebb (1949), Bi & Poo (1998)
  • Turrigiano “Self-Tuning Neuron” (2008)
  • Tse et al. “Schemas & Consolidation” (2007)
  • Wang et al. “Microglial Pruning” (2020)
  • Ebbinghaus Memory (1885)
  • … 97 papers total, see the release-tree bibliography
Consolidation

Consolidation

  • Kandel “Molecular Biology of Memory” (2001)
  • McClelland et al. “CLS” (1995)
  • Frey & Morris “Synaptic Tagging” (1997)
  • Josselyn & Tonegawa “Engrams” (2020)
  • Borbely “Two-Process Sleep” (1982)
Navigation

Retrieval & navigation

  • Behrouz et al. “Titans” (NeurIPS 2025)
  • Stachenfeld et al. “Predictive Map” (2017)
  • Ramsauer et al. “Hopfield Networks” (2021)
  • Kanerva “Hyperdimensional Computing” (2009)
Team

Team & preemptive

  • Wegner “Transactive Memory” (1987)
  • Zhang et al. “LLM Collaboration” (2024)
  • Bar “The Proactive Brain” (2007)
  • Smith & Vela “Context-Dependent” (2001)
  • McGaugh “Amygdala Modulates” (2004)
  • Adcock et al. “Reward-Motivated” (2006)

Ways to install.

Marketplace plugin, standalone MCP, setup script, or manual. Each gives you persistent memory for Claude Code.

Option A — Claude Code Marketplace (recommended)

> /plugin marketplace add cdeust/Cortex
> /plugin install cortex@cortex-plugins

Cortex ships as its own independent marketplace — no combined monorepo install. The same marketplace also carries the read-only cortex-viz companion: /plugin install cortex-viz@cortex-plugins. Restart your Claude Code session, then run /cortex-setup-project. This handles database creation, embedding model download, cognitive profile building from session history, codebase seeding, conversation import, and hook registration. Zero manual steps.

Option B — Standalone MCP (no plugin)

> claude mcp add cortex -- uvx --from "neuro-cortex-memory" neuro-cortex-memory

Adds Cortex as a standalone MCP server via uvx. No hooks, no skills — just the 50 MCP tools. Requires uv installed.

Option C — Clone + setup script

$ git clone https://github.com/cdeust/Cortex.git
$ cd Cortex
$ bash scripts/setup.sh        # macOS / Linux
$ python3 scripts/setup.py    # Windows / cross-platform

Installs SQLite by default; optionally PostgreSQL + pgvector (Homebrew on macOS, apt/dnf on Linux) for larger corpora, creates the database, downloads the embedding model (~100 MB). Restart Claude Code after setup.

Zetetic Agent Team (recommended companion)

> /plugin marketplace add cdeust/zetetic-team-subagents
> /plugin install zetetic-team-subagents

97 genius reasoning agents + 22 team-role specialists = 119 total. 64 skills, 19 hooks, 288 tests. Pre-commit hook blocks unsourced constants. Each agent integrates with Cortex memory automatically. Read more →

Configuration

VariableDefaultWhat it controls
DATABASE_URLsqlite (default) / postgresql://localhost:5432/cortexBackend connection string
CORTEX_RUNTIMEauto-detectedcli (strict) or cowork (SQLite fallback)
CORTEX_MEMORY_DECAY_FACTOR0.95Per-session heat decay rate
CORTEX_MEMORY_HOT_THRESHOLD0.7Heat level considered “hot”
CORTEX_MEMORY_WRRF_VECTOR_WEIGHT1.0Vector similarity weight in fusion
CORTEX_MEMORY_WRRF_FTS_WEIGHT0.5Full-text search weight in fusion
CORTEX_MEMORY_WRRF_HEAT_WEIGHT0.3Thermodynamic heat weight in fusion
CORTEX_MEMORY_DEFAULT_RECALL_LIMIT10Max memories returned per query

~40 tunable parameters total. See mcp_server/infrastructure/memory_config.py in the repo for the full list.

What gets installed

MCP server50 tools for memory, retrieval, profiling, navigation
SessionStart hookInjects anchors + hot memories + team decisions + checkpoint
UserPromptSubmit hookAuto-recalls relevant memories based on the user’s prompt
PostToolUse hooksAuto-captures significant actions; primes related memories via spreading activation
SessionEnd hookRuns the dream cycle: decay, compress, CLS based on activity
PreCompact hookSaves a checkpoint; restores context after compaction
SubagentStart hookBriefs spawned agents with prior work + team decisions
SkillsWorkflow guides (invoke via /cortex-*)

Skills

CommandWhat it does
/cortex-rememberStore a memory with full write gate
/cortex-recallSearch memories with intent-adaptive retrieval
/cortex-consolidateRun maintenance (decay, compress, CLS)
/cortex-explore-memoryNavigate memory by entity/domain
/cortex-navigate-knowledgeTraverse the knowledge graph
/cortex-debug-memoryDiagnose memory system health
/cortex-visualizeLaunch the neural graph via cortex-viz
/cortex-profileView cognitive methodology profile
/cortex-setup-projectBootstrap a new project
/cortex-developMemory-assisted development workflow
/cortex-automateCreate prospective triggers

Runs locally. No data leaves your machine.

MCP over stdio, database on localhost, visualization on 127.0.0.1.

PracticeDetail
SQL / query safetyAll queries parameterized; dynamic columns via safe identifier binding
Network behaviorEmbedding model download on first run only; cortex-viz binds 127.0.0.1
Data flowNo external data exfiltration; embeddings computed locally
Input validationPydantic validation on all MCP tool inputs; length limits enforced
Secrets management.env / credentials in .gitignore; secret-shield hook scans writes

A numeric third-party audit score is not currently published for this release tree — this table lists verifiable engineering practices instead of an unsourced grade.

Free & open source

MIT licensed. 5,000+ tests. 97-paper bibliography. Pairs with zetetic-team-subagents (119 reasoning agents) and automatised-pipeline (Rust codebase intelligence). Give your agent a brain.

Part of the engagement journey · Exhibit 02

Where Cortex fits in an engagement

Persistent memory is one of the instruments wired in during Claude Code activation — the 50 MCP tools above ship as part of that stage, then keep running through the paid pilot and the rollout you operate yourself.

Stage Exhibit 02 · Claude Code activation