Documentation Index
Fetch the complete documentation index at: https://docs.polaxis.io/llms.txt
Use this file to discover all available pages before exploring further.
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
Pass estimated cost on each call
What happens when the limit is hit
BlockedError with reason="budget_exceeded". Your code decides whether to fail gracefully, notify the user, or queue for the next day.
Budget types
| Type | Config key | Resets |
|---|---|---|
| Per session | session_budget_usd | Each new Polaxis() instance |
| Per day | daily_budget_usd | Midnight UTC |
| Per month | monthly_budget_usd | 1st of each month |
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
Setalert_at_pct to get a Slack notification before the limit is hit: