Skip to main content

Budget Controls

Set hard spending limits on your agents. Auto-block when thresholds are hit.

Why this matters

Uber burned its entire annual AI budget in 4 months after giving 5,000 engineers Claude Code access. One SaaS team (35 engineers) got a $50,000 April bill from Claude Code, Cursor, and custom agents combined. Budget controls put a hard ceiling on what any agent can spend — per session, per day, or per month.

Configure a budget

Or via the dashboard: Agents → Select agent → Budget tab.

Pass estimated cost on each call

Polaxis tracks cumulative spend in real time and blocks the next call if the budget is exceeded.

What happens when the limit is hit

The agent raises BlockedError with reason="budget_exceeded". Your code decides whether to fail gracefully, notify the user, or queue for the next day.

Budget types

All three can be set simultaneously. The first limit hit triggers a block.

Set budgets via API

View spend in the dashboard

Dashboard → Budgets shows:
  • Current spend per agent (today, this month)
  • Spend rate over time
  • Blocked calls due to budget limits
  • Per-tool cost breakdown

Soft alerts before the hard stop

Set alert_at_pct to get a Slack notification before the limit is hit:
The alert gives your team time to intervene before the agent stops cold.