OpenClawBrain
Memory authority for local AI agents

Your AI should feel like it was actually there yesterday.

OpenClawBrain gives local agents continuity across projects, tools, and days. It remembers corrections, preferences, workflows, and handoffs, then checks whether each memory still deserves authority before it shapes the next turn.

Most memory systems stop at retrieval: find something similar and hope it helps. OpenClawBrain adds judgment. A memory can be relevant and still be stale, superseded, private, too broad, or overridden by what you just asked for.

Remember what matters. Trust the current instruction. Leave proof for every important memory decision.
OpenClawBrain constellation hero art with a luminous claw and evidence graph
Continuity, judgment, and local proof for agents that work across real projects.
Current release: v0.2.33 Continuity across tools Stale-memory judgment Memory Authority Graph Maintenance Local proof Codex-to-Telegram thread bridge Privacy-aware forgetting Quiet by default

The short version

If you are explaining OpenClawBrain to someone who has used AI assistants, start here:

OpenClawBrain is a local-first memory system for AI agents.

The core idea: an agent should not just remember more. It should know when the past is still allowed to guide the present.

OpenClawBrain remembers useful corrections, preferences, workflows, and handoffs. Before any memory reaches the prompt, it checks whether that memory is current, scoped, safe, non-superseded, and compatible with the user's current instruction.

That makes it different from generic memory, vector notes, or transcript recall: relevance is not authority.

Install or upgrade if you already run OpenClaw:
openclaw plugins install clawhub:openclawbrain@0.2.33 --force
openclaw plugins enable openclawbrain
openclaw gateway restart

What it does

Carries context forward

Project rules, workflow corrections, communication preferences, and handoff notes survive beyond a single chat window.

Uses memory with judgment

Old memories do not become permanent commands. They can be verified, weakened, confirmed, superseded, tombstoned, or ignored.

Maintains the graph

Duplicate nodes, stale high-authority memories, bad edges, scoped exceptions, and tombstone recapture risks are surfaced as auditable proposals.

Stays quiet when it should

Most memories stay out of the prompt. If the system is unsure, the better answer is often to ask, verify, or abstain.

Bridges Codex to Telegram

Codex UI stays the deep workbench. OpenClaw and Telegram become the mobile operator surface for recent messages, watches, blockers, handoffs, and trusted replies.

Why it stands apart

The next hard problem for AI memory is not storing more notes. It is deciding whether a remembered thing still has the right to influence behavior.

Generic memoryOpenClawBrain
Retrieves semantically similar memories.Separates relevance from authority before memory touches the prompt.
Treats preferences like permanent instructions.Treats soft preferences as defaults that current instructions can override.
Stores transcript-like context or vector notes.Stores scoped memories, authority decisions, tombstones, and proof events locally.
May silently reuse stale guidance.Can verify, ask, weaken, abstain, or mark a memory audit-only.
Optimizes for recall.Optimizes for trustworthy continuity.

The learning loop underneath

Under the simple product promise is an evidence loop. The model can interpret messy human feedback, but code owns validation, storage, promotion, rollback, and forgetting.

feedback and outcomes
 ↓
redacted route frames
 ↓
SQLite evidence graph
 ↓
shadow decisions and replay cases
 ↓
candidate policy snapshots
 ↓
calibration and promotion gates
 ↓
active route-policy-v3 route_fn
 ↓
bounded context injection or abstention

Harvest

Corrections, accept/reject signals, route misses, tool outcomes, and handoff decisions become compact evidence records instead of raw chat dumps.

Distill

The teacher turns messy interaction into structured route frames: action family, scope, risk, evidence ids, and why memory would or would not help.

Serve

The active v3 route_fn wins first. If confidence is too low, it abstains and falls back to v2 or heuristics rather than guessing.

The production update mode is gated_active: candidates can be distilled and evaluated automatically, but active serving still depends on validation, family-aware confidence floors, support thresholds, cooldowns, and rollback lineage.

Codex continuity: the workflow this enables

Jonathan now uses Codex UI as the high-bandwidth coding workbench. That is where deep edits, tests, and commits happen. But Codex UI is tied to the computer, while OpenClaw agents are reachable through Telegram from a phone.

OpenClawBrain turns that into a practical workflow: Codex does the deep work, OpenClaw stays reachable, and Telegram gets the exact recent messages, watched replies, blockers, and handoff signals that matter.

SurfaceJob
Codex UIThe focused workbench for code, diffs, tests, goals, and local execution.
OpenClawThe local host and operator that can be reached while the computer keeps working.
TelegramThe mobile command surface for status, latest messages, watched replies, failures, blockers, handoffs, and trusted replies.
OpenClawBrainThe continuity layer that decides which Codex state matters, what should stay quiet, and which thread is safe to write into.

One worked turn

You correct the agent:

Actually, use pnpm in this repo.

OpenClawBrain distills that into a scoped correction. Later, when you say “Run the tests,” it retrieves the correction and adds a small context block:

<openclawbrain_context>
Relevant memory:
- Must follow: Use pnpm instead of npm in this repo.
</openclawbrain_context>

The agent runs pnpm test without you re-teaching the repo convention.

Memory graph maintenance

OpenClawBrain now has a separate graph-maintenance layer. Memory Authority decides whether a memory can influence this turn. Graph Maintenance runs passively in the background, curating how the graph evolves after many turns, corrections, and outcomes.

/brain graph health
/brain graph dry-run
/brain graph proposals
/brain graph explain <proposal-id>
/brain graph apply <proposal-id>

It is conservative on purpose: every automatic cycle records dry-run/proposal history, only deterministic low-risk repairs can apply by themselves, and semantic, authority, scope, privacy, and tombstone changes stay review-gated.

Proof you can inspect

Memory should leave evidence. OpenClawBrain exposes plugin load, SQLite + FTS health, proof events, graph state, search, route learning, active policy snapshots, and recent injection decisions.

openclaw plugins inspect openclawbrain --runtime
openclaw doctor
# /plugins/openclawbrain/proof?limit=10
# /plugins/openclawbrain/search?query=pnpm&limit=10
# /plugins/openclawbrain/route-policy

Current production path: route-policy-v3 first, route-policy-v2 and heuristics as fallback/rollback only, with proof surfaces for route learning and injection decisions.

Codex continuity bridge

Jonathan uses Codex UI as the high-bandwidth coding workbench and OpenClaw/Telegram as the mobile operator surface. OpenClawBrain owns the continuity layer between them while OpenClaw stays stock and upgradeable.

/brain codex status
/brain codex threads
/brain codex last --latest
/brain codex messages --latest --limit 5
/brain codex bind <thread-id>
/brain codex tail --bound
/brain codex note The failure looks like the auth mock.
/brain codex act --with-notes Please fix only the focused test.
/brain codex steer --bound Stop after this test run and report blockers.
/brain codex detach
/brain codex handoff --bound

The bridge reads local Codex state, follows thread rollout files for direct message copy, stores only bridge-local cursors/audit events, and can attach passive notes, send explicit trusted actions, or steer active work through Codex app-server. Telegram gets operator text and selected assistant replies, not a noisy second coding UI.

Use status for a quick pulse, threads to find the right Codex goal, last/messages to copy what Codex just said, tail to follow briefly, note for passive context, act when Codex should do work, steer to redirect in-progress work, detach to stop forwarding, and handoff when you are walking back to the computer.

Latency shape

Prompt-time retrieval stays small. Heavier feedback distillation and route learning happen after the turn when they can.

retrieval: conservative and bounded
capture: audited
storage: strict, scoped, local
injection: sparse and relevance-gated

Install or upgrade

openclaw plugins install clawhub:openclawbrain@0.2.33
openclaw plugins enable openclawbrain
openclaw gateway restart

The GitHub README has the operator path: config, Ollama setup, runtime verification, endpoints, and debugging surfaces.