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
- Daily Knowledge Mining — Removes the cron job
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 is missing
ByteRover CLI is missing
Cause: The
brv command is not in your PATH.Solution: Install the ByteRover CLI docsClawhub is missing
Clawhub is missing
Cause: The
clawhub command is not installed.Solution: Clawhub is part of the OpenClaw ecosystem. Refer to the Clawhub installation guide or install it from the OpenClaw gateway console UI.Failed to schedule cron job
Failed to schedule cron job
Cause: The OpenClaw CLI does not support cron commands or the command failed.Solution: Ensure the OpenClaw CLI supports cron commands:If the command is not recognized, update OpenClaw to the latest version.
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