Brain OS

by brainos-hq

Not rated
GitHub

About

Operational memory for AI agents that persists across sessions and tools.

Details

Author
brainos-hq
Categories
AI, Knowledge Base

Setup

Install Brain OS in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/brainos-hq/brain-os

Follow the installation instructions in the repository README, then restart your MCP client.

Local-first MCP memory server for operational project state: decisions, blockers, plans, patterns, and next moves.

Your AI remembers conversations. It still forgets project state.

Brain OS gives agents operational state: decisions, plans, blockers, and priorities that survive across sessions.

AI agents are powerful inside a session, but long-running work has more state than any one chat: what you decided, what's blocked, what's active, and what should not be reopened. Brain OS gives agents operational state, not conversation logs:

- Entities— track projects, deals, initiatives with status, momentum, blockers, and next moves
- Decisions— log what was decided, why, what alternatives were rejected, and when to revisit
- Patterns— detect recurring blockers, stale work, avoidance signals, and theme convergence
- Focus— prioritize what to work on based on urgency, momentum, leverage, and staleness
- Semantic recall— search memory by meaning, not just ID

Brain OS is anMCP serverthat works with any MCP-compatible client: Claude Code, Cursor, Zed, GitHub Copilot, OpenAI Codex, Windsurf, or any agent that speaks the protocol.

Before the agent acts, it can check whether a proposed move conflicts with an existing decision:

> decision_check({ proposal: "switch to Postgres for the new service" }) { "verdict": "conflict", "conflicting_decision": { "id": "dec_2026_03_14_db_choice", "decision": "Use SQLite for all local-first projects", "reason": "Lower ops burden, no infra to run, fits single-user scope", "rejected_alternatives": ["Postgres", "DuckDB"], "logged_at": "2026-03-14" }, "guidance": "Re-litigating a settled choice. Surface the prior reasoning to the user before proceeding." }

That's the wedge: structured state with enforcement, so agents stop re-opening questions you already answered.
- Creates a.brain/directorywith your entity, decision, and pattern stores.
- Installs slash commandsinto.claude/commands/so you can run/brain,/brain:focus,/brain:decide, etc. directly in Claude Code. Bare aliases (/focus,/decide, etc.) install alongside for brevity.
- Drops agent-instructions pointer filesso any MCP-compatible client behaves consistently:AGENTS.md(canonical, cross-tool) plus thin pointer files for Claude Code (CLAUDE.md), GitHub Copilot (.github/copilot-instructions.md), Cursor (.cursor/rules/brain-os.mdc), Zed (.zed/rules.md), and Windsurf (.windsurfrules).

- npx brain-os init --minimal— install onlyAGENTS.md+CLAUDE.md, skip the other client pointers (clean-repo mode)
- npx brain-os init --no-commands— skip slash commands (MCP server only)
- npx brain-os init --no-agent-instructions— skip all agent-instructions pointer files

claude mcp add brain-os -- npx brain-os serve
{ "brain-os": { "command": "npx", "args": ["-y", "brain-os", "serve"] } }

Thesemantic_recalltool needs an embeddings provider. Everything else (entity_update,decision_log,plan_, etc.) works without one.

Brain OS doesnotinstall an embeddings SDK by default. This keeps the core install small and avoids pulling native ONNX/Sharp dependencies into users who do not need semantic search. Install exactly one optional provider besidebrain-os, then addBRAIN_EMBEDDINGSto your MCP server env:

# Private, on-device embeddings npm install brain-os @huggingface/transformers # Or OpenAI embeddings npm install brain-os openai

Then configure the provider in your MCP server environment:

{ "brain-os": { "command": "npx", "args": ["-y", "brain-os", "serve"], "env": { "BRAIN_EMBEDDINGS": "local" } } }

IfBRAIN_EMBEDDINGSis unset, or the selected optional provider is missing,semantic_recallreturns a clear setup error. No silent provider install, model download, or API call occurs. Core tools continue working normally.

Never paste a rawsk-...key into your MCP config.~/.claude.jsonand similar MCP config files are plaintext and easy to expose on screen or in backups. Instead, export the key once in your shell and reference it from the MCP process environment. The local provider needs no key and keeps embedding work on your machine, but remains an explicit opt-in dependency.

brain-os initinstalls slash commands into.claude/commands/so the agent has a clear vocabulary for working with operational state. Each command installs in two forms:/brain:(canonical, documented form) and a bare alias (/decide,/focus, etc.) for power-user brevity./brainis the namespace root and installs once.

- BRAIN_OS_PROTOCOL.mdat.claude/brain-os/PROTOCOL.md(project) and~/.claude/brain-os/PROTOCOL.md(user). The protocol governs tool routing: when an agent runs a Brain OS slash command, it reads the protocol first, then callsentity_read/plan_read/focus_get/etc. as primary. Pulse files become fallback only.
- brain-os-modesubagentat.claude/agents/brain-os-mode.md. When the main agent delegates Brain OS work to a subagent (e.g. Claude Code's Task tool), it picks up under the same protocol — no risk of subagents falling back to generic file search.
- Optional routing-guard hookattemplates/hooks/brain-os-routing-guard.py. Opt-in PreToolUse hook that warns if pulse files are read while a.brain/workspace exists. Install instructions are printed bybrain-os init.

Re-runninginitis safe and repair-aware: existing Brain OS commands are preserved, and any missing form is installed. If a command path is taken by another tool, that path is skipped and reported — your file is never overwritten. You can install Brain OS into a project with existing/decideor/focuscommands and the namespaced/brain:forms will still land.

Brain OS stores everything as local JSON files in a.brain/directory:

.brain/ entities/ — one file per tracked entity decisions/ — decision log patterns/ — detected patterns config.json — workspace settings

No cloud. No database. No account. Your data stays on your machine.

The interface is the agent. Brain OS is read and written through MCP tool calls —/brain,/focus,/decide,decision_check, etc. — surfaced inline by whichever client you use (Claude Code, Cursor, etc.). There's no separate dashboard to keep open, no second tab to context-switch into, no UI state that can drift from the underlying files.

This is a design choice, not a missing feature. Brain OS state lives at the same level as your code; the agent is already there, already in the conversation, already the right surface to ask "what's the priority right now?" Adding a human dashboard would split attention between two interfaces for the same data.

If you want a visual at-a-glance view,.brain/is plain JSON — render it however you want. The public MCP server stays agent-native by design.

Brain OS is single-user by design today. But because.brain/is just local JSON files, teams can share a brain through any synced filesystem — no product changes needed:

This works without any built-in sync becauseevery Brain OS tool call reads fresh from disk— there's no in-memory cache to invalidate. Whatever your filesystem syncs, the next tool call sees. Same applies cross-tool: log a decision from Claude Code on Monday, open Cursor on Tuesday — same brain, both agents.

Native encrypted team sync with proper merge semantics is on the roadmap. The local-first foundation today is what makes that federation additive, not a retrofit.

When an MCP client connects, Brain OS exposes abrain://statusresource with an operational overview — active entities, alerts, top priority, and recent decisions. The agent starts every session with context, not amnesia.

Brain OS ships a smoke test suite attests/smoke.mjs, wired tonpm testand run on every push by.github/workflows/audit.yml. Run locally:

Current coverage (regression + happy-path):

- decision_log— type-collision no-supersede, explicitsupersedesworks, cross-entity supersession rejected
- decision_check— keyword-only flag stays caution without embeddings (no false STOPs), asymmetric semantic comparison (rejected vs chosen facet)
- decision_refresh— clears danglingsuperseded_bywhen status transitions away fromsuperseded
- plan_advance— no over-promotion when an active step already exists
- entity_update— apply diff and record changes, create missing entity,mode_reasonrequired when parking, status-only updates apply, guarded ranking skips are visible
- semantic_recall— throwsEmbeddingsNotConfiguredError(not generic Error) whenBRAIN_EMBEDDINGSis unset
- Store resolution — fails closed in a storeless cwd instead of silently creating an empty.brain/

Known gaps (no direct coverage yet):focus_getscoring,pattern_detectheuristics,memory_,plan_set/add/read, and thebrain://statusresource. Expanding the suite is on the roadmap.

If you hit a bug, please open an issue with the tool, input, and output — that's the fastest path to a fix.

- Discord:discord.gg/9VBUGstjY— questions, feedback, what broke for you, what you're shipping with Brain OS
- Site:
brainos-hq.com
- Issues:
github.com/brainOS-HQ/brain-os/issues

Persistent memory for AI assistants and coding agents across ChatGPT, Claude, Cursor, and other MCP-compatible tools.

One shared, versioned memory for your AI agents across Claude Code, Cursor, Kiro and Grok, with a source on every answer and full history.

MCP (Model Context Protocol) server that exposes 70 tools spanning cognitive memory, working memory, sessions, agents, the L0–L3 knowledge hierarchy, orchestration tasks, and training pipelines. The server speaks stdio and is consumed by Claude Desktop, Claude Code, OpenCodex, and any MCP-aware client.

MEMANTO is a memory agent. It remembers, recalls, and answers — so your agents can achieve long-term goals and avoid confusion.

A local-first, LLM-agnostic memory layer for AI assistants

Hosted MCP memory across Claude Code, Cursor, ChatGPT and any MCP client. Community-hosted instance of the MIT-licensed MemPalace engine. EU-hosted, GDPR-compliant. Free tier with 200 memories.

Shared memory layer for AI coding agents with dream pipeline distillation, session grounding, and multi-instance coherence.

Your portable context layer — load it into any AI.

AI Reasoning Cache & Consensus Layer with 50+ reasoning objects across 14 domains. Cache hit/miss with token savings, failure risk check before execution, cross-model verification, and citation tracking. 11 MCP tools via Streamable HTTP.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.