AI Agent Cost per Action: Why Agentic Workflows Blow Up Token Bills
Executives do not buy tokens. They buy actions: a support ticket resolved, an invoice extracted, a pull request reviewed, a lead enriched, a refund approved, a claim triaged. That is the unit your AI agent cost model should use. Cost per action is the all-in cost to complete one business action to your quality bar, including every model call, tool call, retry, verifier, escalation, cached token, uncached token, and human correction.
This is narrower than our LLM cost calculator. That article explains cost per successful task across LLM systems. This one focuses on agentic workflows, where the bill grows because the agent loops: it plans, calls tools, reads tool output, updates context, asks another model, verifies, retries, and sometimes hands work to another specialist. OpenAI's Agents SDK docs describe agents as applications that plan, call tools, collaborate across specialists, and keep state, and its runner can perform the tool loop, switch agents after handoffs, and trace model calls, tools, agents, guardrails and handoffs. Each one of those surfaces can become a cost line.
Need cost per action from your traces?
Book Free ConsultationWhat is AI agent cost per action?
AI agent cost per action is the total cost of one completed business outcome, not one model call. It includes input tokens, cached input, output tokens, tool schemas, retrieved context, tool observations, retries, verifier calls, escalations, human review, and failed attempts divided by successful actions.
The formula is:
Cost per action = (sum of all model-call costs + tool and retrieval costs + retry costs + verifier costs + human rework) / successful actions.
For agentic systems, the denominator matters as much as the numerator. If an agent attempts 10,000 lead enrichments but only 8,700 pass validation, the cost per action uses 8,700. Failed actions are not free. They consumed tokens, tools, time, and trust.
Why agents multiply tokens
A single LLM call is a line item. An agent run is a trace. The ReAct paper made the pattern famous: language models can interleave reasoning traces and actions so they can gather information from external environments before continuing. That is useful, but it changes the economics. Every loop carries more history and more observations.
| Cost multiplier | What happens | Why the bill grows |
|---|---|---|
| Planning | The agent asks what to do next. | Planner prompts and reasoning output become extra calls before work begins. |
| Tool schemas | Available functions, MCP tools, permissions and examples are included in context. | Static tool descriptions can be large, and they repeat unless caching works. |
| Tool observations | Search results, CRM records, invoices, diffs or logs are fed back into the model. | Every observation becomes new input on the next step. |
| Retries | Schema failures, timeouts, low confidence or blocked tools trigger another pass. | The second attempt often carries the full first attempt as context. |
| Verification | A separate model or rule layer checks grounding, policy, extraction quality or code risk. | Quality control is necessary, but it is another cost line. |
| Handoffs | A general agent delegates to a specialist. | Context is copied, summarized or re-expanded for the next agent. |
| Human review | Borderline actions pause for approval. | Approval can be the right choice, but the handoff and audit trail are not free. |
Four examples executives recognize
The trap is to budget for "one agent request." A real budget starts with the action.
| Business action | Naive assumption | Typical agent trace | Cost metric |
|---|---|---|---|
| Support ticket resolved | One answer. | Classify, retrieve policy, inspect account, draft, verify, maybe ask approval, update CRM. | Cost per resolved ticket that passes QA. |
| Invoice extracted | One OCR plus JSON output. | Read file, classify layout, extract fields, call vendor lookup, validate totals, retry missing fields. | Cost per invoice posted without manual correction. |
| PR reviewed | One code review prompt. | Summarize diff, inspect files, run tests, search dependencies, flag risks, verify findings, write review. | Cost per reviewed PR with actionable findings and low false positives. |
| Lead enriched | One enrichment call. | Search web, parse company page, check LinkedIn or CRM, classify ICP fit, dedupe, score, write notes. | Cost per usable lead accepted by sales. |
The action calculator
Set up one row per action type. A support action and a lead action should not share a blended average. They have different loops, tools, failure modes and quality bars.
| Column | Example | Why it matters |
|---|---|---|
| Action type | Support ticket resolved | Business unit, not API unit. |
| Monthly attempts | 40,000 | Raw volume before failures. |
| Success rate | 86% | Turns attempts into successful actions. |
| Model calls per action | 4.7 average | Captures planning, drafting, verification and retries. |
| Tool calls per action | 3.2 average | Search, CRM, database, code, browser or ticketing calls. |
| Uncached input tokens | 8,400 | Dynamic user data, tool results and observations. |
| Cached input tokens | 18,000 | System prompt, tool schemas, policies and examples. |
| Output tokens | 2,300 | Drafts, reasoning-visible output, JSON, review comments. |
| Retry rate | 14% | Hidden loop tax. |
| Escalation rate | 9% | How often a stronger model or human reviews the action. |
| Human rework minutes | 0.8 | Converts low quality into money. |
| Cost per successful action | Calculated | The board-level number. |
Worked example: support ticket resolved
Imagine a support agent that should resolve tier-1 tickets. The first demo looked cheap because it answered one ticket with one model call. Production is different: the agent classifies the issue, retrieves policy, checks the customer account, drafts an answer, asks a verifier whether the answer is grounded, and updates the ticket. Some tickets need a refund approval. Some fail schema validation and retry.
| Step | Calls | Input pattern | Optimization lever |
|---|---|---|---|
| Classify ticket | 1 | Short ticket plus taxonomy | Small model or deterministic rules. |
| Retrieve policy | 1 tool call | Search query and snippets | Better retrieval filters and shorter chunks. |
| Check account | 1 tool call | Account status and order data | Return only fields needed for decision. |
| Draft answer | 1 | Ticket, policy, account, tone guide | Cache static instructions and templates. |
| Verify grounding | 1 | Draft plus evidence | Cheap verifier or rules before model verifier. |
| Refund approval | 0.12 average | High-risk subset | Policy threshold and human approval gate. |
| Retry | 0.18 average | Failed schema or low confidence | Fix tool output contracts before changing model. |
Now the cost unit is not "one ticket answer." It is "one resolved ticket that passes QA without human correction." If 10,000 tickets enter the workflow, 8,900 resolve automatically, 700 escalate, and 400 fail, the model cost of all 10,000 attempts belongs in the numerator and 8,900 belongs in the denominator.
Where prompt caching helps, and where it breaks
Prompt caching is the first cost lever for agents because tool schemas, policies and instructions repeat. OpenAI says prompt caching can reduce latency by up to 80% and input token costs by up to 90%, starts automatically for prompts of 1,024 tokens or longer, and requires exact prefix matches. Anthropic prices cache reads at 0.1x base input price after a cache write, while Gemini paid tiers include context caching and batch pricing.
The catch is that agent context is messy. A 2026 paper on prompt caching for long-horizon agentic tasks found 45% to 80% API cost reduction across providers when caching was structured well, but it also found that naive full-context caching can behave worse than cache-aware layouts. Another 2026 paper, TokenPilot, frames the same problem as a trade-off between pruning tokens and preserving cache continuity: mutate the prefix too often and you save tokens while destroying cache hits.
The operational rule is simple: stable content first, volatile content last. Put system instructions, tool schemas, policy text and output examples at the top. Put ticket text, invoice pages, retrieved chunks, search results, code diffs and tool observations at the end. Do not let a timestamp, random request ID or reordered JSON object break the prefix.
When batch saves money, and when it does not
Batch discounts are powerful but only for actions that can wait. OpenAI's Batch API lists a 50% discount compared with synchronous APIs and completion within 24 hours. Anthropic lists a 50% discount on both input and output tokens for batch processing. Gemini paid tier lists Batch API access with 50% cost reduction. That makes batch a good fit for invoice backlogs, lead enrichment, nightly QA, eval runs, document migration and offline classification.
Batch is a bad fit for live support chat, interactive PR review, real-time fraud decisions or any action where the user is waiting. In those paths, the cost lever is usually fewer loops, better caching, smaller verifier models, sharper tool contracts and routing through an LLM gateway or router.
How to stop token bills from exploding
- Trace every action. Log action ID, model, tool, token counts, cache hits, retry reason, latency, result status and eval verdict.
- Cap loops by design. Give the agent a maximum number of tool calls and a clear fallback when confidence is low.
- Separate planner, worker and verifier. The same expensive model should not do every step by default.
- Make tools narrow. Return the five fields needed for the next decision, not the whole CRM object.
- Cache static context. Keep prompts prefix-stable across actions.
- Batch offline actions. Lead enrichment, invoice extraction and evals should not pay live prices when they can wait.
- Measure success, not attempts. Failed actions must stay in the numerator.
- Review expensive traces weekly. One broken tool or broad retrieval query can dominate the bill.
Do not hide quality outside the cost model
The cheapest agent is often the one that quietly creates work for people. A support ticket that needs a human to fix tone, a lead that sales rejects, an invoice that accounting corrects, or a PR review full of false positives did not save its advertised cost. It moved the cost to another team.
That is why cost per action needs evals. The action is successful only when it passes the business quality bar. For a production rollout plan, see our 30/60/90-day AI agent pilot. For the failure pattern behind abandoned pilots, see why AI agent projects get cancelled.
Related calculators
Use this article when the workflow is agentic and the bill grows through loops. Use cost per token vs cost per task when someone is comparing model sticker prices. Use the LLM cost calculator when you need the full spreadsheet across caching, batch, routing, self-hosting, retries and human rework. Use local models vs APIs when sustained volume makes self-hosting a candidate.
Sources and live-price caveat
Provider pricing and agent platforms move quickly. Treat the mechanics here as stable and the numbers as a July 2026 snapshot. Re-check OpenAI Agents SDK docs, OpenAI prompt caching, OpenAI Batch API, Anthropic pricing and Gemini pricing before budgeting. For the research background, read ReAct, Don't Break the Cache and TokenPilot.
Final thoughts
Agentic workflows blow up token bills because they turn one request into a trace: plan, tool, observation, draft, verify, retry, escalate and record. The right cost unit is not one model call or one chat message. It is one successful business action.
Once you measure cost per action, the optimization order becomes practical: trace every action, cap loops, narrow tools, cache stable context, batch offline work, route cheap steps to cheaper models, verify quality, and keep failed attempts in the numerator. That is the number executives can govern.
Want cost per action from production traces?
Book Free ConsultationProduction AI help
Building an AI product and worried about inference cost, architecture, or production readiness? Wavect helps founders turn AI prototypes into reliable production systems.
Explore the service path:
