Stop watching your AI agent repeat the same mistakes.
Open-source shared memory for teams using AI agents. Captures every decision and the alternatives your team ruled out, and flags when a new decision contradicts an old one — so your team revisits past decisions intentionally, instead of re-litigating from zero.
Session 1 — Tuesday afternoon, Alice’s machine: Alice and her agent work on the shopping cart. They consider Redux, but settle on Zustand because Redux was causing re-render issues in the cart component. RoBrain captures it automatically — no notes, no extra commands.
{
"decision": "Use Zustand for state management",
"rationale": "Redux caused re-render issues in cart",
"rejected": [{ "option": "Redux", "reason": "re-render perf issues in cart" }],
"files_affected": ["src/store/cart.ts"]
}
No notes written. No commands run. The capture is part of the session, not on top of it.
Session 2 — a week later, Bob’s machine: Bob’s agent is about to suggest Redux. He runs
npx robrain inject --query "state management" --copy before his next prompt. RoBrain returns:
Chose Zustand over Redux (re-render perf issues in cart) — Mar 15, high confidence
Bob pastes that line into his agent — the session continues from informed context instead of re-litigating Alice’s decision from scratch.
That’s the loop. Decisions and vetoes flow from one developer’s session into everyone else’s. Captured automatically; retrieved manually in OSS (or auto-injected with the cloud version).
Six months in, every architectural decision — and every alternative you ruled out — is queryable as structured data. New developers inherit the full history. Old decisions stay queryable after you change your mind (“what did we decide in March?” returns a real answer). Contradictions across sessions get flagged for review instead of silently overwriting each other.
After the loop, here’s how RoBrain sits next to other AI memory tools (same framing as the README):
rejected[] in your Postgres, scheduled Synthesis over
the full corpus, both sides stay queryable when decisions change.
Deep dives: vs Claude Auto memory · Comparisons
Runnable OSS surface — how you capture, scan, and pull context into a session. For team-wide
rejected[], lifecycle, and Postgres vs per-user tools, see the
How we compare matrix below.
npx robrain synth (or cron) so
Synthesis scans the whole corpus and flags reversals across sessions and developers.
npx robrain explain <file> — file-scoped “why does this code exist?”
from stored decisions.
npx robrain inject — semantic or file-scoped context to paste into your
agent before the next prompt (same loop as the walkthrough).
Decisions in RoBrain aren’t permanent vetoes — they’re durable context. When a
previously rejected idea makes sense again, you supersede the old row: the history stays queryable, the new
decision becomes active. Synthesis flags contradictions for human review in
robrain review — it doesn’t block the agent from re-suggesting forever. The goal is
informed reconsideration, not fossilization.
RoBrain next to Mem0, Cloudflare Agent Memory, and Claude Code Auto-Memory — same matrix as Product Hunt; all values in HTML for search and screen readers.
| Feature | RoBrain | Mem0 | Cloudflare Agent Memory | Claude Code Auto-Memory |
|---|---|---|---|---|
| Tracks what your team ruled out | Yes — structured rejected[] field per decision |
No | No | No |
| Catches when a new decision contradicts an old one | Yes — scheduled scan across the whole project (Synthesis) | No — only at the moment of insertion, no scheduled corpus scan | Partial — internal use only | Yes — but silently deletes the loser |
| Past decisions stay queryable after you change your mind | Yes — old and new both kept | No — new replaces old | No | No |
| Shared memory across your team | Yes — one Postgres for the whole team | Partial — via scoping workaround | Yes — managed profiles | No — per-user, per-machine |
| Works across Claude Code, Cursor, and Copilot | Yes | Yes | Yes | No — Claude Code only |
| Open source, self-hosted | Yes — Apache 2.0, your Postgres | Partial — graph features paywalled | No — managed only | N/A — markdown files locally |
| Warns the agent before it suggests something you ruled out | Roadmap | No | No | No |
Narrative walkthrough: How it works · Six-row Claude vs RoBrain table: below · Full write-ups: Comparisons
Mem0 and Zep focus on facts or entities — neither exposes rejected alternatives as a first-class field you can query the way RoBrain does. That veto line is what keeps “why not X?” from disappearing into prose.
More vendors and tradeoffs: README — Comparisons.
Same problem space as Claude’s built-in memory — different shape of data and who can see it.
| Capability | Claude auto-memory | RoBrain |
|---|---|---|
| Storage | Local markdown files, per-user, per-machine | Postgres, can be team-shared |
| Capture mechanism | Active — Claude decides what to write | Systematic passive — every turn auto-classified, Claude doesn’t decide |
| Cross-tool | Claude Code only | Any MCP-capable client (Claude Code, Cursor, etc.) |
| Recall | Loads MEMORY.md index at session start |
Always-on summary + semantic search via embeddings |
| Audit trail | Files only | Full session turn history in DB |
| New developer joining the project | Sees nothing | Inherits the team’s accumulated memory immediately |
Sensing MCP watches sessions in the background. The robrain CLI gives you review, inject, explain, and project management.
Postgres (decisions + pgvector for retrieval), the Perception API
(extracts and stores decisions from session turns), and Synthesis — a batch job that
periodically scans the whole corpus for contradictions, drift, and recurring entities. Runs via
npx robrain synth, on a cron schedule, or both — so you’re not relying on
remembering to click “scan.”
Planning API (relevance scoring across the whole corpus) and Control MCP (proactive injection at task boundaries). Rory Plans cloud only — the OSS version runs Postgres + Perception continuously and Synthesis on whatever cadence you configure.
Synthesis is the job that reads the whole decision corpus. The headline pass is the
contradiction scan — e.g. “Use Bun” in February vs “Migrate back to Node” in May can surface
as a direct reversal across separate sessions and vocabulary, with a conflicts_with edge and
both rows flagged for review.
Drift detection clusters by topic and surfaces stance shifts without an explicit reversal (think REST → GraphQL across several decisions). Entity promotion notices when a name like “Stripe” appears across many decisions and surfaces the full relationship history when any of them comes up later.
Your conversation turns never leave your machine. The Perception API runs locally in Docker, extraction happens on your hardware, and decisions are stored in your Postgres. Nothing is sent to Rory Plans or any other external service.
The one network dependency: extraction calls Anthropic’s Haiku API (you provide
ANTHROPIC_API_KEY) and embeddings call OpenAI, Voyage, or Cohere. Those are the only outbound
calls. You can swap providers or run a local model if you want full air-gapping.
From a fresh clone: install, bring up Postgres + Perception, wire your editor, init your app repo, then run a corpus scan when you’re ready.
One-time — RoBrain repo
pnpm install && pnpm build
pnpm docker:up
npx robrain install --self-hosted --repo-root "$(pwd)"
Per application project
cd /path/to/your/project
npx robrain init-project
Contradiction scan (manual once, or add to cron)
npx robrain synth
After init-project, Claude Code gets CLAUDE.md hooks for session start / turn /
end — capture is automatic. See the README for Cursor rules and editor-specific notes.
Need help? Open an issue · Troubleshooting (README)