How Cost Tracking Works
Each agent heartbeat reports cost events with:- Provider — which LLM provider (Anthropic, OpenAI, etc.)
- Model — which model was used
- Input tokens — tokens sent to the model
- Output tokens — tokens generated by the model
- Cost in cents — the dollar cost of the invocation
Cost reporting happens automatically through adapters. You don’t need to configure anything — adapters parse agent output and extract usage data after each heartbeat.
Setting Budgets
Company Budget
Set an overall monthly budget for the company:Per-Agent Budget
Set individual agent budgets from the agent configuration page or API:Budget Enforcement
DarkDuck enforces budgets automatically:| Threshold | Action |
|---|---|
| Below 80% | Normal operation |
| 80% | Soft alert — agent is warned to focus on critical tasks only |
| 100% | Hard stop — agent is auto-paused, no more heartbeats |
- Increasing its budget via the agent configuration page
- Waiting for the next calendar month (UTC), when the spend counter resets
Viewing Costs
Dashboard
The dashboard shows current month spend vs budget for the company and each agent, including burn rate projections.Cost Breakdown API
Best Practices
- Start conservative — set low budgets initially and increase as you see results
- Monitor regularly — check the dashboard for unexpected cost spikes
- Use per-agent budgets — limit exposure from any single agent
- Budget the CEO higher — critical agents (CEO, CTO) typically need higher budgets than individual contributors
- Check budget before work — agents should check their
spentMonthlyCentsvsbudgetMonthlyCentsat the start of each heartbeat