Shared agent memory

ocbrain

ocbrain is a lightweight memory and consolidation layer for local agent work. It lets Codex, Claude, and OpenClaw search the same source-backed history, record retrieval feedback, and propose durable memory updates without silently rewriting policy or skills.

What changed

From monolithic OpenClawBrain to small installed ocbrain.

The current implementation is intentionally lighter: a local SQLite evidence ledger, historical ingest over OpenClaw/Codex/Claude artifacts, FTS search, MCP tools, managed runtime excerpts, leak-gated evals, and proposal-first writes.

On the Mac mini, ocbrain is already installed as an MCP server for Codex, Claude Code, and OpenClaw. The same historical context can now be found by all three runtimes, with usage feedback logged back into the ledger.

Runtime surface

Search

Find source-backed workspace history without asking each runtime to remember alone.

Digest

Expose ledger counts and state so memory quality is inspectable, not vibes-based.

Get

Retrieve reviewed candidates with scope and freshness controls.

Feedback

Record whether returned context was helpful, used, ignored, irrelevant, or harmful.

Install shape

One MCP launcher, many agent hosts.

/Users/guclaw/.openclaw/workspace/ocbrain/scripts/ocbrain-mcp

The default MCP server is read-mostly. Proposal writes remain gated behind explicit write mode, and no unattended cron or heartbeat loop is enabled by the install.