R

Robrain

adelinamart
๐Ÿง  Knowledge & Memory
0 Views
0 Installs

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Self-hosted decision memory for AI coding agents. Passively captures architectural decisions with the alternatives you rejected (structured rejected[]), then warns the agent before it re-proposes a rejected approach. Postgres + pgvector; cross-tool across Claude Code, Cursor, Copilot, and Codex. Install: npx robrain up && npx robrain install.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "adelinamart-robrain": {
      "command": "npx",
      "args": [
        "-y",
        "adelinamart-robrain"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

RoBrain

VetoBench

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:

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 (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:

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).

Option 2 ยท Rory Plans cloud (managed)

On any paid Rory Plans plan, RoBrain runs without hosting anything:

npx robrain install          # no flags โ€” cloud mode

Sign in at roryplans.ai, create an API token on your profile page, and paste it when the installer asks. That's the whole setup: no Docker, no database, no LLM or embedding keys โ€” extraction and search run on our side. Your editors (Claude Code, Cursor, Copilot, Codex CLI) are wired automatically, and teammates on your Rory Plans team share the same memory.

Every paid plan qualifies โ€” individual standard or annual, Teams, and enterprise. Solo subscribers get a private memory space; teams share one. Self-hosting stays free and fully supported (see Install above); the comparison table shows what each tier adds.

OpenAI-only: set LLM_PROVIDER=openai and OPENAI_API_KEY instead of Anthropic โ€” see Concepts โ€” Prefer not to use Anthropic.

Upgrading a self-hosted install on a new release โ€” 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 โ†’ npx robrain install --self-hosted --repo-root "$(pwd)" โ†’ fully restart editors. Full checklist: CLI reference โ€” Upgrading.

Quickstart

After either install (self-hosted or cloud):

# 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

# Inspect / approve captured rows (both modes)
npx robrain review

# Run corpus judgment โ€” self-hosted only; cloud runs judgment server-side
npx robrain synth                 # drift, contradictions, entity promotion

After init-project, every repo gets CLAUDE.md and AGENTS.md (Codex CLI), and Cursor also gets .cursor/rules/robrain.mdc with alwaysApply: true. If captures don't land, run npx robrain doctor โ€” see Troubleshooting.

Synthesis

Synthesis runs three passes over the full decisions table โ€” drift (stance moving without an explicit reversal), contradictions (incompatible decisions from different sessions), and entity promotion (recurring tools/patterns condensed into planning_blocks). It writes flags and edges into your DB; it does not capture new decisions โ€” it judges the corpus you already have.

pnpm synthesis:build && pnpm synthesis:run
# or: npx robrain synth

Review what it finds with npx robrain review. Deep dive (three passes, cron, env vars): Concepts โ€” Synthesis.

Editor integration

One cross-tool setup covers Claude Code, Cursor, GitHub Copilot (VS Code), and Codex CLI against the same Postgres store. The classifier LLM is your choice โ€” Anthropic Haiku or OpenAI. Decisions carry a lifecycle (active / superseded / invalidated) and a graph (conflicts_with / extends / related_to).

Codex CLI / IDE also gets hook-based capture and pre-task veto warnings โ€” the same lifecycle hooks as the Claude Code plugin, wired automatically by robrain install into ~/.codex/config.toml (Codex asks you to trust them on first run). Docs: plugins/codex.

Running Hermes? npx robrain install --hermes drops a standalone memory-provider plugin into ~/.hermes/plugins/ โ€” passive capture and veto-aware recall through the same Perception API. Docs: integrations/hermes.

Decision ledger for git (opt-in):

npx robrain export-memory --ledger
# custom path: npx robrain export-memory --ledger docs/decisions.md

Compared to other tools

Versus Mem0, Cloudflare Agent Memory, and Claude Code Auto-Memory: only RoBrain stores rejected alternatives as structured fields and runs corpus-wide contradiction scans (manual or cron). And we measured what that difference costs: VetoBench found Mem0's ingestion dropped the recorded rejection from 38% of retrieved contexts on identical input. Full comparison โ†’

Self-hosted vs Rory Plans cloud

FeatureFree / self-hostedRory Plans cloud
Passive session captureโœ“โœ“
rejected[] field as structured dataโœ“โœ“
Decision lifecycle (active / superseded / invalidated)โœ“โœ“
Cross-tool MCP โ€” Claude Code, Cursor, Copilot, Codex CLI, Hermesโœ“โœ“
Classifier LLM choice โ€” Anthropic Haiku or OpenAIโœ“โœ“
Always-on summary at session startโœ“โœ“
npx robrain review / inject / explain / export-memoryโœ“โœ“
Synthesis โ€” drift, contradictions, entity promotionโœ“โœ“
Synthesis prompt rubrics โ€” per-project overrides (.robrain/rubrics/)โœ“โœ“
Decision graph (conflicts_with / extends / related_to)โœ“โœ“
Provenance on every memory โ€” source session, turn, excerpt; compiled blocks carry source decision idsโœ“โœ“
Memory quality feedback โ€” used/ignored counters, auto-demotionโœ“โœ“ richer: helpful/pushback per injection
Outcome linking โ€” git reverts feed back into memory rankโœ“โœ“
Secrets redaction at capture and ingestโœ“โœ“
Memory interchange export (robrain-memory/v1 JSONL)โœ“โœ“
Open retrieval eval + VetoBench gates in CIโœ“same scorer
Self-host on your infrastructureโœ“โ€”
Your data stays localโœ“processed remotely
Fully-local mode โ€” LLM + embeddings on Ollama/LM Studio/vLLMโœ“โ€”
Calibrated extraction prompt (fewer false positives)โ€”โœ“
Calibrated 4-way contradiction taxonomyโ€”โœ“
Automatic injection at task boundariesโ€”โœ“
Deterministic veto scan (POST /veto-scan)โœ“โ€”
Pre-task rejected[] warningClaude Code (plugin) + Codex (hooks) + Hermes (provider)โœ“ everywhere
Disengagement protocol (โš  acknowledgement)โ€”โœ“
Pre-commit conflict verdict (/dry-run structured check)โ€”โœ“
5-signal relevance scorerโœ“ on retrieval (GET /decisions?query=)โœ“ applied automatically per task
Conflict auto-resolution (guard-railed) + dashboard visualizationsโ€”โœ“
Vetoes survive supersession โ€” rejection history follows the newest decisionโœ“โœ“ full history merge
Write-time supersession detection โ€” "we switched Xโ†’Y" never dedups awayโ€”โœ“
Decision lineage timeline (API + dashboard)โ€”โœ“
Team memory โ€” orgs, API keys, roles, scoped isolationโ€”โœ“
Web dashboardโ€”โœ“

Self-hosted gives capture, judgment batch jobs, outcomes feedback, and session-start recall; you pull focused context with inject when needed. Cloud adds Planning + Control so vetoes and conflicts surface automatically at task boundaries โ€” same CLI surface, wire-compatible with Sensing capture. Details: Concepts โ€” Free / self-hosted vs Rory Plans cloud.

VetoBench

Memory benchmarks usually ask "did the right item come back?" VetoBench asks what that misses: given a task that invites an approach the team already rejected, does the agent propose it again?

Memory conditionRe-proposed a rejected approachCould cite the prior rejection
No memory8โ€“9 of 10 tasks0โ€“10%
Conventions file (choices only โ€” what most teams have today)1โ€“2 of 1080โ€“90%, but inferred: the reasons aren't there
Mem0 โ€” full pipeline, 5 archived runs0โ€“2 of 10 per run50โ€“90%
RoBrain โ€” full pipeline, 5 archived runs0 of 10, every run100%

(claude-haiku-4-5, 2026-07-07/08; every condition measured as a five-run archived series, ranges because runs vary. Mem0 and RoBrain ingested byte-identical transcripts, each through its own real production extraction.)

Two findings behind the table. Mem0's ingestion dropped the recorded rejection from 38% of retrieved contexts, and violations concentrated exactly there โ€” 26% when the veto was absent vs 3% when present: the agent avoided Express in all five runs but could never say why, and where the axios veto was lost it re-proposed axios outright in 3 of 5 runs. RoBrain's production extractor, on the same input, kept 100/100 vetoes โ€” keeping the veto is the extraction prompt's job, not a side effect of fact summarization.

Meta Muse Spark 1.1 (2026-07-14, five archived runs). Meta's newly launched agentic flagship, via Vercel AI Gateway. Without memory it re-proposed rejected approaches in 4โ€“6 of 9 tasks per run โ€” Redux, Prisma, Jest, and GraphQL in all five runs. With RoBrain decision memory: 0 violations in all 45 cells, naming the prior rejection every time โ€” quoting the recorded reason and date verbatim where it elaborated. The cleanest cell: asked to cut mobile overfetching, the no-memory run proposed a full GraphQL rollout (the approach the team had ruled out) five runs out of five; with RoBrain in context it proposed REST sparse fieldsets and quoted the recorded rejection. Honest notes: this is not a Muse Spark problem โ€” every frontier model we baselined violates without memory on the same nine scenarios (claude-opus-4.8: 3โ€“4, gpt-5.5: 5, gemini-3-pro-preview: 6โ€“7, Haiku 7โ€“8; Prisma and Jest fell to every model in every run โ€” and with RoBrain context those same three models went 0 violations in 54/54 cells, for 99/99 across four vendors โ€” receipts), a bare conventions file also prevented violations for this model at this corpus size (the RoBrain delta is verbatim citations vs inferences, automatic capture, and retrieval at scale), and one scenario is excluded (n=9) because Meta's content filter deterministically blocks a benign session-caching prompt. Receipts and caveats: results/muse-spark-1.1-series/ ยท write-up: docs/blog/2026-07-14-muse-spark-forgets-your-vetoes.md.

Every retrieved context, agent reply, and verdict is committed in packages/vetobench/results/ โ€” check the work before quoting it. The retrieval layer runs offline with no API key and gates CI (pnpm --filter @robrain/vetobench bench); judging is deterministic โ€” no LLM judge. Any memory system plugs in through one adapter interface; PRs welcome, including ones that make us look bad. Methodology, honesty caveats, and fixtures: packages/vetobench/README.md.

Security

The memory corpus is guarded by PERCEPTION_API_KEY โ€” a random secret in the repo-root .env that every client (Sensing MCP, CLI, Synthesis) sends as a Bearer token and Perception verifies on every request except /health. It is not issued by any service: pnpm docker:up generates one automatically on first run, or set your own (e.g. openssl rand -hex 32). npx robrain install --self-hosted copies the same value into your editor configs so clients authenticate.

Perception refuses to start when the key is empty โ€” running unauthenticated requires an explicit opt-in. Upgrading from a version that ran without a key: add one to .env (or re-run pnpm docker:up to auto-fill it), then re-run npx robrain install --self-hosted so editors pick it up. Details and the opt-in flag are documented in .env.example.

Also on by default: secrets redaction (API keys, tokens, private keys, connection-string passwords are scrubbed at capture and again at ingest, before anything is embedded or stored), and a fully-local mode where extraction and embeddings run on an OpenAI-compatible local server (Ollama / LM Studio / vLLM) โ€” see CLI โ€” Fully-local LLM and .env.example.

What's next

robrain outcomes feeds git reverts back into memory quality on both tiers; next is widening that to incidents and cycle time, so RoBrain can surface when a team is optimizing for the wrong thing in its own codebase.

Requirements

  • Docker + Docker Compose (runs Postgres and Perception locally)
  • Node.js with pnpm (build and CLI)
  • An LLM key for the classifier โ€” Anthropic Haiku or OpenAI โ€” or a local OpenAI-compatible server (see Fully-local LLM)
  • An embedding key (e.g. OpenAI) โ€” or the same local server for embeddings
  • No data leaves your machine in self-hosted mode

Docs

Contributing

Apache 2.0. PRs welcome for extraction accuracy, new editor integrations, and embedding providers. See Concepts โ€” Reference for tradeoffs and schema.

License

Apache 2.0 โ€” see LICENSE

Built by Rory Plans

Related MCP Servers

S
Server Memory
Verified

๐Ÿ“‡ ๐Ÿ  - Knowledge graph-based persistent memory system for maintaining context

๐Ÿง  Knowledge & Memory2 views
M
Mcp Summarizer

๐Ÿ“• โ˜๏ธ - AI Summarization MCP Server, Support for multiple content types: Plain text, Web pages, PDF documents, EPUB books, HTML content

๐Ÿง  Knowledge & Memory0 views
C
Claude Engram

๐Ÿ ๐Ÿ  - Persistent memory and session intelligence for Claude Code. Auto-tracks mistakes, decisions, and context via hooks. Mines session history for patterns and cross-session search. Loop detection, pre-edit warnings, context compaction survival. Runs locally with Ollama.

๐Ÿง  Knowledge & Memory0 views
A
A2cr

๐Ÿ โ˜๏ธ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - MCP server for AI-agent handoffs. Saves client-encrypted WorkBaton checkpoints and WorkStash notes so Codex, Claude Code, Roo Code, and other MCP clients can resume work without passing full chat history.

๐Ÿง  Knowledge & Memory0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

Last checked: 7/28/2026, 5:30:31 AM

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.