Consumption guardrails
@agentcosts/consumption-guardrails
Set and check consumption guardrails for an AI product: per-customer daily and monthly spend caps, month-end forecasts, spend spike rules, runaway agent runs, and failure rate spikes, plus a runbook for what to do when each alert fires. Runs on usage files; exit code 2 on critical alerts for cron or CI.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1{
- 2 "warn_at": 0.8,
- 3 "defaults": {
- 4 "daily_cap_usd": 6,
- 5 "monthly_cap_usd": 100,
- 6 "run_cost_cap_usd": 3,
- 7 "max_calls_per_run": 25
- 8 },
- 9 "customers": {
- 10 "cobalt-labs": { "monthly_cap_usd": 60, "daily_cap_usd": 4 },
- 11 "foxglove-retail": { "monthly_cap_usd": 10, "daily_cap_usd": 1 }
- 12 },
- 13 "anomaly": { "multiplier": 3, "baseline_days": 7, "min_usd": 1 },
- 14 "failure_rate": { "max": 0.4, "min_runs": 5 }
- 15}
