Agentic AI token consumption and cost estimation guide

Multi-step agentic workflows consume tokens very differently from single-turn calls: context accumulates across steps, tool calls add bidirectional token overhead, and reasoning models can multiply output tokens 3-10x. This guide explains the patterns and provides cost estimation methodology.

Why agents cost more than single-turn queries

A single-turn LLM query sends a prompt and receives a response. An agentic loop does this repeatedly: each step sends the full accumulated conversation history, new tool results, and task instructions. A 5-step agent can cost 10-50x a single-turn query of the same model.

Three key cost drivers differentiate agentic from single-turn workloads:

  • Accumulating context window — every step re-sends prior messages, tool results, and system instructions
  • Tool-call token overhead — structured tool definitions, call formatting, and result parsing add 20-40% beyond visible conversation
  • Reasoning token multiplier — reasoning models typically output 3-10x more tokens for the same conceptual step

Agent-suitable models in the database

Of 2941 total models in the catalog, 264 support both responseSchema (structured output / tool calling) and systemMessages with valid pricing — making them suitable for agentic workflows. 154 of these also support reasoning/chain-of-thought for planning and analysis.

Total cost per million tokens ranges from $$0.060 (cheapest non-reasoning, deepseek-ocr) to $$0.190 (cheapest reasoning, gpt-oss-20b) — a 3x spread.

Compare cheapest agent models →

Agent token consumption patterns

Pattern A — Simple chain

Step 1 → Step 2 → Step 3. Context grows linearly. Total tokens = sum of (accumulated context + new instructions + output) per step. Each step re-sends the full prior conversation.

totalInput = Σ(accumulatedContextₙ + toolResultsₙ + taskInstructionsₙ)
totalOutput = Σ(outputₙ + toolCallTokensₙ)

Example: A 3-step code-review agent with 2k input + 1k output per step uses ~6k input and ~3k output tokens per run, but the accumulated context means step 3 sends all prior exchanges (~6k input).

Pattern B — Supervisor + workers

Planner delegates sub-tasks (fan-out, merge results). A reasoning planner decomposes the task into parallel subtasks that cheap executors handle. The merge step re-sends all worker outputs, making the final step the most expensive.

Pattern C — Loop with reflection

Agent acts, observes, reflects, retries. Context grows fastest. Each retry re-sends the entire history plus the new attempt. This pattern dominates debugging and iterative code-generation agents.

Cost scenarios

Simple code-review agent (3 steps)

Input: 8.0K · Output: 2.0K · Volume: 50,000 runs/month

StrategyModelsMonthly costvs All-Premium
Budget only deepseek-ocr, l3-8b-lunaris, qwen2.5-7b-instruct $25.00 -50%
Cascade deepseek-ocr, gpt-oss-20b $23.00 -54%
Premium only gpt-oss-20b, gpt-oss-120b, deepseek-r1-distill-qwen-14b $50.33
Compare these models →

Web research agent (5 steps)

Input: 25.0K · Output: 4.0K · Volume: 10,000 runs/month

StrategyModelsMonthly costvs All-Premium
Budget only deepseek-ocr, l3-8b-lunaris, qwen2.5-7b-instruct $14.50 -47%
Cascade deepseek-ocr, gpt-oss-20b $12.35 -55%
Premium only gpt-oss-20b, gpt-oss-120b, deepseek-r1-distill-qwen-14b $27.33
Compare these models →

Customer support triage (3-7 steps)

Input: 12.0K · Output: 1.5K · Volume: 100,000 runs/month

StrategyModelsMonthly costvs All-Premium
Budget only deepseek-ocr, l3-8b-lunaris, qwen2.5-7b-instruct $67.50 -91%
Cascade deepseek-ocr, qwen3-coder-30b-a3b-instruct $82.50 -89%
Premium only gpt-4.1-mini, gpt-4.1-mini-2025-04-14, GPT-4.1 mini $720.00
Compare these models →

Optimization strategies

Prompt caching

Structure your system prompt and task instructions so early turns share cache hits. Models with cachedInputUsdPer1MTokens data charge 0.1x the base input rate for cached tokens (OpenAI, Anthropic, Google). For long-running agents, caching is the single most impactful optimization.

In the web research cascade scenario above, caching the recurring system prompt and tool definitions reduces the effective input cost by up to 40% per run.

Model cascade routing

Use a cheap classifier for the first step, then route to reasoning models only for analysis and verification. The cascade strategy saves 50-80% vs running every step on a reasoning model.

Context window budgeting

Limit conversation history to the last N turns or use summarization between steps. Every thousand tokens of accumulated context adds direct cost on every subsequent turn.

Parallel sub-tasks

Fan out to cheap executor models and merge results with one reasoning call. This keeps context growth flat for the executor branches and concentrates cost on the merge step.

Key takeaways

  1. The gap between cheapest agent-suitable ($$0.060/M total) and premium reasoning ($$2.00/M+ total) is 33x — model selection is the highest-leverage cost decision.
  2. A simple cascade (cheap planner → reasoning verifier) cuts costs 50-80% vs all-reasoning while preserving quality.
  3. Tool-call formatting adds 20-40% token overhead beyond visible conversation.
  4. Prompt caching is the most impactful optimization for long-running agents — structure conversations to maximize cache reuse.
Estimate your agent costs with the calculator →