Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ Browse the full manual at
[Extensibility](https://www.hybridclaw.io/docs/extensibility),
[Bundled Skills](https://www.hybridclaw.io/docs/guides/bundled-skills),
[Plugin System](https://www.hybridclaw.io/docs/extensibility/plugins),
[ByteRover Memory Plugin](https://www.hybridclaw.io/docs/extensibility/byterover-memory-plugin),
[Honcho Memory Plugin](https://www.hybridclaw.io/docs/extensibility/honcho-memory-plugin), and
[MemPalace Memory Plugin](https://www.hybridclaw.io/docs/extensibility/mempalace-memory-plugin)
- Configuration:
Expand Down
1 change: 1 addition & 0 deletions docs/development/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Main docs landing pages:
- [Extensibility](./extensibility/README.md)
- [Adaptive Skills](./extensibility/adaptive-skills.md)
- [Agent Packages](./extensibility/agent-packages.md)
- [ByteRover Memory Plugin](./extensibility/byterover-memory-plugin.md)
- [Honcho Memory Plugin](./extensibility/honcho-memory-plugin.md)
- [MemPalace Memory Plugin](./extensibility/mempalace-memory-plugin.md)
- [OTEL Plugin](./extensibility/otel-plugin.md)
Expand Down
157 changes: 157 additions & 0 deletions docs/development/extensibility/byterover-memory-plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
title: ByteRover Memory Plugin
description: Setup, configuration, commands, and runtime behavior for the bundled `byterover-memory` plugin.
sidebar_position: 8
---

# ByteRover Memory Plugin

HybridClaw ships a bundled ByteRover integration at
[`plugins/byterover-memory`](https://github.com/HybridAIOne/hybridclaw/tree/main/plugins/byterover-memory).

The plugin keeps HybridClaw built-in memory active and adds ByteRover in four
places:

- prompt-time recall through `brv query` using the latest user message
- model tools: `brv_query`, `brv_curate`, and `brv_status`
- a local operator command: `/byterover ...`
- background curation for finished turns, successful native `memory` writes,
and pre-compaction summaries

Like `honcho-memory`, ByteRover is marked as an external `memoryProvider`.
Only one such plugin can be active at a time, alongside HybridClaw's built-in
`MEMORY.md`, `USER.md`, and SQLite session store.

## Install

1. Install the ByteRover CLI:

```bash
npm install -g byterover-cli
# or
curl -fsSL https://byterover.dev/install.sh | sh
```

2. Install the bundled plugin from this repo:

```bash
hybridclaw plugin install ./plugins/byterover-memory
```

3. Reload plugins in an active session:

```text
/plugin reload
```

4. Optional: store a ByteRover cloud key through HybridClaw secrets:

```text
/secret set BRV_API_KEY your-byterover-key
```

The key is optional. Without it, ByteRover still runs in local-first mode as
long as the `brv` CLI is installed.

## Config

The plugin works with defaults after install. A small explicit config looks
like this:

```json
{
"plugins": {
"list": [
{
"id": "byterover-memory",
"enabled": true,
"config": {
"command": "brv",
"workingDirectory": "~/.hybridclaw/byterover",
"maxInjectedChars": 4000,
"queryTimeoutMs": 10000,
"curateTimeoutMs": 120000
}
}
]
}
}
```

Supported config keys:

- `command`: ByteRover executable to spawn. Defaults to `brv`.
- `workingDirectory`: cwd used for every `brv` invocation. Defaults to
`<runtime-home>/byterover`, so the knowledge tree is profile-scoped rather
than repo-scoped.
- `autoCurate`: when `true`, queue `brv curate` after completed assistant
turns. Defaults to `true`.
- `mirrorMemoryWrites`: when `true`, mirror successful native `memory` writes
into ByteRover as labeled curations. Defaults to `true`.
- `maxInjectedChars`: prompt budget for auto-injected ByteRover recall.
- `queryTimeoutMs`: timeout for prompt recall, `brv_query`, and
`/byterover query`.
- `curateTimeoutMs`: timeout for queued and explicit `brv curate` calls.

## Behavior

- Before each turn, the plugin runs `brv query -- <latest-user-message>`.
- If ByteRover returns usable text, that recall is injected into prompt context
as current-turn external memory.
- The plugin also injects a short tool-use guide so the model knows when to use
`brv_query`, `brv_curate`, and `brv_status`.
- After a completed turn, the plugin queues a `brv curate` call with a compact
`User:` / `Assistant:` summary.
- Successful native `memory` writes are mirrored into ByteRover with labels
such as `User profile` or `Durable memory`.
- Before compaction, the plugin curates the compaction summary plus a few recent
user/assistant excerpts so older context is not lost before SQLite archival.
- All ByteRover calls run on the gateway host process, not inside the agent
container.

## Tools and Commands

### Model tools

- `brv_status`: show ByteRover CLI health, working directory, and whether
`BRV_API_KEY` is configured
- `brv_query`: search ByteRover memory for relevant prior knowledge
- `brv_curate`: explicitly store durable facts, decisions, or preferences

### Local command

```text
/byterover status
/byterover query auth migration
/byterover curate Remember that concise answers are preferred.
```

The command is a direct CLI passthrough with `status` as the default when no
subcommand is given.

## Verifying It

1. Confirm the plugin is enabled:

```text
/plugin list
/byterover status
```

2. Check that the model can see the tools:

```text
/show tools
```

Expected: `brv_query`, `brv_curate`, and `brv_status` appear.

3. Give the agent a few durable facts, then ask a follow-up question that
should benefit from recall.

4. Confirm plugin usage:

- the TUI footer shows `plugins: byterover-memory` when prompt recall was
injected
- `/byterover query <term>` returns the same kind of knowledge the prompt
path is using
4 changes: 4 additions & 0 deletions docs/static/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export const DEVELOPMENT_DOCS_SECTIONS = [
{ title: 'Extensibility', path: 'extensibility/README.md' },
{ title: 'Adaptive Skills', path: 'extensibility/adaptive-skills.md' },
{ title: 'Agent Packages', path: 'extensibility/agent-packages.md' },
{
title: 'ByteRover Memory Plugin',
path: 'extensibility/byterover-memory-plugin.md',
},
{
title: 'Honcho Memory Plugin',
path: 'extensibility/honcho-memory-plugin.md',
Expand Down
50 changes: 50 additions & 0 deletions plugins/byterover-memory/hybridclaw.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
id: byterover-memory
name: ByteRover Memory
version: 0.1.0
kind: memory
memoryProvider: true
description: Mirror HybridClaw turns into ByteRover, inject prompt-time recall, and expose ByteRover memory tools.
entrypoint: src/index.js
credentials:
- BRV_API_KEY
requires:
bins:
- name: brv
configKey: command
installHint: npm install -g byterover-cli
installUrl: https://byterover.dev
externalDependencies:
- name: brv
check: brv --version
installHint: npm install -g byterover-cli
installUrl: https://byterover.dev
configSchema:
type: object
additionalProperties: false
properties:
command:
type: string
default: brv
workingDirectory:
type: string
autoCurate:
type: boolean
default: true
mirrorMemoryWrites:
type: boolean
default: true
maxInjectedChars:
type: number
default: 4000
minimum: 500
maximum: 16000
queryTimeoutMs:
type: number
default: 10000
minimum: 1000
maximum: 60000
curateTimeoutMs:
type: number
default: 120000
minimum: 1000
maximum: 600000
10 changes: 10 additions & 0 deletions plugins/byterover-memory/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "hybridclaw-plugin-byterover-memory",
"private": true,
"version": "0.1.0",
"type": "module",
"description": "HybridClaw memory plugin for ByteRover CLI recall and curation",
"engines": {
"node": "22.x"
}
}
Loading
Loading