vibe-billing
v0.5.62
Published
Agent Runtime Control — Loop detection, prompt caching, budget enforcement, and waste scanning for autonomous AI agents.
Maintainers
Readme
vibe-billing
vibe-billing is a trust-first CLI for scanning agent waste and routing supported agent traffic through the Vibe Billing firewall.
Install / Setup
npx vibe-billing setupsetup does three things:
- Detects supported local agent installs such as OpenClaw and Claude Code.
- Writes managed
OPENAI_BASE_URL/ANTHROPIC_BASE_URLrouting blocks into your shell config and, when OpenClaw is present,~/.openclaw/.env. - Verifies the firewall can be reached. If OpenClaw is detected, it only reports full success after a real OpenClaw request is verified through the proxy.
Scan First
Run npx vibe-billing scan to inspect local Claude Code and OpenClaw logs before changing anything.
Agent Waste Report
Runs analyzed: 142
Retry loops: 18
Context re-sends: 32
Overkill model usage: 56
Total agent spend: $124.50
Estimated wasted spend: $102.09
Fix with:
npx vibe-billing setupValidate Your Setup
Use these commands after install:
npx vibe-billing verify
npx vibe-billing doctorverifyruns the end-to-end validation flow.doctorruns the same checks and exits nonzero when a required check fails.
When OpenClaw is installed, validation checks:
- proxy reachability
- shell env state
- the managed
~/.openclaw/.envrouting block - supported API-key auth for Anthropic or OpenAI
- a real OpenClaw smoke request through the firewall
Supported Integrations
Current integration targets are:
- OpenClaw via
~/.openclaw/.envplus standard provider env vars - Claude Code via
ANTHROPIC_BASE_URL - OpenAI SDK / OpenAI-compatible tools via
OPENAI_BASE_URL - Anthropic SDK via
ANTHROPIC_BASE_URL
Current support boundary:
- OpenClaw API-key / BYOK flows for Anthropic and OpenAI are the intended support path. Run
npx vibe-billing doctorto confirm your local agent actually routes through the firewall. - OpenClaw OAuth/account-linked flows are not verified yet.
vibe-billingdoes not patchopenclaw.json.
How Routing Works
Vibe Billing routes traffic to the managed firewall endpoint:
Your Agent -> Vibe Billing firewall -> AI providerThe CLI uses managed env blocks instead of deep app mutation:
- shell config gets
OPENAI_BASE_URLandANTHROPIC_BASE_URL - OpenClaw gets the same routing values in
~/.openclaw/.env
Uninstall
To remove the managed routing blocks:
npx vibe-billing uninstalluninstall removes only the managed shell and OpenClaw env blocks added by the CLI.
If OpenClaw still has custom baseURL entries inside auth-profiles.json, uninstall will warn about them instead of silently changing them. Remove those overrides yourself if you want a fully direct, no-proxy OpenClaw setup.
