Install
openclaw plugins install clawhub:openclaw-run-observer@latestCapture OpenClaw run inputs, outputs, usage, and context, persist recent attempts, and inspect them in a live local viewer.
openclaw plugins install clawhub:openclaw-run-observer@latest🔍 Native OpenClaw observability plugin — track every token dollar precisely, and pinpoint exactly why your agent went silent.
Ever wonder how much that agent run actually cost you? Run Observer shows two cost perspectives side by side so you never have to guess:
usage.cost. This is the closest number to what actually shows up on your invoice.input, output, cacheRead, cacheWrite) multiplied by the best available pricing table. When your provider doesn't report billing data, this keeps cost visibility alive.The viewer displays both in a compact $0.0042($0.0040) badge, letting you cross-check and catch billing anomalies at a glance. Why might they differ? Providers can round, bundle, or discount charges in ways raw token counts alone can't capture, and the local estimate depends on the pricing catalog available at capture time.
Sometimes OpenClaw just... stops. No error, no output, just silence. Instead of guessing, you need to see exactly what happened inside the engine.
Run Observer captures the full input/output chain for every run: system prompt → user messages → model response (or the absence of one). When your agent goes silent, you can immediately see:
Stop guessing. Start debugging with full visibility.
Assumes OpenClaw is already installed.
openclaw plugins install clawhub:openclaw-run-observer
openclaw plugins install npm:openclaw-run-observer
Note: On newer OpenClaw versions, a bare package name is checked against ClawHub first and falls back to npm if not found. Use the
clawhub:ornpm:prefix if you want the source to be unambiguous.
Verify the plugin is installed:
openclaw plugins inspect run-observer
Start the gateway:
openclaw gateway run --bind loopback --allow-unconfigured
If the gateway is already running, restart it instead:
openclaw gateway restart
Open the local viewer:
openclaw run-observer url
Open the printed URL in a browser on the same machine running OpenClaw. The viewer updates live as new runs arrive.
(Optional) Quick health check:
URL="$(openclaw run-observer url)"
curl --max-time 5 -s -o /tmp/run-observer.html -w 'HTTP %{http_code}\n' "$URL"
HTTP 200 means everything is working.
Once installed and the gateway is running, the viewer automatically captures all runs. In the browser you get:
openclaw run-observer rotate-token
Rotating the token invalidates any previously shared viewer links.
openclaw plugins update run-observer
Or update all plugins at once:
openclaw plugins update --all
| Reported Cost | Estimated Cost | |
|---|---|---|
| Source | Provider-returned usage.cost | Local token counts × pricing table |
| Accuracy | Closest to your actual invoice | Best-effort approximation |
| Use case | Day-to-day cost tracking | Fallback when provider omits billing data |
models.json cost data in the state directoryIf no matching pricing entry is found for the token buckets used by the run, estimated cost shows as n/a.
https://cdn.simpleicons.org and provider icons from https://unpkg.com/@lobehub/icons-static-png@latest/light; the viewer does not send telemetryThis package declares compatibility through the openclaw.compat metadata in package.json. The published package should track the OpenClaw plugin API and minimum gateway version listed there.
pnpm install
pnpm run check
Build output is emitted to dist/:
pnpm run build
For local plugin development, a watch loop rebuilds on TypeScript changes and restarts the gateway after each successful build:
pnpm run dev
Update the version in package.json
Run pnpm run check
Commit:
git add .
git commit -m "chore(release): prepare vX.Y.Z"
Create and push the tag:
git tag -a vX.Y.Z -m "vX.Y.Z"
git push origin main --follow-tags
Pushing vX.Y.Z triggers CI to publish to both npm and ClawHub.