What an AI Agent Really Costs per Task: The Equation Almost Nobody Calculates
AI agents are cheap per token and expensive per task — context snowballs multiply the bill. The cost-per-task equation and 6 levers to keep agents affordable.
AI agents are cheap per token and expensive per task. A token costs a fraction of a cent, but one task executed by an agent can cost cents — or dollars — depending on how much context it accumulates, how many steps it takes, and which model it uses. The number to watch is not your provider's price per million tokens; it's the cost per completed task: (input tokens × re-reads × steps) + output tokens + retries + human review. An ungoverned agent running the same job can easily cost 10-100× more than a well-designed one. Here is the full equation, plus the six levers we use at Mintec to keep agents at the cost they should be.
Why your AI bill grows while token prices fall
Token prices have been dropping for months while agent bills keep climbing. Not a paradox: they are two different numbers. A Stanford Digital Economy Lab study (May 2026) on token consumption in agentic tasks found that an agentic task consumes up to 1,000× more tokens than the same request in a chat.[1] The reason is structural: an agent reads the task, takes an action, and before the next step it has to re-read everything — original prompt plus responses plus tool results. By step twenty it is re-reading the previous nineteen. The authors call it "one big pricey context snowball," and the high cost is in input tokens, not output.[1]
The scariest finding: running the same agent on the same task varied in cost by up to 30× between executions, and the model itself cannot predict what it will spend.[1] That explains why the July 2026 model launches (GPT-5.6 and Grok 4.5) stopped selling "top benchmark score" and started selling "fewer tokens per task": OpenAI reports its Sol tier beats Claude Opus 4.8 while using 85% fewer output tokens, and xAI advertises "2× token efficiency" over comparable models.[2] When your customers' bills are dominated by consumption per task, "cheaper per token" stops being the pitch.
On the enterprise side, the mirror image is token maxing: using the most expensive model for everything, with no routing and no visibility. The story that made the rounds in May: Uber gave Claude Code to 5,000 engineers in December 2025 and burned its entire annual AI budget by April 2026.[3] The spread between the cheapest and most expensive models on the market is ~4,500× (from $0.04 to $180 per million tokens), and global token consumption grew 13× since January 2025.[3] SMBs don't operate at that scale, but the mechanism is identical: a $30 OpenAI bill becomes $300 the month a workflow starts calling the wrong model in an unbounded loop.
The cost-per-task equation
When we price an agent automation, this is what we calculate:
Cost per task = (T_in × R × N) × P_in + (T_out × P_out) + retries + human review + infra
| Variable | What it means | Typical impact |
|---|---|---|
| T_in | Input tokens you send (context) | The biggest lever: the snowball is made of input |
| R | Re-reads per step (agent re-reads full context) | 2-3× on 2-5 step agents; more on long agents |
| N | Number of steps/tool calls | Every step multiplies T_in × R |
| P_in / P_out | Price per million tokens | Up to 4,500× between extremes |
| Retries | Failed executions repeated | 10-30% of the bill without caps |
| Human review | Staff time checking outputs | The hidden cost nobody adds up |
The classic mistake is quoting only P. Two workflows can solve the same problem with the same quality and differ 17× in per-task cost purely by architecture: in July 2026 agent benchmarks, Grok 4.5 solved a task with 15,954 output tokens (~$0.096) versus 67,020 for Opus 4.8 (~$1.68) — and that counts output only, when input usually dominates the invoice.[2]
What we saw in real implementations: 5 cost levels per task
In the stacks we ship (n8n + LLM APIs + Clientify), agents fall into five cost-per-task levels. These ranges come from our own implementations over the last few months, not vendor brochures:
| Level | Agent type | Cost per task | Real example |
|---|---|---|---|
| 1 | Deterministic rules (no AI) | $0 | Route a lead by country or source |
| 2 | Classification with a compact model | $0.002-$0.02 | Classify lead intent or ticket type |
| 3 | Generation with a mid-tier model | $0.02-$0.15 | Conversation summary, personalized reply |
| 4 | RAG agent with tools | $0.15-$1.00 | Support agent with knowledge base checking the CRM |
| 5 | Autonomous multi-step agent | $1-$10+ | Flow that researches, decides between options, executes |
Reference point: in our n8n lead generation pipeline, ~5,000 monthly classifications cost $20-40 in API spend — between $0.004 and $0.008 per classification.[4] The same volume fired at a frontier model without routing would run $0.10-0.50 per call: 25-100× more for the same outcome. The uncomfortable conclusion: cost per task is an architecture decision, not a market price.
Six levers to govern cost (without killing quality)
We synthesized the seven-lever enterprise cost playbook from Correlation One (July 2026) with what actually works in small stacks:[5]
1. Route models by task. The biggest lever: send each task to the cheapest model that handles it reliably. Our reference table for business automation (pricing as of September 2026):
| Task | Right model tier | Example pricing per M tokens |
|---|---|---|
| Classify, route, extract | Compact (Gemini Flash, GPT-5.6 Luna, DeepSeek) | $0.05-1 input |
| Summarize, rewrite | Mid (Grok 4.5, GPT-5.6 Terra) | $1-3 input / $6-15 output |
| Final customer-facing reply | Mid-to-high | $2.50-15 output |
| Complex or critical decision | Frontier only in the final step (GPT-5.6 Sol, Opus, Fable) | $5-50 output |
2. Context discipline. Every input token is billed; sending the full CRM record when you need three fields is giving away money on every re-read. If an agent needs conversation history, summarize it down to the essentials — the same principle we apply to agent memory.
3. Step limits and termination criteria. Every agent must declare what "done" looks like and what "failed" looks like, with a hard step cap. An agent that doesn't know when to stop has no spending limit.
4. Prompt caching and batch. Providers discount re-sent cached input tokens by up to 90%, and batch APIs run at reduced rates. For overnight routines (enriching 500 contacts), batching turns cost into a fraction.
5. Retry caps with fallback to rules. Cap retries and degrade: if the model fails twice, let a rule take over instead of retrying the expensive call. Same separation we use as an architecture principle — build with AI, execute with rules.
6. Human approval gates. Approvals don't just prevent errors; they protect the budget. An agent that needs approval for high-impact actions cannot spiral into a spending loop. As we argued in AI agent permissions: governed is cheaper.
Correlation One's own conclusion: "well-governed agents are cheaper agents."[5] In our experience, routing alone typically cuts 60-80% of API spend without touching quality.
What this means for a LatAm SMB
The modular stack — n8n lead generation agents, Clientify, LLM APIs — costs $26-209/month by design. That only holds if you govern tokens. In dollars that are expensive for the region, an agent multiplying its cost 30× between runs while nobody watches turns a profitable automation into a line item you have to switch off. And watch the other direction too: if per-task cost scares you, apply the levers first, then decide. Many processes don't need an agent at all (see when NOT to use AI), and SMB chatbot tiers already cover most simple support cases.[6]
This week's plan: (1) measure the cost per task of each workflow using API logs, not the total invoice; (2) set a spend alert per workflow; (3) apply the routing table; (4) define termination criteria and step caps; (5) review the 5 most expensive executions each week. Cost should be a test dimension for your agents, right next to accuracy: an agent that answers correctly at 10× the expected cost has a design defect, not a budget problem.
Sources
- Stanford Digital Economy Lab, "How are AI agents spending your tokens?" (May 2026) — on the paper "How Do AI Agents Spend Your Money?" (Bai, Huang, Wang, Sun, Mihalcea, Brynjolfsson, Pentland, Pei): digitaleconomy.stanford.edu/news/how-are-ai-agents-spending-your-tokens/
- Nerd Level Tech, "AI Agent Token Costs in 2026: Cheap Tokens, Costly Tasks" (July 2026) — GPT-5.6 and Grok 4.5 pricing and benchmarks: nerdleveltech.com/ai-agent-token-cost-per-task
- elvex, "AI Token Cost Enterprise: Stop Budget Blowouts in 2026" (May 2026) — Uber case, 4,500× spread, Deloitte CFO guide: elvex.com/blog/ai-token-cost-enterprise-budget-control
- Mintec, n8n lead generation agent implementations (2026) — first-party stack data.
- Correlation One, "How to Manage AI Token Costs in the Enterprise: The 2026 Playbook" (July 2026): correlation-one.com/blog/how-to-manage-ai-token-costs-in-the-enterprise-the-2026-playbook
- Mintec, "From Basic Chatbot to AI Agent: When Local Businesses Should Make the Leap" (July 2026), ai-chatbots-local-businesses-cost-framework.
Frequently Asked Questions
How much does an AI agent cost per task?
From fractions of a cent to several dollars per task, depending on the model, accumulated context, and number of steps. A well-governed classification agent costs $0.005-$0.02 per task; a multi-step RAG agent with tools can exceed $1. Cost depends on tokens per task, not price per token.
What is token maxing?
Defaulting to the most capable (and most expensive) model for every task regardless of complexity. With up to a 4,500x spread between the cheapest and most expensive models, it is the main driver of runaway AI bills — 60-80% of spend can usually be cut with model routing.
How do I reduce the cost of my AI agents?
Six levers: route models by task type, practice context discipline (send only what's needed), cap steps with termination criteria, use prompt caching and batch processing, limit retries with fallback to rules, and add human approval gates. A governed agent costs a fraction of an ungoverned one.



