Skip to content

Commit c357235

Browse files
committed
docs(memory): document active-memory circuit breaker config and lancedb memory query CLI
- docs/concepts/active-memory.md: extend the "Useful tuning fields" config table with the new `config.circuitBreakerMaxTimeouts` and `config.circuitBreakerCooldownMs` keys (with their schema-declared ranges and defaults) added by 89cd2b6, so operators tuning Active Memory recall after consecutive timeouts can find the knobs alongside `cacheTtlMs`. - docs/plugins/memory-lancedb.md: extend the "Commands" section with the new `openclaw memory query` subcommand 6b44dce registered when memory-lancedb is the active memory plugin, including the `--cols`, `--filter`, `--limit`, and `--order-by` options and the safety bounds (200-character filter cap, sanitized character allowlist, positive integer limit, in-memory order-by).
1 parent 0207f9c commit c357235

2 files changed

Lines changed: 23 additions & 8 deletions

File tree

docs/concepts/active-memory.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -579,14 +579,16 @@ The most important fields are:
579579

580580
Useful tuning fields:
581581

582-
| Key | Type | Meaning |
583-
| ----------------------------- | -------- | ---------------------------------------------------------------------------------- |
584-
| `config.maxSummaryChars` | `number` | Maximum total characters allowed in the active-memory summary |
585-
| `config.recentUserTurns` | `number` | Prior user turns to include when `queryMode` is `recent` |
586-
| `config.recentAssistantTurns` | `number` | Prior assistant turns to include when `queryMode` is `recent` |
587-
| `config.recentUserChars` | `number` | Max chars per recent user turn |
588-
| `config.recentAssistantChars` | `number` | Max chars per recent assistant turn |
589-
| `config.cacheTtlMs` | `number` | Cache reuse for repeated identical queries (range: 1000-120000 ms; default: 15000) |
582+
| Key | Type | Meaning |
583+
| ---------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
584+
| `config.maxSummaryChars` | `number` | Maximum total characters allowed in the active-memory summary |
585+
| `config.recentUserTurns` | `number` | Prior user turns to include when `queryMode` is `recent` |
586+
| `config.recentAssistantTurns` | `number` | Prior assistant turns to include when `queryMode` is `recent` |
587+
| `config.recentUserChars` | `number` | Max chars per recent user turn |
588+
| `config.recentAssistantChars` | `number` | Max chars per recent assistant turn |
589+
| `config.cacheTtlMs` | `number` | Cache reuse for repeated identical queries (range: 1000-120000 ms; default: 15000) |
590+
| `config.circuitBreakerMaxTimeouts` | `number` | Skip recall after this many consecutive timeouts for the same agent/model. Resets on a successful recall or after the cooldown expires (range: 1-20; default: 3). |
591+
| `config.circuitBreakerCooldownMs` | `number` | How long to skip recall after the circuit breaker trips, in ms (range: 5000-600000; default: 60000). |
590592

591593
## Recommended setup
592594

docs/plugins/memory-lancedb.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,19 @@ openclaw ltm search "project preferences"
221221
openclaw ltm stats
222222
```
223223

224+
The plugin also extends `openclaw memory` with a non-vector `query` subcommand
225+
that runs against the LanceDB table directly:
226+
227+
```bash
228+
openclaw memory query --cols id,text,createdAt --limit 20
229+
openclaw memory query --filter "category = 'preference'" --order-by createdAt:desc
230+
```
231+
232+
- `--cols <columns>`: comma-separated column allowlist (defaults to `id`, `text`, `importance`, `category`, `createdAt`).
233+
- `--filter <condition>`: SQL-style WHERE clause; capped at 200 characters and restricted to alphanumerics, comparison operators, quotes, parentheses, and a small set of safe punctuation.
234+
- `--limit <n>`: positive integer; default `10`.
235+
- `--order-by <column>:<asc|desc>`: in-memory sort applied after the filter; the sort column is auto-included in the projection.
236+
224237
Agents also get LanceDB memory tools from the active memory plugin:
225238

226239
- `memory_recall` for LanceDB-backed recall

0 commit comments

Comments
 (0)