|
| 1 | +--- |
| 2 | +title: ByteRover Memory Plugin |
| 3 | +description: Setup, configuration, commands, and runtime behavior for the bundled `byterover-memory` plugin. |
| 4 | +sidebar_position: 8 |
| 5 | +--- |
| 6 | + |
| 7 | +# ByteRover Memory Plugin |
| 8 | + |
| 9 | +HybridClaw ships a bundled ByteRover integration at |
| 10 | +[`plugins/byterover-memory`](https://github.com/HybridAIOne/hybridclaw/tree/main/plugins/byterover-memory). |
| 11 | + |
| 12 | +The plugin keeps HybridClaw built-in memory active and adds ByteRover in four |
| 13 | +places: |
| 14 | + |
| 15 | +- prompt-time recall through `brv query` using the latest user message |
| 16 | +- model tools: `brv_query`, `brv_curate`, and `brv_status` |
| 17 | +- a local operator command: `/byterover ...` |
| 18 | +- background curation for finished turns, successful native `memory` writes, |
| 19 | + and pre-compaction summaries |
| 20 | + |
| 21 | +Like `honcho-memory`, ByteRover is marked as an external `memoryProvider`. |
| 22 | +Only one such plugin can be active at a time, alongside HybridClaw's built-in |
| 23 | +`MEMORY.md`, `USER.md`, and SQLite session store. |
| 24 | + |
| 25 | +## Install |
| 26 | + |
| 27 | +1. Install the ByteRover CLI: |
| 28 | + |
| 29 | + ```bash |
| 30 | + npm install -g byterover-cli |
| 31 | + # or |
| 32 | + curl -fsSL https://byterover.dev/install.sh | sh |
| 33 | + ``` |
| 34 | + |
| 35 | +2. Install the bundled plugin from this repo: |
| 36 | + |
| 37 | + ```bash |
| 38 | + hybridclaw plugin install ./plugins/byterover-memory |
| 39 | + ``` |
| 40 | + |
| 41 | +3. Reload plugins in an active session: |
| 42 | + |
| 43 | + ```text |
| 44 | + /plugin reload |
| 45 | + ``` |
| 46 | + |
| 47 | +4. Optional: store a ByteRover cloud key through HybridClaw secrets: |
| 48 | + |
| 49 | + ```text |
| 50 | + /secret set BRV_API_KEY your-byterover-key |
| 51 | + ``` |
| 52 | + |
| 53 | +The key is optional. Without it, ByteRover still runs in local-first mode as |
| 54 | +long as the `brv` CLI is installed. |
| 55 | + |
| 56 | +## Config |
| 57 | + |
| 58 | +The plugin works with defaults after install. A small explicit config looks |
| 59 | +like this: |
| 60 | + |
| 61 | +```json |
| 62 | +{ |
| 63 | + "plugins": { |
| 64 | + "list": [ |
| 65 | + { |
| 66 | + "id": "byterover-memory", |
| 67 | + "enabled": true, |
| 68 | + "config": { |
| 69 | + "command": "brv", |
| 70 | + "workingDirectory": "~/.hybridclaw/byterover", |
| 71 | + "maxInjectedChars": 4000, |
| 72 | + "queryTimeoutMs": 10000, |
| 73 | + "curateTimeoutMs": 120000 |
| 74 | + } |
| 75 | + } |
| 76 | + ] |
| 77 | + } |
| 78 | +} |
| 79 | +``` |
| 80 | + |
| 81 | +Supported config keys: |
| 82 | + |
| 83 | +- `command`: ByteRover executable to spawn. Defaults to `brv`. |
| 84 | +- `workingDirectory`: cwd used for every `brv` invocation. Defaults to |
| 85 | + `<runtime-home>/byterover`, so the knowledge tree is profile-scoped rather |
| 86 | + than repo-scoped. |
| 87 | +- `autoCurate`: when `true`, queue `brv curate` after completed assistant |
| 88 | + turns. Defaults to `true`. |
| 89 | +- `mirrorMemoryWrites`: when `true`, mirror successful native `memory` writes |
| 90 | + into ByteRover as labeled curations. Defaults to `true`. |
| 91 | +- `maxInjectedChars`: prompt budget for auto-injected ByteRover recall. |
| 92 | +- `queryTimeoutMs`: timeout for prompt recall, `brv_query`, and |
| 93 | + `/byterover query`. |
| 94 | +- `curateTimeoutMs`: timeout for queued and explicit `brv curate` calls. |
| 95 | + |
| 96 | +## Behavior |
| 97 | + |
| 98 | +- Before each turn, the plugin runs `brv query -- <latest-user-message>`. |
| 99 | +- If ByteRover returns usable text, that recall is injected into prompt context |
| 100 | + as current-turn external memory. |
| 101 | +- The plugin also injects a short tool-use guide so the model knows when to use |
| 102 | + `brv_query`, `brv_curate`, and `brv_status`. |
| 103 | +- After a completed turn, the plugin queues a `brv curate` call with a compact |
| 104 | + `User:` / `Assistant:` summary. |
| 105 | +- Successful native `memory` writes are mirrored into ByteRover with labels |
| 106 | + such as `User profile` or `Durable memory`. |
| 107 | +- Before compaction, the plugin curates the compaction summary plus a few recent |
| 108 | + user/assistant excerpts so older context is not lost before SQLite archival. |
| 109 | +- All ByteRover calls run on the gateway host process, not inside the agent |
| 110 | + container. |
| 111 | + |
| 112 | +## Tools and Commands |
| 113 | + |
| 114 | +### Model tools |
| 115 | + |
| 116 | +- `brv_status`: show ByteRover CLI health, working directory, and whether |
| 117 | + `BRV_API_KEY` is configured |
| 118 | +- `brv_query`: search ByteRover memory for relevant prior knowledge |
| 119 | +- `brv_curate`: explicitly store durable facts, decisions, or preferences |
| 120 | + |
| 121 | +### Local command |
| 122 | + |
| 123 | +```text |
| 124 | +/byterover status |
| 125 | +/byterover query auth migration |
| 126 | +/byterover curate Remember that concise answers are preferred. |
| 127 | +``` |
| 128 | + |
| 129 | +The command is a direct CLI passthrough with `status` as the default when no |
| 130 | +subcommand is given. |
| 131 | + |
| 132 | +## Verifying It |
| 133 | + |
| 134 | +1. Confirm the plugin is enabled: |
| 135 | + |
| 136 | + ```text |
| 137 | + /plugin list |
| 138 | + /byterover status |
| 139 | + ``` |
| 140 | + |
| 141 | +2. Check that the model can see the tools: |
| 142 | + |
| 143 | + ```text |
| 144 | + /show tools |
| 145 | + ``` |
| 146 | + |
| 147 | + Expected: `brv_query`, `brv_curate`, and `brv_status` appear. |
| 148 | + |
| 149 | +3. Give the agent a few durable facts, then ask a follow-up question that |
| 150 | + should benefit from recall. |
| 151 | + |
| 152 | +4. Confirm plugin usage: |
| 153 | + |
| 154 | + - the TUI footer shows `plugins: byterover-memory` when prompt recall was |
| 155 | + injected |
| 156 | + - `/byterover query <term>` returns the same kind of knowledge the prompt |
| 157 | + path is using |
0 commit comments