Configuration Reference
Context Engine
Added toopenclaw.json:
How the context engine works
How the context engine works
The plugin participates in two lifecycle methods:
- Assemble (before each model run) — Extracts the user’s query, runs
brv queryto retrieve curated knowledge from the context tree, and injects it as asystemPromptAddition. - After Turn (after each run completes) — Serializes the conversation turn and runs
brv curateasynchronously to extract and store valuable knowledge back into the context tree.
ownsCompaction: false), so built-in auto-compaction continues to work as normal.Automatic Memory Flush
Added toopenclaw.json:
Uninstalling
Re-run the script and decline each feature when prompted:- Context Engine — Uninstalls the plugin and removes config entries
- Memory Flush — Removes compaction config
Troubleshooting
Config file not found
Config file not found
Cause: OpenClaw has not been initialized.Solution: Install and run OpenClaw first:
https://docs.openclaw.ai/install
Config file is not valid JSON
Config file is not valid JSON
Cause: Your
~/.openclaw/openclaw.json is corrupted.Solution: Restore from a backup. The script automatically reverts to the backup if an error occurs during patching. To restore manually:ByteRover CLI auto-install failed
ByteRover CLI auto-install failed
Cause: The setup script attempted See the installation docs for offline or package-manager options.
curl -fsSL https://byterover.dev/install.sh | sh but it failed (no network, sandboxed shell, etc.).Solution: Install the ByteRover CLI manually and re-run the setup script:Clawhub skill install failed
Clawhub skill install failed
Cause: The setup script attempted
npx clawhub@latest install byterover --force but it failed (no npx on PATH, no network).Solution: Install npx/Node.js, then re-run the setup script. To install the skill manually:Plugin not loading
Plugin not loading
Cause: The plugin is not installed,
brv is not in PATH, or the plugin is not enabled.Solution:- Check that the plugin is installed and active:
- Run the plugin diagnostics tool:
- Check that
brvis in your PATH: - Verify the plugin is enabled in config:
File Reference
| Path | Description |
|---|---|
~/.openclaw/openclaw.json | OpenClaw configuration (patched by script) |
~/.openclaw/openclaw.json.bak.* | Timestamped config backups |
~/.openclaw/{workspace}/.brv/ | ByteRover context tree storage |
~/.openclaw/skills/byterover/ | ByteRover skill (installed via Clawhub) |
Advanced
How it works: workspace structure
How it works: workspace structure
OpenClaw agents use multiple workspaces — one per agent:The setup script scans All ByteRover operations execute against the
openclaw.json for configured workspaces and updates their protocol files (AGENTS.md, TOOLS.md) with ByteRover usage instructions. The .brv/ context tree directory is created automatically on first use:.brv directory in the current workspace.Migrating existing memory data
Migrating existing memory data
If you already have OpenClaw memory files (daily logs in ByteRover reads each file, extracts valuable insights, and organizes them into the context tree automatically:
memory/), you can migrate them to ByteRover’s context tree. Navigate to your workspace and run:Legacy plugin (deprecated)
Legacy plugin (deprecated)
The legacy plugin uses OpenClaw’s hook system instead of the context engine lifecycle:It intercepts the
before_prompt_build event, extracts the user’s query, runs brv query to retrieve context, and prepends it as a ## ByteRover Context (Auto-Enriched) section.The legacy plugin does not automatically curate conversation turns — it only retrieves context.Files changed: ~/.openclaw/extensions/byterover/index.ts, openclaw.plugin.json and ~/.openclaw/openclaw.jsonNext Steps
Onboard Context
Learn how to onboard context into ByteRover