ocbrain

Local · source-backed · MCP

Memory your agents can inspect.

OCBrain gives Codex, Claude Code, OpenClaw, and compatible MCP clients one local evidence ledger—without turning chat history into unquestioned truth.

Every request is scoped. Every expandable source is hash-checked. Every useful retrieval can be linked to the action and outcome that followed.

Live source status · Current main includes the merged retrieval-hardening work from PR #10.

797tests on the merged source tree
0results for unrelated negative controls
8tools in the normal MCP profile

The useful loop

Retrieve less. Verify more. Learn from outcomes.

OCBrain is not a second agent and not a bag of embeddings. It is the evidence layer beneath the agents you already use.

01

Retrieve through scope

Project, repo, task, client, runtime, and session narrow the eligible set before ranking. Cross-scope retrieval is explicit.

02

Inspect the source

Context stays bounded. When the decision needs more, an issued handle expands exact material with scope and content-hash checks.

03

Close the loop

Feedback records whether retrieval mattered. Closeout receipts connect context to actions, verifiers, and outcomes.

Start small

One checkout. One client. One real round trip.

A fresh brain starts empty. Install the stable release, initialize an owner-only database, connect one compatible client, and verify actual tool use before adding anything else.

OpenClaw, Ollama, the training companion, and the operations companion are optional.

Open the complete install and upgrade guide
git clone https://github.com/jonathangu/ocbrain.git
cd ocbrain
git checkout v1.1.0
python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/ocbrain init
.venv/bin/ocbrain doctor

Unreleased main · merged 2026-08-03

When memory is weak, OCBrain now says nothing.

PR #10 is merged into main. The tested source raises lexical and dense admission thresholds so unrelated same-scope facts no longer pad a packet merely because something must rank first.

Honest empty results

Two cross-domain negative controls that returned four and five filler memories now return zero.

Recall still works

A strong semantic positive control still returns all six relevant candidates after the tighter gate.

Same tree, public CI

The tested head and merge commit have the same source tree. The full candidate gate passed 797 tests and Ruff before merge.

Deliberate boundaries

Useful memory should not acquire ambient authority.

  • Raw transcripts remain evidence, not automatically served truth.
  • The core installs no scheduler, timer, pager, or recurring maintenance.
  • Hosted delivery is filtered before ranking; local paths stay local.
  • Corrections and tombstones are later events, never silent rewrites.
  • Bundles are explicit operator file operations, not agent tools.

Go deeper

Use the page that matches the job.