AI Agent
Budget Controls
Manage costs with spending limits, turn caps, thinking budgets, and spend analytics.
Budget controls help you manage the cost and scope of AI operations.
Available Controls
| Control | Description |
|---|---|
| Cost limit | Maximum USD budget per conversation (maxBudgetUsd) |
| Turn limit | Maximum number of agent turns per conversation (maxTurns) |
| Thinking budget | Maximum tokens for extended thinking (maxThinkingTokens) |
Real-Time Tracking
During streaming, ChatML displays:
- Current cost for the conversation
- Number of turns used
- Token usage (input, output, cache read, cache creation)
- Context window utilization percentage
Setting Limits
Configure budget controls in Settings > AI:
- Set your desired limits
- Limits apply per conversation
- When a limit is reached, the agent stops and notifies you
Spend Analytics
The Mission Control Dashboard includes a Spend Tracker that visualizes your API costs:
- 14-day rolling history — See your spending trend over two weeks
- Per-model breakdown — Understand cost distribution across Claude Opus, Sonnet, and Haiku
- Hourly breakdown — Identify peak usage periods
- Per-session costs — See how much each active session is consuming
Cost Management Tips
- Start with conservative limits when exploring unfamiliar tasks
- Increase limits for complex, multi-step work
- Use turn limits to prevent runaway agent loops
- Monitor context window usage — high utilization can affect response quality
- Watch for sub-agent usage, which multiplies cost since parallel agents each consume tokens