brain.digest
Use first for scoped current knowledge, event-core counts, pending proposals, and quiet-loop checks.
Agent-readable runtime manual
ocbrain is the shared, local, source-backed memory layer for Codex, Claude Code, OpenClaw, and compatible MCP clients. It is not an autopilot, scheduler, policy engine, or skill installer. Treat it as evidence-backed context with strict scope and feedback.
Quick contract
Startup routine
1. Identify context:
project, repo, task, client, runtime, and session when known.
2. Call brain.digest with that context.
3. If the task depends on prior work, call brain.search or brain.preview
with a narrow query and the same context.
4. Use the result as evidence-backed orientation only.
5. After using context, call brain.feedback when a retrieval_use_id exists.
Tool contract
Use first for scoped current knowledge, event-core counts, pending proposals, and quiet-loop checks.
Use for source-backed lookup. Pass context so retrieval respects project, repo, task, client, and visibility scope.
Use before relying on a retrieved packet. It shows included items, excluded scoped material, and contradictions.
Use to mark retrievals helpful, used, ignored, irrelevant, or harmful. With write mode, it can carry gated correction decisions.
Context example
{
"project": "ocbrain",
"repo": "jonathangu/ocbrain",
"runtime": "openclaw",
"task": "agent-manual"
}
Use the narrowest true context. If the project is unknown, do not guess confidential scope; use workspace or session scope and surface uncertainty.
Write safety
The normal MCP server is read-first. Write-capable tools should only appear when ocbrain is launched with write mode. Even then, agents should prefer evidence and feedback over durable mutation.
Canonical sources