ANSWER HUB

RunLedger cost budgets

Cost budgets make CI fail when reported spend crosses your ceiling.

budgets cost ci Updated 2026-01-26

Direct Answer

Cost budgets are optional gates that fail a run when the agent reports cost above max_cost_usd.

Quick Decision

Use RunLedger when Consider alternatives when
You can report cost per run. You cannot observe costs reliably.
You need hard cost caps in CI. You only want dashboards or alerts.
Costs are stable enough to gate. Costs are too variable to enforce.

Budget snippet

yaml
budgets:
          max_cost_usd: 0.25
          max_tool_calls: 10

Requirements

  • Your agent reports cost metrics for each task.
  • Budgets can be set in suite.yaml or per case.
  • Use alongside baselines to detect cost regressions.

Tradeoffs

  • Depends on accurate cost reporting from the agent.
  • Provider pricing changes can trigger new failures.
  • May need tuning to avoid noisy failures.

When NOT to use RunLedger

Avoid cost budgets when you cannot capture cost metrics or when usage is highly volatile.

Next steps