Skip to content

Commit 86a7fd2

Browse files
author
Benedikt Koehler
committed
feat: add byterover memory plugin
1 parent 1194cd7 commit 86a7fd2

10 files changed

Lines changed: 1460 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ Browse the full manual at
159159
[Extensibility](https://www.hybridclaw.io/docs/development/extensibility),
160160
[Bundled Skills](https://www.hybridclaw.io/docs/development/guides/bundled-skills),
161161
[Plugin System](https://www.hybridclaw.io/docs/development/extensibility/plugins),
162+
[ByteRover Memory Plugin](https://www.hybridclaw.io/docs/development/extensibility/byterover-memory-plugin),
162163
[Honcho Memory Plugin](https://www.hybridclaw.io/docs/development/extensibility/honcho-memory-plugin), and
163164
[MemPalace Memory Plugin](https://www.hybridclaw.io/docs/development/extensibility/mempalace-memory-plugin)
164165
- Configuration:

docs/development/agents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Main docs landing pages:
4343
- [Extensibility](./extensibility/README.md)
4444
- [Adaptive Skills](./extensibility/adaptive-skills.md)
4545
- [Agent Packages](./extensibility/agent-packages.md)
46+
- [ByteRover Memory Plugin](./extensibility/byterover-memory-plugin.md)
4647
- [Honcho Memory Plugin](./extensibility/honcho-memory-plugin.md)
4748
- [MemPalace Memory Plugin](./extensibility/mempalace-memory-plugin.md)
4849
- [OTEL Plugin](./extensibility/otel-plugin.md)
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
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

docs/static/docs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export const DEVELOPMENT_DOCS_SECTIONS = [
3737
{ title: 'Extensibility', path: 'extensibility/README.md' },
3838
{ title: 'Adaptive Skills', path: 'extensibility/adaptive-skills.md' },
3939
{ title: 'Agent Packages', path: 'extensibility/agent-packages.md' },
40+
{
41+
title: 'ByteRover Memory Plugin',
42+
path: 'extensibility/byterover-memory-plugin.md',
43+
},
4044
{
4145
title: 'Honcho Memory Plugin',
4246
path: 'extensibility/honcho-memory-plugin.md',
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
id: byterover-memory
2+
name: ByteRover Memory
3+
version: 0.1.0
4+
kind: memory
5+
memoryProvider: true
6+
description: Mirror HybridClaw turns into ByteRover, inject prompt-time recall, and expose ByteRover memory tools.
7+
entrypoint: src/index.js
8+
credentials:
9+
- BRV_API_KEY
10+
requires:
11+
bins:
12+
- name: brv
13+
configKey: command
14+
installHint: npm install -g byterover-cli
15+
installUrl: https://byterover.dev
16+
externalDependencies:
17+
- name: brv
18+
check: brv --version
19+
installHint: npm install -g byterover-cli
20+
installUrl: https://byterover.dev
21+
configSchema:
22+
type: object
23+
additionalProperties: false
24+
properties:
25+
command:
26+
type: string
27+
default: brv
28+
workingDirectory:
29+
type: string
30+
autoCurate:
31+
type: boolean
32+
default: true
33+
mirrorMemoryWrites:
34+
type: boolean
35+
default: true
36+
maxInjectedChars:
37+
type: number
38+
default: 4000
39+
minimum: 500
40+
maximum: 16000
41+
queryTimeoutMs:
42+
type: number
43+
default: 10000
44+
minimum: 1000
45+
maximum: 60000
46+
curateTimeoutMs:
47+
type: number
48+
default: 120000
49+
minimum: 1000
50+
maximum: 600000
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "hybridclaw-plugin-byterover-memory",
3+
"private": true,
4+
"version": "0.1.0",
5+
"type": "module",
6+
"description": "HybridClaw memory plugin for ByteRover CLI recall and curation",
7+
"engines": {
8+
"node": "22.x"
9+
}
10+
}

0 commit comments

Comments
 (0)