← Table of Contents · Page 552 of 868
THE ECONOMICS OF AGENTS
Part 7 of 11
EXAMPLES
Example 1: Token economics worked example
Suppose a single agent run uses 50,000 input tokens and 2,000 output tokens.
Suppose the provider's made-up price is 3 dollars per million input tokens and 15 dollars per million output tokens.
First we calculate the input cost.
50,000 is five hundredths of one million, which is 0.05.
So the input cost is 0.05 times 3 dollars, which equals 0.15 dollars, or 15 cents.
Next we calculate the output cost.
2,000 is two thousandths of one million, which is 0.002.
So the output cost is 0.002 times 15 dollars, which equals 0.03 dollars, or 3 cents.
The total for the run is 0.15 plus 0.03, which equals 0.18 dollars, or 18 cents.
Notice that the output was only four percent of the tokens but made up about seventeen percent of the cost, because output tokens cost more each.
Now scale it.
If the agent runs 10,000 times a month, the monthly token cost is 10,000 times 0.18 dollars, which equals 1,800 dollars.
If an engineer reduces the input to 30,000 tokens, the input cost drops to 0.09 dollars, the run costs 0.12 dollars, and the monthly cost falls to 1,200 dollars.
A small change in each run becomes a large change over a month.
Example 2: Why inference dominates cost
Imagine an agent that answers a question by making one model call to plan, then three database lookups, then one model call to write the answer.
Each database lookup travels over the internal network to a cheap internal database and returns in about 20 milliseconds, costing essentially nothing.
The two model calls take about 4 seconds each and cost about 10 cents each.
Total tool time is about 60 milliseconds and total tool cost is nearly zero.
Total model time is about 8 seconds and total model cost is about 20 cents.
If a clever engineer spends a week making the database lookups twice as fast, the total run improves by about 30 milliseconds, which no user will ever notice.
If instead the engineer trims the prompt and avoids one of the two model calls, the run could become several seconds faster and many cents cheaper.
The lesson is to optimize the biggest block first.
Example 3: Total operating cost
A company runs a customer-help agent that handles 100,000 conversations a month.
The token bill is 4,000 dollars.
The agent runs code in sandboxes that cost 600 dollars a month in compute.
The observability platform that stores traces costs 900 dollars a month.
The vector database the agent searches costs 300 dollars.
Evaluation runs before each release cost 400 dollars in tokens.
One engineer spends about a quarter of her time maintaining the harness, and her share of salary is worth roughly 5,000 dollars a month.
Adding it up, 4,000 plus 600 plus 900 plus 300 plus 400 plus 5,000 equals 11,200 dollars a month.
The token bill was only about thirty-six percent of the total.
A manager who judged the agent by the 4,000 dollar token bill alone would underestimate the true cost by nearly two thirds.
Cost per conversation is therefore 11.20 dollars divided by 100, which is 0.112 dollars, or about 11 cents, rather than the 4 cents the token bill alone suggests.
Example 4: FinOps for AI
A company holds a monthly AI spending review.
The finance partner and an engineering lead open a report that breaks spending down by team, by agent, and by task type.
They notice that the research team's spending is three times its usual amount.
Drilling in, they see that one agent's "summarize document" task type grew sharply, while others did not.
An engineer investigates and finds that a recent change caused the agent to re-read an entire document at every step.
The fix is made within days, before the spike can become a budget surprise at the end of the quarter.
The review also sets a rule: any agent whose weekly spending rises more than fifty percent without a matching rise in usage triggers an automatic alert.
The key point is that the spike was caught by a routine process, not by luck.
Advertisement
Read Aloud:
0:00 / 0:00