RoBrain

Shared memory across your team and your AI agents — with judgment!
RoBrain isn't just another memory layer — it's the brain that helps you and your agents make better decisions and avoid costly mistakes.
Self-hosted on your own Postgres. Passive capture, structured vetoes, corpus-wide contradiction scans — nothing leaves your machine. Works with Claude Code, Cursor, GitHub Copilot (VS Code), Codex CLI, Hermes and more.
Measured: without decision memory, a coding agent re-proposes an approach your team already rejected in up to 9 of 10 tasks. Through RoBrain's full pipeline: 0 of 50, across five archived runs — VetoBench.
What it is
RoBrain records what your team and its agents decide — and the alternatives they ruled out — without anyone tagging anything by hand. Sensing captures session turns; Perception extracts each decision into Postgres, where every row can carry a structured rejected[] field.
Most agent-memory tools stop at capture: they store what happened and hope you query it later. RoBrain adds judgment. Batch Synthesis reads the whole corpus to flag contradictions, stance drift, and recurring entities that no single session could see.
The point is the handoff. Someone makes a deliberate call in Cursor on Tuesday — say, keeping Perception on Hono instead of porting to Express. A new teammate opens Claude Code on Wednesday with no memory of it and asks to make exactly that change. RoBrain surfaces the recorded rationale before the agent steers down a path you already rejected — same Postgres store, same vetoes, captured passively.
The cost of forgetting a rejection isn't inefficiency. It's the auth bypass you already patched, the migration you already rolled back, the dependency you already removed for a CVE — re-suggested by an agent with no memory of why you said no.
Coding is the first vertical because the feedback loops are tight — reverts, incidents, and rework make the cost of a forgotten rejection measurable. The same architecture applies wherever agents make decisions that outlast a session.
How it works, the two pillars (capture + judgment), and the full walkthrough: docs/concepts.md.
Install
No clone needed — robrain up pulls the published Perception image and generates credentials into ~/.robrain/stack/.env:
export ANTHROPIC_API_KEY=... OPENAI_API_KEY=... # or add them to ~/.robrain/stack/.env after the first run
npx robrain@latest up # start Postgres + Perception from ghcr.io
npx robrain install --self-hosted # wire Sensing MCP into your editors
From a clone instead (development, or building the image yourself)
First pnpm docker:up auto-creates .env and fills PERCEPTION_API_KEY / POSTGRES_PASSWORD. Perception still needs your LLM + embedding keys before it stays up.
git clone https://github.com/adelinamart/robrain
cd robrain
pnpm install && pnpm build
pnpm docker:up # first run: creates .env; Perception won't start yet
# open .env, add ANTHROPIC_API_KEY + your embedding key (e.g. OPENAI_API_KEY)
pnpm docker:up # second run: Perception now boots
npx robrain install --self-hosted --repo-root "$(pwd)"
Claude Code plugin
Claude Code users can add hook-based capture and pre-task warnings about previously rejected approaches — no CLAUDE.md protocol needed:
claude plugin marketplace add adelinamart/robrain
claude plugin install robrain@robrain
Details: plugins/claude-code. robrain init-project also recommends the plugin to collaborators via the project's .claude/settings.json, so teammates get an install prompt from Claude Code itself (opt out with --skip-claude-plugin).
OpenAI-only: set LLM_PROVIDER=openai and OPENAI_API_KEY instead of Anthropic — see Concepts — Prefer not to use Anthropic.
Upgrading on a new release — no-clone stack: just re-run npx robrain@latest up. From a clone: git pull → pnpm install && pnpm build → pnpm docker:up:build → npx robrain install --self-hosted --repo-root "$(pwd)" → fully restart editors. Full checklist: CLI reference — Upgrading.
Quickstart
# Wire capture into an application project (run inside the repo)
cd /path/to/your/project
npx robrain init-project # writes CLAUDE.md, AGENTS.md, .cursor/rules/robrain.mdc
# Capture and recall are automatic from here:
# - every session turn is classified, no tagging
# - prior decisions load at session start via the always-on summary
# Explain any file's decision history
npx robrain explain path/to/file