calculate_agent_loop_cost
Compute exact monthly LLM API spend and multi-turn context accumulation bloat for an autonomous coding or tool-use agent loop (1-20 turns).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>"
},
"name": "calculate_agent_loop_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dau | No | Daily Active Users or Engineers (default 100) | |
| model | Yes | Model ID or name (e.g. "anthropic/claude-sonnet-5.5" or "deepseek-r1") | |
| turns | No | Multi-turn agent loop depth 1-20 (default 12) | |
| cacheHitPct | No | Prefix KV-cache hit % 0-95 (default 75) | |
| inputTokens | No | Base system + user prompt tokens on turn 1 (default 4000) | |
| tasksPerDay | No | Agent tasks per user per day (default 15) | |
| outputTokens | No | Avg output tokens per turn (default 800) |