RoBrain
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**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
Two ways to run RoBrain — pick one:
- **Option 1 · Self-hosted** (free, open source): everything runs on your machine — your Postgres, your API keys, nothing leaves your laptop.
- **Option 2 · Rory Plans cloud** (managed): nothing to host, no keys — included with every paid Rory Plans plan.
Option 1 · Self-hosted (free, open source)
No clone needed — robrain up pulls the published Perception image and generates credentials into ~/.robrain/stack/.env.
Default path uses Anthropic (extraction) + OpenAI (embeddings). Other setups (OpenAI-only, Gemini, other embeddings, fully local) — Concepts — Prefer a different provider setup?.
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.
pnpm robrain runs the CLI you just built (node packages/cli/bin/robrain.js).
Use it instead of npx robrain everywhere in this clone — npx resolves to the
published package or a stale global install, not your working tree.
Upgrading a self-hosted install
No-clone stack: re-run npx robrain@latest up (pulls the new Perception image and applies startup DB migrations) then npx robrain@latest install --self-hosted. From a clone: git pull → pnpm install && pnpm build → pnpm docker:up:build → pnpm robrain install --self-hosted --repo-root "$(pwd)" → fully restart editors. Full checklist: CLI reference — Upgrading.
Claude Code plugin (self-hosted)
Claude Code users on the self-hosted stack can add hook-based capture and pre-task warnings about previously rejected approaches — no CLAUDE.md protocol needed:
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).
Option 2 · Rory Plans cloud (managed)