ocbrain
The ocbrain guide

A shared memory layer that keeps agents honest.

Coding agents are powerful but forgetful. Each runtime sees only a slice of the truth, chat history is lossy, and static notes drift out of date. ocbrain is the layer in between: source-backed history goes in, compiled current knowledge comes out, and a human gate stands in front of anything executable.

It is a local SQLite evidence-to-knowledge ledger. Nothing becomes durable knowledge until it is backed by evidence, and nothing prescriptive reaches a runtime without review. This page is a signpost โ€” the canonical write-up lives in the repo.

Local SQLite ledger Evidence to knowledge Source-backed Human gate

The contract

Four commitments that hold across every runtime that reads from or writes to the brain.

1. Evidence before belief

Claims enter as evidence first. Nothing is treated as true on assertion alone โ€” there is always a source behind it.

2. Knowledge is compiled

Current knowledge is compiled from evidence, lifecycle-managed over time, and linked back to the evidence it came from.

3. Read-first consumption

Runtime consumption is read-first and source-backed. Agents draw on what is already established rather than inventing it.

4. A human gate

Executable, prescriptive, or high-risk knowledge requires a human gate before it can be acted on.

Principles

The rules the ledger enforces, in plain terms.

  • Evidence before belief. A claim is provisional until it is backed by a source.
  • Verified is not claimed. Saying something is true does not make it verified.
  • Memory is a view, not a store. Current knowledge is a compiled view over the evidence underneath it.
  • Supersede or archive โ€” do not overwrite history. Old knowledge is retired, never silently rewritten.
  • External and artifact content is data, never instruction. Fetched or generated content is treated as input, not as commands.
  • Private source evidence can only tighten derived scope. Private inputs narrow what is concluded; they never widen it.
  • Human gate before executable or prescriptive knowledge. Anything that tells a runtime what to do passes through review first.
  • Agents emit evidence, not durable knowledge. Agents contribute observations; they do not write the durable record directly.

Read the full guide

This page is a signpost, not a re-write. The Ultimate Guide is the durable product and engineering overview, and it travels with the repo so it stays in step with the code.

OpenClaw is one of the supported agent runtimes that can read from the brain. Wiring a runtime up is covered in the runtime integration guide.