docs: update Lobster in-process mode and REM preview tooling

This commit is contained in:
Vincent Koc
2026-04-06 00:40:01 +01:00
parent 94d3153817
commit 0e85343b6c
3 changed files with 54 additions and 9 deletions

View File

@@ -34,6 +34,8 @@ openclaw memory status --deep --index
openclaw memory status --deep --index --verbose
openclaw memory status --agent main
openclaw memory index --agent main --verbose
openclaw memory promote-explain "router vlan"
openclaw memory rem-harness --json
```
## Options
@@ -90,6 +92,33 @@ Full options:
- `--include-promoted`: include already promoted candidates in output.
- `--json`: print JSON output.
`memory promote-explain`:
Explain why a specific candidate would or would not promote, with a full score breakdown.
```bash
openclaw memory promote-explain "<selector>"
```
- `<selector>`: candidate key, path fragment, or snippet fragment to match.
- `--agent <id>`: scope to a single agent (default: the default agent).
- `--include-promoted`: include already promoted candidates.
- `--json`: print JSON output.
`memory rem-harness`:
Preview REM reflections, candidate truths, and deep promotion output without writing anything. Useful for staging and debugging the REM phase before it runs for real.
```bash
openclaw memory rem-harness [--json] [--agent <id>] [--include-promoted]
```
- `--agent <id>`: scope to a single agent (default: the default agent).
- `--include-promoted`: include already promoted deep candidates.
- `--json`: print JSON output.
See [Dreaming](/concepts/dreaming) for the full phase model and how REM fits in.
## Dreaming (experimental)
Dreaming is the background memory consolidation system with three cooperative

View File

@@ -225,6 +225,20 @@ openclaw memory status --deep
See [memory CLI](/cli/memory) for the full flag reference.
### Preview and explain tools
Two additional subcommands help you inspect promotion and REM behavior without writing anything:
```bash
# Explain why a candidate would or would not promote
openclaw memory promote-explain "meeting notes"
# Preview REM reflections, candidate truths, and deep promotions
openclaw memory rem-harness --json
```
See [memory CLI](/cli/memory) for full options.
## How it works
### Light phase pipeline

View File

@@ -36,7 +36,7 @@ Lobster is intentionally small. The goal is not "a new language," it's a predict
## How it works
OpenClaw launches the local `lobster` CLI in **tool mode** and parses a JSON envelope from stdout.
OpenClaw runs Lobster workflows **in-process** using an embedded runner. No external CLI subprocess is spawned; the workflow engine executes inside the gateway process and returns a JSON envelope directly.
If the pipeline pauses for approval, the tool returns a `resumeToken` so you can continue later.
## Pattern: small CLI + JSON pipes + approvals
@@ -155,7 +155,9 @@ Notes:
## Install Lobster
Install the Lobster CLI on the **same host** that runs the OpenClaw Gateway (see the [Lobster repo](https://github.com/openclaw/lobster)), and ensure `lobster` is on `PATH`.
Bundled Lobster workflows run in-process; no separate `lobster` binary is required. The embedded runner ships with the Lobster plugin.
If you need the standalone Lobster CLI for development or external pipelines, install it from the [Lobster repo](https://github.com/openclaw/lobster) and ensure `lobster` is on `PATH`.
## Enable the tool
@@ -287,9 +289,9 @@ Continue a halted workflow after approval.
### Optional inputs
- `cwd`: Relative working directory for the pipeline (must stay within the current process working directory).
- `timeoutMs`: Kill the subprocess if it exceeds this duration (default: 20000).
- `maxStdoutBytes`: Kill the subprocess if stdout exceeds this size (default: 512000).
- `cwd`: Relative working directory for the pipeline (must stay within the gateway working directory).
- `timeoutMs`: Abort the workflow if it exceeds this duration (default: 20000).
- `maxStdoutBytes`: Abort the workflow if output exceeds this size (default: 512000).
- `argsJson`: JSON string passed to `lobster run --args-json` (workflow files only).
## Output envelope
@@ -317,17 +319,17 @@ OpenProse pairs well with Lobster: use `/prose` to orchestrate multi-agent prep,
## Safety
- **Local subprocess only** — no network calls from the plugin itself.
- **Local in-process only** — workflows execute inside the gateway process; no network calls from the plugin itself.
- **No secrets** — Lobster doesn't manage OAuth; it calls OpenClaw tools that do.
- **Sandbox-aware** — disabled when the tool context is sandboxed.
- **Hardened** — fixed executable name (`lobster`) on `PATH`; timeouts and output caps enforced.
- **Hardened** — timeouts and output caps enforced by the embedded runner.
## Troubleshooting
- **`lobster subprocess timed out`** → increase `timeoutMs`, or split a long pipeline.
- **`lobster timed out`** → increase `timeoutMs`, or split a long pipeline.
- **`lobster output exceeded maxStdoutBytes`** → raise `maxStdoutBytes` or reduce output size.
- **`lobster returned invalid JSON`** → ensure the pipeline runs in tool mode and prints only JSON.
- **`lobster failed (code …)`** → run the same pipeline in a terminal to inspect stderr.
- **`lobster failed`** → check gateway logs for the embedded runner error details.
## Learn more