The formula
Cost per task = (1 + retry%) × [ planning calls × cost(plan model) + final calls × cost(final model) + (step calls − 2 + tool calls) × cost(execution model) ]. Monthly = cost per task × tasks + human review. Failure-adjusted cost = cost per task ÷ success rate.
Questions
Why does an AI agent cost so much more than a chatbot?
Agents make many model calls per task — planning, tool use, checking results and retrying — and re-send context each time. One task can equal dozens of chatbot messages.
What is failure-adjusted cost?
It is your nominal cost divided by the success rate. If tasks succeed 80% of the time you effectively pay for the failed attempts too, so divide by 0.8 to get the real cost per delivered result.
How do I reduce AI agent costs?
Cut the number of steps, route intermediate calls to a cheap model, cache the system prompt and tool schemas, reduce retries with better guardrails, and cap output length.