Overview
Budget controls prevent runaway agent costs. Every agent and squad has defined spending limits that trigger alerts, require approval, or halt execution. Three levels of budget control:| Level | Scope | Purpose |
|---|---|---|
| Per-Run | Single execution | Prevent expensive single runs |
| Daily | 24-hour rolling | Cap daily spend per agent |
| Monthly | Calendar month | Overall cost governance |
Agent Budget Configuration
Each agent’s.md file includes budget limits:
Required Fields
| Field | Description | Enforcement |
|---|---|---|
budget.per_run | Maximum cost per single execution | Hard limit - execution stops |
budget.daily | Maximum daily spend | Soft limit - requires approval |
budget.monthly | Maximum monthly spend | Hard limit - agent disabled |
timeout | Maximum execution time (minutes) | Hard limit - process killed |
Squad Budget Configuration
Squads have aggregate limits inSQUAD.md:
Alert Thresholds
| Threshold | Action |
|---|---|
| 80% of daily | Slack alert to squad channel |
| 100% of daily | New executions paused, pending review |
| 90% of monthly | Executive alert, planning required |
How Budget Tracking Works
1. Pre-Execution Check
2. During Execution
3. Post-Execution
Monitoring Costs
CLI Commands
Dashboard Output
Cost-Based Routing
Route to cheaper models for appropriate tasks:Routing Guidelines
| Task Type | Recommended Model | Cost/1M tokens |
|---|---|---|
| Data gathering, summarization | Haiku | $0.25 |
| Code review, analysis | Sonnet | $3.00 |
| Architecture, complex reasoning | Opus | $15.00 |
Smart Triggers and Budget
Triggers can be budget-aware:Budget Alerts
Slack Alert Format
Email Alerts (Enterprise)
Monthly budget reports sent to configured addresses with:- Spend by squad
- Spend by agent
- Cost per goal achieved
- Recommendations
Overriding Budget Limits
Temporary Override
For urgent work, use--use-api flag:
Permanent Adjustment
Edit the agent’s.md file:
ORG-005).
Best Practices
1. Set Conservative Defaults
Start with low limits. It’s easier to increase than recover from overspend.2. Use Per-Run Limits
Prevent individual execution explosions. A bug in a loop can burn budget fast.3. Monitor Efficiency
Track tokens per goal, not just total spend:4. Review Weekly
5. Alert Before Limit
Setalert_threshold: 0.8 to get warnings before hitting hard limits.
Subscription vs API
| Mode | Source | Tracking | Limits |
|---|---|---|---|
| Subscription | Max plan quota | squads dash | Weekly reset |
| API | Pay-per-token | Anthropic dashboard | Monthly billing |