{T}
TokenMath.net
Autonomous SystemsTool Calling & Compounding Context

AI Agent Cost Calculator

Estimate token economics for autonomous agent architectures. Simulate iterative planning steps, environment observations, tool output ingestion, and prompt caching mitigation.

Active Workload Architecture: 500 runs/day · 3 planning steps · 6 tool calls · 1 retries ·70% cache hit rate
81.8k tokens/run

Agent Loop Parameters

10 Total LLM Calls/Run
Hierarchical Multi-Model RoutingRoute reasoning/planning to primary model, and tool calls to worker subagent
Planning Steps
Tool Invocations
Retries / Self-Correction
Agent Runs / Day500
Base System & Tool Spec Tokens3,500 tokens
Avg Tokens Returned Per Tool Execution1,200 tokens
Prompt Caching Hit Rate (%)70%
External Tool / Search Grounding Fee ($/call)$0.010
e.g. Google Grounding ($0.035/call), web search, or sandboxed execution
Estimated Cost Per Run
~$0.15
$0.1547 exact · 81.8k tokens/run
Estimated Monthly Fleet
$2,320.94
15,000 total runs/month
Cost Decomposition per Run (Explainable Math)Micro-Cent Level
Base System Prompt Tokens:$0.0700
Tool Results Ingested (7.2k tok):$0.0867
Output Generation (3.5k tok):$0.0350
Prompt Caching Discount:-$0.0970
Tool / Search Grounding Fees (6 calls):+$0.0600
Retry & Error Self-Correction:+$0.0155
Total Calculated Run Cost:$0.1547
Compounding Context Growth by TurnFinal Turn: 14.6k tokens
Step 1 (planning): Claude Sonnet 53,500 tok
Step 2 (planning): Claude Sonnet 53,950 tok
Step 3 (planning): Claude Sonnet 54,400 tok
Step 4 (tool): Claude Sonnet 54,850 tok
Step 5 (tool): Claude Sonnet 56,400 tok
Step 6 (tool): Claude Sonnet 57,950 tok
Step 7 (tool): Claude Sonnet 59,500 tok
Step 8 (tool): Claude Sonnet 511,050 tok
+ 2 more steps compounding to 14.6k tokens
Agent Context Headroom
Claude Sonnet 5 window: 1M tokens (1.5% utilized)
Model Specs