Independent system

ocbrain

The thing I want from agent memory is not a longer prompt. I want a system that can say what it believes, show where the belief came from, notice when the result was harmful, and stop serving the belief when the evidence changes.

ocbrain is that system in a deliberately small shape: one local SQLite ledger shared by ChatGPT/Codex, Claude Code, and OpenClaw through MCP.

The basic shape

One brain, several lenses.

Each runtime already produces useful history, but separate memories compound in separate directions. ocbrain brings that evidence into one ledger. Project, repo, task, client, runtime, and session context decide which part of the ledger a given agent may see.

That gives the system a shared history without pretending all history belongs everywhere. A stable operating principle can travel. A confidential client fact cannot.

The decision loop

Evidence becomes knowledge only through outcomes.

Evidence

Immutable, hash-pinned records preserve what happened and where it came from.

Knowledge

Current beliefs compile from evidence and keep support, contradiction, scope, and lifecycle attached.

Feedback

Corrections, tests, task outcomes, and retrieval usefulness decide what earned trust.

Memory

A bounded view serves only current injectable knowledge that survived the applicable safeguards.

The autonomy belongs to maintaining this loop. ocbrain does not run the user's work, install skills, publish packages, or send a hosted request on its own.

The grit part is deliberately less romantic: agents must finish with verified completion or say exactly what blocks them. A separate watchdog records and pages parked work; the maintenance loop and watchdog monitor one another, but neither pretends detection is the same as resuming the work.

Across the current runtimes

Connection is not the same as proof.

The current install has been exercised from ChatGPT/Codex, Claude Code, and OpenClaw. Codex and OpenClaw completed recorded search-to-feedback cycles. Claude searched successfully during the scheduled heavy database writer and followed the safe contract: use the read, report the busy audit window, and do not retry merely to manufacture a feedback id.

The canonical install page uses the runtimes' current MCP commands and ends with a model-driven tool-use check. That is the level where an integration becomes real.

The long game

The memory corpus should eventually train the model.

The same history compiles into local SFT, DPO, and persona streams. v0.4 separates what belongs in weights from what should remain retrieval-only, locally grades a deterministic selected pack, and refuses to train until the corpus earns it. The voice evaluation still comes first, every held-out hash stays out of training, and the bar does not move afterward.

The second pilot improved and still failed the model-quality bar. It reused the first pilot's frozen twenty prompts, references, rubric, and blind randomization after adding better first-party examples. The tuned candidate improved from 2 preferences to 7; the reference still won 13. The evaluation worked; the voice still did not clear the bar.

The retrieval side now has its own fixed test too: 100 questions across ChatGPT, Codex, Claude Code, and OpenClaw, including negative and injection probes. The dated v0.4 run passed all 100 for top-five relevance, citations, and privacy scope. The remaining question is the one that matters most: did the retrieved context change the result?

Why this shape

Models rotate. A legible decision history compounds.

My instinct is to keep the brain simple enough to inspect: code enforces the trust boundary, SQLite keeps the graph and evidence, and models help where semantic judgment is actually useful. Once that loop is right, the retrieval, grading, and training policy can improve without changing what the system owes the user.

It is not magical, but it is trustworthy. And trust is what lets the system compound.