Give your AI agent a brain that remembers, learns, and protects itself from repeating mistakes. F1 0.588 on LoCoMo — +55% vs GPT-4. Built on the Atkinson-Shiffrin memory model with 147+ MCP tools.
$ npx nexo-brain init
Three ways to connect NEXO Brain to your AI workflow. Same cognitive engine, different entry points.
Native Model Context Protocol server. Works with Claude Code, Claude Desktop, and any MCP-compatible client out of the box.
UniversalReplaces OpenClaw's default memory with full cognitive architecture. Deep integration with the agent lifecycle and tool registry.
OpenClawOne-click install from the ClawHub marketplace. Browse, install, and start using cognitive memory in seconds.
One-ClickNot just storage — a complete cognitive architecture that learns, forgets naturally, detects conflicts, and prevents repeated mistakes.
Three-store model: Sensory Register captures raw input, STM holds working context with rehearsal, LTM consolidates with semantic vectors. Just like human cognition.
Vector search with fastembed (BAAI/bge-base-en-v1.5). Query across all memory stores with cosine similarity. Retrieve what matters, not just what matches.
Pre-edit checks that inject known errors, real schemas, and blocking rules before your agent writes code. Prevents repeating past mistakes.
Memories naturally fade over time following the Ebbinghaus forgetting curve. Rehearsal strengthens important memories. No manual cleanup needed.
0-100 alignment index that adjusts based on corrections, successes, and proactive actions. Controls internal rigor: low trust = more paranoid checks.
Detects when new instructions contradict existing strong memories. Surfaces the conflict and asks for resolution instead of silently overwriting.
Change logs, decision records with alternatives and reasoning, session diaries with mental state continuity. Full audit trail of what happened and why.
Hot-reload plugins at runtime. Add new tool categories without restarting the server. Ship your own extensions as Python files.
All data stored in local SQLite databases. Vectors computed on-device with ONNX Runtime. Nothing ever leaves your machine. Zero cloud dependencies.
5-question onboarding that creates a unique agent personality. Your agent adopts a consistent voice, tone, and behavioral style from day one.
23 non-negotiable principles every NEXO agent follows. From memory hygiene to error prevention, the codex defines what it means to be a reliable co-operator. See the wiki.
Run NEXO Brain in a container with two commands. Mount your data directory, and the cognitive engine runs isolated and portable across any environment.
Complex questions are automatically split into sub-queries. Each component is retrieved independently, then fused for a higher-quality answer. Improves recall on multi-faceted prompts.
Adaptive chunking strategy that respects sentence and paragraph boundaries. Produces semantically coherent chunks instead of arbitrary token splits, reducing retrieval noise.
After initial vector retrieval, a cross-encoder model rescores candidates for precision. The top-k results are reordered by true semantic relevance before being returned to the agent.
Automatic end-of-session summarization that distills key decisions, errors, and follow-ups into a compact diary entry. The next session starts with full context, not a cold slate.
Combined vector + BM25 keyword search via SQLite FTS5. Best of both worlds: semantic understanding for concept-level retrieval plus exact keyword matching for precise lookups.
Upgraded from 384 to 768 dimensions (BAAI/bge-base-en-v1.5). Doubled semantic precision for richer memory representations — still CPU-only, no GPU required.
Redundancy-aware Ebbinghaus forgetting curve. Unique memories decay 4x slower than duplicates — no information loss in sparse stores, automatic cleanup in dense ones.
Automatic date extraction and temporal query boosting. "When" questions get smarter filtering — memories are ranked not just by relevance but by recency when context demands it.
Transparent 384→768 embedding upgrade on first startup. All existing memories are re-embedded automatically with zero user action required — no data loss, no manual steps.
Signal weights learn from real feedback via Ridge regression. 2-week shadow mode validates new weights before promoting. Weight momentum and automatic rollback keep the system stable.
Pain memory per file and area. Guard warns on HIGH RISK (>0.5) and CRITICAL (>0.8). Validated recovery on clean checks — the system forgets pain when the problem is fixed.
Vibe, corrections, brevity, topic, tool errors, and git diff. Emergency bypass for urgent sessions. Severity-weighted decay keeps personality calibrated over time without manual resets.
Weekly self-improvement cycle. Analyzes patterns, proposes changes, validates via snapshot/rollback. Circuit breakers and budget caps for safety.
4-phase Deep Sleep: Collect → Extract → Synthesize → Apply. Analyzes all your sessions while you sleep. Finds corrections, errors, abandoned projects, and missed commitments. Auto-creates learnings by morning.
Detects user mood from sessions: frustration, flow, satisfaction, stress. Daily mood arc with score (0–100%). Knows your frustration triggers and flow triggers. Adapts next-day behavior automatically.
Deep Sleep generates emotional guidance for the next morning. Agent made mistakes? It acknowledges them. You had a bad day? Supportive approach, lighter start. Great day? Push momentum and ambitious goals.
Extract detects: uncaptured corrections, self-corrected errors, unformalised ideas, missed commitments, protocol violations, emotional signals, abandoned projects, and productivity patterns.
Declarative cron management via manifest.json. Core crons auto-synced on update. Personal crons never touched. PYTHONUNBUFFERED in all plists. No more manual LaunchAgent management.
Tracks corrections per session, proactivity level, tool efficiency. Detects systemic inefficiencies across sessions. Feeds into calibration recommendations for continuous improvement.
Code and data fully separated. 15 autonomous processes auto-installed. Auto-update on startup. Auto-diary captures everything. 147+ MCP tools. 12 rounds of external audit with ~60 findings resolved.
Code lives in the repo, personal data in NEXO_HOME (~/.nexo/). Clean separation means updates never touch your data and multiple agents can share the same codebase.
All processes auto-installed: watchdog, immune, synthesis, backup, catchup, cognitive-decay, postmortem, self-audit, sleep, deep-sleep, evolution, followup-hygiene, prevent-sleep, tcc-approve, auto-close-sessions.
Non-blocking update check (5s max) on every server start. Resilient to network failures. Opt-out via schedule.json. No more manual npm updates.
3-layer diary system: PostToolUse writes every 10 calls, PreCompact catches emergencies before context eviction, heartbeat triggers on DIARY_OVERDUE. Never lose session context again.
Customizable process schedules with timezone support. Control when each autonomous process runs. Override defaults without editing plist/timer files.
Memory decay was 24x too aggressive. STM half-life corrected from 7 hours to 7 days, LTM from 2.4 days to 60 days. Memories now persist as intended.
One command to install. NEXO Brain sets up the MCP server, SQLite databases, and cognitive engine automatically. A 5-question personality calibration creates your agent's unique voice.
Common questions about NEXO Brain, how it works, and how to get started.
npx nexo-brain init in your terminal. The installer automatically configures your MCP client (Claude Code or Claude Desktop), downloads the embedding model, and creates the SQLite databases. No API keys or cloud accounts required.nexo_guard_check) is a pre-action safety system. Before your agent edits code or makes changes, it checks for known errors, blocking rules, and relevant learnings. It prevents the agent from repeating mistakes it has already encountered.plugins/ directory are automatically loaded at startup. You can add, remove, or update plugins at runtime without restarting the server. Each plugin can register new MCP tools.npx nexo-brain init and the installer handles everything automatically. For v2.0, your code and data are cleanly separated: code stays in the repo, personal data in NEXO_HOME (~/.nexo/). All 15 autonomous processes are auto-installed, and existing data is preserved. The migration is non-destructive.Open source, AGPL-3.0 licensed, and built for builders who want their AI to actually remember.
Translate this page