Most agent cost is context, not completion
Summary
The article argues that the dominant cost in AI agent systems comes from processing context (input tokens) rather than generating completions (output tokens).
Similar Articles
I used to think AI agent cost was a backend problem. I was wrong.
The author reflects on their mistaken belief that AI agent cost is solely a backend problem, suggesting a broader perspective on cost factors.
Your agent isn't expensive. Your context window is. Here's the math
Explains why agent API bills grow quadratically with context length because each turn re-reads the full history, and shares practical techniques like expiring tool results, shrinking tool schemas, and compacting context to cut costs.
Subagents Account for Most Token Costs in Long Agent Runs: Fixes That Cut Usage 70 to 90 Percent in Practice
The article analyzes a 2026 paper by Bai et al. showing that subagents and context bloat cause token costs in long agent runs to be ~1000x higher than chat, and presents three practical fixes (PLAN.md, read budget, out-of-band notes) that reduce token usage by 70-90%.
Price per token is the wrong cost metric for agents
The article argues that token price is an inadequate cost metric for AI agents, proposing that effective cost should be measured by successful runs with validation, and discusses routing and failure strategies.
The most expensive part of running AI agents isn't the tokens. It's the time figuring out why they did something.
Building AI agents reveals that the major cost is debugging—spending weeks chasing issues like upstream API changes—not just token or model inference costs.