v0.1.1 — Now available on npm

Cognitive Memory
for AI Agents

Give your AI agent a brain that remembers, learns, and protects itself from repeating mistakes. Built on the Atkinson-Shiffrin memory model.

$ npx nexo-brain init
76+
MCP Tools
16
Categories
384
Vector Dimensions
0
Data Sent Externally

Everything an AI agent needs to think

Not just storage — a complete cognitive architecture that learns, forgets naturally, detects conflicts, and prevents repeated mistakes.

🧠

Atkinson-Shiffrin Memory

Three-store model: Sensory Register captures raw input, STM holds working context with rehearsal, LTM consolidates with semantic vectors. Just like human cognition.

🔍

Semantic RAG

Vector search with fastembed (BAAI/bge-small-en-v1.5). Query across all memory stores with cosine similarity. Retrieve what matters, not just what matches.

🛡

Metacognitive Guard

Pre-edit checks that inject known errors, real schemas, and blocking rules before your agent writes code. Prevents repeating past mistakes.

📉

Ebbinghaus Decay

Memories naturally fade over time following the Ebbinghaus forgetting curve. Rehearsal strengthens important memories. No manual cleanup needed.

🤝

Trust Score

0-100 alignment index that adjusts based on corrections, successes, and proactive actions. Controls internal rigor: low trust = more paranoid checks.

Cognitive Dissonance

Detects when new instructions contradict existing strong memories. Surfaces the conflict and asks for resolution instead of silently overwriting.

📝

Episodic Memory

Change logs, decision records with alternatives and reasoning, session diaries with mental state continuity. Full audit trail of what happened and why.

🔌

Plugin System

Hot-reload plugins at runtime. Add new tool categories without restarting the server. Ship your own extensions as Python files.

🔒

100% Local

All data stored in local SQLite databases. Vectors computed on-device with ONNX Runtime. Nothing ever leaves your machine. Zero cloud dependencies.

How memory works

Based on the Atkinson-Shiffrin model from cognitive psychology, adapted for AI agents.

Sensory Register Raw input • 30s TTL • Attention filter
↓ rehearsal
Short-Term Memory Working context • Active rehearsal • Decay curve
↓ consolidation
Long-Term Memory Semantic vectors • Sister fusion • Permanent

Biologically inspired, practically engineered

Every piece of information flows through three stores, each with its own retention rules and access patterns.

  • Sensory Register captures everything, discards noise in 30 seconds
  • STM holds 7±2 active items with exponential decay
  • Rehearsal (retrieval, updates) resets decay timers
  • Consolidation promotes STM to LTM via semantic similarity
  • Sister memories fuse discriminatively: keep what differs, merge what overlaps
  • Ebbinghaus forgetting curve controls natural memory pruning

76+ MCP tools, 16 categories

Every aspect of cognitive operation exposed as MCP tools. Compatible with Claude Code and any MCP client.

8

Cognitive

RAG retrieve, trust, dissonance, sentiment, metrics

8

Episodic Memory

Change logs, decisions, session diaries, recall

5

Learnings

Error patterns, categorized, searchable

5

Entities

People, services, URLs, relationships

4

Reminders

Time-based alerts with priority levels

4

Followups

Deferred verification tasks

5

Credentials

Secure local credential storage

4

Preferences

Learned behavioral patterns

3

Guard

Pre-edit checks, blocking rules

4

Messaging

Inter-session communication

3

Sessions

Startup, heartbeat, coordination

3

Plugins

Hot-reload extensions at runtime

Up and running in 60 seconds

One command to install. NEXO Brain sets up the MCP server, SQLite databases, and cognitive engine automatically.

Terminal
# Install NEXO Brain
$ npx nexo-brain init

# That's it. Open Claude Code and your agent has memory.
# NEXO Brain auto-configures the MCP server.

# Verify it's working:
$ claude -p "call nexo_status"

# Optional: Start with a personality template
$ npx nexo-brain init --template operator

Give your agent a mind

Open source, MIT licensed, and built for builders who want their AI to actually remember.