01
Retrieve through scope
Project, repo, task, client, runtime, and session narrow the eligible set before ranking. Cross-scope retrieval is explicit.
Local · source-backed · MCP
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.
The useful loop
OCBrain is not a second agent and not a bag of embeddings. It is the evidence layer beneath the agents you already use.
01
Project, repo, task, client, runtime, and session narrow the eligible set before ranking. Cross-scope retrieval is explicit.
02
Context stays bounded. When the decision needs more, an issued handle expands exact material with scope and content-hash checks.
03
Feedback records whether retrieval mattered. Closeout receipts connect context to actions, verifiers, and outcomes.
Start small
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 guidegit 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
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.
Two cross-domain negative controls that returned four and five filler memories now return zero.
A strong semantic positive control still returns all six relevant candidates after the tighter gate.
The tested head and merge commit have the same source tree. The full candidate gate passed 797 tests and Ruff before merge.
Deliberate boundaries
Go deeper