Why Agents Are Expensive
Imagine hiring a contractor who bills by the minute, works autonomously, and sometimes gets stuck in circles doing the same thing over and over. That’s an AI agent. Unlike a chatbot (one question, one answer), an agent makes 3–10 LLM calls per task: planning what to do, selecting tools, executing actions, checking results, and sometimes retrying when things go wrong.
The Cost Multiplier
A single unconstrained agent task costs $5–8 in API fees for software engineering tasks. That’s because each task triggers multiple LLM calls, each with growing context (previous steps are added to the context window). By the 8th call in a task, the agent might be sending 30,000+ input tokens per call — and paying the quadratic scaling tax from Chapter 3.
Key insight: Agents are the most expensive AI workload because they combine all the cost multipliers: multi-turn context growth, output-heavy generation (planning and code), and unpredictable execution paths. Cost engineering for agents is not optional — it’s survival.