Receipts
Every guarded run emits a receipt — a terminal summary, a single-file HTML report, and JSON.
Three formats
Every guarded run produces a receipt in three shapes:
- Terminal — a concise summary printed at the end of the run.
- HTML — a single, self-contained file you can open, save, or share.
- JSON — machine-readable, for CI gates and dashboards.
What's in a receipt
- Budget vs spent — what the run was allowed, and what it used.
- Waste averted — the projected uncapped spend minus the actual spend (what the budget saved).
- Hops — each step, its model, tokens in/out, and cost.
- Trip reason — if the run paused or was killed, why.
- Side effects — any side-effecting tools that fired before the run stopped.
Honesty
Token counts are self-metered per model family — exact tiktoken for OpenAI, a conservative o200k-based approximation for Anthropic/Google (whose exact tokenizers are API-only, which offline metering can't call) — then reconciled against the provider's reported usage, so the billed number reflects what actually happened, not an estimate. Prompts and keys are never part of the event stream.
Audit artifact & blast radius
Every receipt is an audit artifact: it carries the run_id, the start timestamp, the attribution
tags (team/customer/env), and exactly what was spent — offline, owned, no backend.
When a run trips with side-effecting tools already fired, the receipt leads with a blast radius block — a compensation checklist of what hit the world before the stop:
⚠ blast radius — these side-effects already fired, verify/compensate:
☐ send_email
☐ post_to_cms"If it stopped mid-run, what did it do to the world?" — answered in the artifact, not a war-room.
CI budget gate
Fail a pull request when an agent's provable worst-case dollar ceiling exceeds a limit — statically, with no API calls and no keys.
OpenTelemetry
Stream guarded runs into any OTel-native observability backend — Phoenix, Arize, Langfuse — using GenAI semantic conventions. Optional and off by default.