Monitor token usage, set spending caps, and manage budget alerts for this agent.
AI agents cost money — every message, every tool call, every API request uses tokens that translate to real dollars. The Budget tab is your financial dashboard. It shows how much the agent has spent today and this month, lets you set spending caps so the agent can't run up a surprise bill, and alerts you when spending approaches your limits.
Three endpoints power this section:
GET /agents/:id/usage — Current usage metrics (tokens, cost, sessions, errors for today and month).GET /agents/:id/budget — Budget configuration (returns { budgetConfig: { limits: { dailyTokens, dailyCost, monthlyTokens, monthlyCost } } }).GET /budget/alerts?agentId=… — Active budget alerts.Saving: PUT /agents/:id/budget with { dailyTokens, dailyCost, monthlyTokens, monthlyCost }. Acknowledging alerts: POST /budget/alerts/:id/acknowledge.
Six stat cards provide real-time usage data:
| Metric | Description |
|---|---|
| Tokens Today | Total tokens consumed today (input + output). Resets at midnight UTC. |
| Tokens This Month | Total tokens consumed this calendar month. |
| Cost Today | Dollar cost of today's token usage. |
| Cost This Month | Dollar cost of this month's token usage. |
| Sessions Today | Number of agent sessions started today. |
| Errors Today | Number of errors today. Shown in red if > 0. |
Four configurable spending caps:
When any limit is reached, the agent is automatically paused. It requires a manual resume or limit increase to continue.
When budget limits are configured, progress bars visualize current usage against each limit. The bars show:
Only configured limits (non-zero) are displayed.
The system generates alerts at different thresholds:
| Alert Type | Trigger | Impact |
|---|---|---|
| Warning | Usage reaches ~80% of limit | Notification only. Agent continues. |
| Critical | Usage reaches ~95% of limit | Notification. Consider pausing non-essential work. |
| Exceeded | Limit reached | Agent automatically paused. Requires intervention. |
Each alert shows:
Check which specific limit was hit — it may be the daily limit that's too low, not the monthly. Also verify the budget type (tokens vs. cost). Some models use many tokens but are cheap per-token.
Ensure all values are valid numbers. The API expects numeric values for all four fields. Zero means no limit. Check the console for error messages from the PUT request.
Alerts are generated server-side when usage crosses thresholds. If no limits are configured, no alerts will be generated. Also check that the budget alerting system is enabled at the organization level.
Usage is aggregated server-side and may have a slight delay. Token counts include both input and output tokens. Cost calculations depend on the model's pricing. Refresh the page for the latest data.
When an agent belongs to a client organization, budget management integrates with org-level allocations:
The organization budget cap takes precedence. Even if an agent's individual limit is higher, the agent will be paused when the org-wide cap is reached.