CClawMetryDocs

Runtime reference

OpenClaw#

OpenClaw is the runtime ClawMetry grew up around, and it is the most completely observed. Sessions, chat channels, cron jobs, memory files, skills and the live gateway are all read directly, and the gateway WebSocket gives sub-second liveness that filesystem polling cannot.

Runtime idopenclaw
CategoryPersonal agent gateway
VendorOpenClaw
TierFree in the OSS package
Upstreamgithub.com/openclaw/openclaw

Where the data comes from#

ClawMetry reads these locations, in order, and never writes to any of them.

  • ~/.openclaw/agents/main/sessions/*.jsonl — session transcripts
  • ~/.openclaw/<channel>/*.jsonl — one directory per chat adapter
  • ~/.openclaw/logs/ — rotating structured logs
  • ws://127.0.0.1:18789 — gateway JSON-RPC, live events

Format. Append-only JSONL per session in OpenClaw's v3 envelope, plus a live JSON-RPC WebSocket on port 18789.

Environment variables#

VariableEffect
OPENCLAW_HOMEworkspace root (auto-detected; default ~/.openclaw)
CLAWMETRY_OPENCLAW_DIRconfig directory override; also --openclaw-dir
OPENCLAW_GATEWAY_TOKENgateway auth token for the live WebSocket
OPENCLAW_GATEWAY_URLgateway URL if it is not on the default port
OPENCLAW_SESSIONS_DIRsession directory override
OPENCLAW_LOG_DIRlog directory override

See Environment variables for the variables that apply to every runtime.

Tokens and cost#

Tokens. Full split on disk (input, output, cache read, cache write).

Cost. Derived at ingest from the token split and the model, using the multi-provider pricing table.

Why this section exists

Runtimes differ enormously in what they persist. Rather than showing a plausible number everywhere, ClawMetry reports what the store actually contains and marks the rest unknown. A cost of $0.00 and a cost of unknown mean different things, and the dashboard keeps them different.

Sub-agents and delegation#

Sub-agent runs are first-class sessions with a parent link, so a Task fan-out shows as a tree rather than one flat log.

Things worth knowing#

  • parentId on an OpenClaw v3 event is a chain pointer (the previous event), not a tree parent. Reading it as a tree produces nonsense topology.
  • Sessions spawned by OpenClaw that shell out to the Claude CLI are recorded under the OpenClaw session UUID. The standalone Claude Code adapter deliberately skips those ids so the same work is not counted twice.

Verify it is being read#

bash
# Is this runtime detected, and would this install unlock it?
clawmetry runtimes --json | jq '.runtimes[] | select(.id=="openclaw")'

# Why is it locked, if it is?
clawmetry runtimes --why openclaw

# Any sessions ingested yet?
curl -s 'http://localhost:8900/api/local/sessions?limit=5' \
  | jq '.rows[] | {session_id, agent_id, events, cost_usd}'

If detection succeeds but no sessions appear, work through Troubleshooting — the usual causes are a relocated data directory (set the override above), a session limit that is hiding older runs, or a runtime that simply has not written anything yet.

Cookie preferences