Skip to content
SlashClone

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.

SkillDevOpsv1.0.0 (latest)Tested
Activity
New: be the first to try it
  1. 1{
  2. 2 "warn_at": 0.8,
  3. 3 "defaults": {
  4. 4 "daily_cap_usd": 6,
  5. 5 "monthly_cap_usd": 100,
  6. 6 "run_cost_cap_usd": 3,
  7. 7 "max_calls_per_run": 25
  8. 8 },
  9. 9 "customers": {
  10. 10 "cobalt-labs": { "monthly_cap_usd": 60, "daily_cap_usd": 4 },
  11. 11 "foxglove-retail": { "monthly_cap_usd": 10, "daily_cap_usd": 1 }
  12. 12 },
  13. 13 "anomaly": { "multiplier": 3, "baseline_days": 7, "min_usd": 1 },
  14. 14 "failure_rate": { "max": 0.4, "min_runs": 5 }