CClawMetryDocs

CLI reference

clawmetry proxy#

A local proxy that sits in front of your model calls and enforces limits. Optional — observation does not need it — but it is the only place a budget can actually block rather than merely alert.

bash
clawmetry proxy start

Subcommands#

proxy start#

FlagDefaultEffect
--port4100Port to listen on
--host127.0.0.1Bind address
--daily-budget USDDaily spend limit
--monthly-budget USDMonthly spend limit
--no-loop-detectionDisable loop detection
--log-requestsLog every proxied request
--foregroundRun in the foreground
bash
clawmetry proxy start --daily-budget 25 --monthly-budget 400

proxy stop#

bash
clawmetry proxy stop

proxy status#

bash
clawmetry proxy status
clawmetry proxy status --json

proxy config#

Read or change the configuration without restarting.

FlagValuesEffect
--daily-budget USDSet the daily budget
--monthly-budget USDSet the monthly budget
--actionblock, warn, downgradeWhat happens at the limit
--loop-detectionon, offToggle loop detection
bash
clawmetry proxy config --daily-budget 50 --action warn
clawmetry proxy config --action block
clawmetry proxy config --loop-detection on

Budget actions#

ActionBehaviour at the limit
warnLet the call through, record and surface it
blockRefuse the call
downgradeRoute to a cheaper model instead of refusing

Start on warn. Moving to block before you trust the numbers is how people end up with a broken agent and no idea why. downgrade is the humane middle: the work continues, more cheaply, and the dashboard tells you it happened.

Pointing agents at it#

The proxy is a standard HTTP proxy for provider endpoints. Configure the runtime to use it as its base URL — the mechanism differs per runtime and per SDK, but it is the same base-URL override you would use for any gateway.

Why OpenClaw's pause needs it#

OpenClaw has no pause primitive. ClawMetry's pause for an OpenClaw session is a flag file that only the proxy enforces. With no proxy running, a "pause" on an OpenClaw session changes nothing, and the Guard tab reports advisory_only rather than claiming the agent was held.

If pausing OpenClaw agents matters to you, run the proxy.

Pause, stop, kill

Loop detection#

The proxy detects repeated identical calls in-flight, which is earlier than the transcript-based detectors can see them. The two are complementary: the proxy catches a tight loop before it costs much, the detectors catch the slower shapes — busy-but-not-progressing, repeated tool failures — that only appear over a window.

VariableEffect
CLAWMETRY_PROXY_DAILY_USDDaily budget
CLAWMETRY_PROXY_MONTHLY_USDMonthly budget
CLAWMETRY_PROXY_AUTO_ROUTEAutomatic model routing

Enforcement proxy for the design, and Budgets and limits for how it fits with alerts.

Cookie preferences