NEXO Brain
Cognitive memory for AI agents. Open source. Free. Created by the WAzion team.
AGPL-3.0 License • npm • Official website • GitHub
Why we created it
Building WAzion as a single person meant working with AI agents every day. But every time you logged out, the agent forgot everything. The same corrections, the same mistakes, starting from scratch every morning.
We needed an agent that could remember. That could learn from its mistakes. That could detect when it was about to repeat something it had failed at before. That could maintain continuity between sessions as if it were the same person.
This is how NEXO Brain was born: a cognitive memory system modeled after how human memory works.
How it works
NEXO Brain implements the Atkinson-Shiffrin memory model of cognitive psychology, the same model that explains how human memory works:
Sensory Register
Capture everything that happens in the session. Discard the noise in 30 seconds. Only the relevant information moves to the next level.
Short-Term Memory
It keeps the active work context. With rehearsal (repeated use), memories are reinforced. Without use, they naturally degrade following Ebbinghaus’s curve.
Long-Term Memory
Searchable semantic vectors by meaning. Similar memories merge discriminatively: they preserve what differs, unite what overlaps. Permanent.
What it includes
More than 100 MCP tools
Sessions, memory, learning, credentials, guard, preferences, entities, episodic diary, and more. All presented as MCP tools, extensible via plugins.
Semantic search RAG
Vectors with fastembed (768 dimensions). Hybrid semantic search + BM25, reranking by cross-encoder and multi-query. Relevant results in milliseconds.
Trust Score
Alignment index 0-100 that reflects the quality of the agent’s work. Corrections lower it, successes raise it. It controls internal rigor.
Metacognitive guard
Before editing code, the guard injects known errors, real schemas, and blocking rules. It prevents repeating past mistakes.
Cognitive dissonance
Detect when a new instruction contradicts a strong memory. Instead of silently overwriting, ask.
100% local
Everything in local SQLite. Vectors are computed on your machine with ONNX Runtime. Nothing leaves your computer. Zero cloud dependencies.
Knowledge Graph
Bi-temporal graph of entities and relationships. Temporal queries, BFS traversal, intelligent deduplication with event sourcing, and interactive visualization D3.js.
Web Dashboard
Visual interface with 6 pages: Overview, Graph, Memory, Somatic, Adaptive, and Sessions. FastAPI + D3.js on localhost:6174. See your agent’s brain in real time.
Multiplatform
Full support for Linux and Windows. The installer detects the platform and configures the appropriate process manager. Opportunistic maintenance when resources are available.
Context Continuity
Smart self-compaction of the session context. When the context is at its limit, NEXO Brain automatically consolidates the active history into a semantic summary without losing the thread of work.
Real benchmarks
Measured on the real cognitive system of NEXO. No synthetic dataset, no laboratory — real production.
Hybrid search
Combine semantic vector search with BM25 (term frequency). Find memories both by meaning and by exact keywords.
Cross-encoder reranking
After retrieving candidates, a second model reorders them by actual relevance to the query. The correct results rise, the noise decreases.
Multi-query expansion
A single question automatically generates multiple search variations. It captures relevant memories even if they are phrased differently.
Intelligent chunking
Long memories are divided into overlapping fragments. Each fragment is retrievable independently without losing context.
Resúmenes de sesiones
Automatic summaries of previous sessions indexed as memories. The agent retrieves the thread of past conversations without re-reading all the logs.
768 dimensions
768-dimensional embeddings (was 384). Greater semantic capacity, better discrimination between similar concepts, without increasing external dependencies.
Episodic memory
Session diary, change log, decision log, and semantic recall. The agent knows what it did, why, and with what result.
Daily and weekly summary
Automatic summary of patterns, recurring errors, and areas for improvement. The agent learns between sessions, not just within them.
Sentiment detection
Automatic analysis of the user’s tone in each interaction. The agent adjusts its behavior according to the detected emotional state.
Resolution of dissonance
When a new instruction contradicts a strong memory, the agent detects it, verbalizes it, and asks before overwriting.
Metacognitive guard
Before editing code, the guard injects known errors and blocking rules. Target repeated error rate: <15%. 93.3% adversarial rejection.
Adaptive Trust Score
Alignment index that adjusts the internal rigor of the agent. High score = fluid mode. Low score = more checks and caution.
Discriminative fusion of memories
Similar memories merge while preserving what differs. It avoids duplicates and reduces cognitive noise without losing nuances.
Ebbinghaus adaptive decay
Unused memories degrade following the curve of human forgetting. Rehearsal reinforces them. Only the relevant survives.
Hot-reload plugin
Add or remove capabilities at runtime without restarting the MCP server. Extensible architecture by design.
Temporal indexing
Memories are indexed with timestamps to allow searches by time range. Retrieve what happened in a specific week or in the last N days.
Learned Weights
The weights of the signals learn from real feedback via Ridge regression. Shadow mode, momentum, auto-rollback.
Somatic Markers
Memory of pain by file and area. The guard warns in HIGH RISK and CRITICAL files. Validated recovery.
Personality of 6 signals
Vibe, corrections, brevity, topic, tool errors, git diff. Emergency bypass. Severity decay.
Self-migration
Automatic migration of previous cognitive databases to the new 768-dimensional schema. No data loss or manual intervention.
SQLite thread-safe
Serialized writings, stress-tested at 100%. No corruption under concurrent load.
Cross-platform (Linux + Windows)
Identical installation on macOS, Linux, and Windows. The same MCP server, the same cognitive database, without manual adjustments.
Immune system (circuit breakers + watchdog)
Circuit breakers cut off failed operations before they cascade. Watchdog restarts crashed processes. The agent recovers on its own without human intervention.
Reflection engine
Before acting, the agent checks for previous errors, actual schemes, and blocking rules. Then, it records the change and creates verification follow-ups. Complete self-verification loop.
Automatic weekly evolution
Every week the system analyzes its own error patterns, proposes improvements to its rules, and applies them if they are approved. The agent improves its behavior between sessions without manual intervention.
Complete orchestration (5 hooks)
5 session hooks: SessionStart, PreToolCall, PostToolCall, Stop, SubagentStop. Each hook automatically triggers memory, heartbeat, guard, and daily briefing.
Installation
A command. 60 seconds. Your agent has memory.
Requires Python 3.10+ and Claude Code. The installer sets everything up automatically: MCP server, databases, cognitive maintenance processes.
Open source for everyone
NEXO Brain is open source under the AGPL-3.0 license. We make it available to any developer, team, or company that wants to give real memory to their AI agents.