AI

What one agent task costs, worked out on the back of an envelope

Rough sums for a single agent task at Opus 5.5 prices and at the price of a cheap open model, until caching gets in the way.

Scroll

Labib, who looks after our support tooling, leaned over on Tuesday and asked what one agent task actually costs. I said "a few dollars?" with the confidence of a man who had never once worked it out. He guessed fifty cents. Neither of us had a number, so here it is, worked out on the back of a printout of something I was supposed to be reading.

You can find claims that an agent task uses anywhere from about 100 times the tokens of a chat to over 1,000 times. I haven't found a source for any of them that I'd trust, because they're all someone's screenshot of someone else's dashboard, so I'm taking 1,200 as a round upper case. If I'm going to be wrong I'd rather be wrong on the expensive side.

A chat, for the sake of the sum, is 1,500 tokens. (That's illustrative. Mine run longer, because I argue with it.) Times 1,200 is 1.8 million tokens for one task.

Agents read far more than they write, so say 1.7 million of that is input and 100,000 is output.

Opus 5.5 is listed at $4 per million input tokens and $20 per million output. So 1.7 times 4 is $6.80, and 0.1 times 20 is $2.00. Add them up and one task comes to $8.80, which is more than my lunch and a lot more than fifty cents.

Then the cheap one. A cheap open model priced around 30 cents in and $1.20 out is in the range some providers list DeepSeek V4.1 Flash at. 1.7 times 0.30 is 51 cents. 0.1 times 1.20 is 12 cents. That's 63 cents for the same task, and Labib's guess suddenly looks a lot less silly than mine.

$8.80 over 63 cents is a shade under 14. I did that one on my phone, since the envelope had run out of room. Same task, same tokens, about fourteen times the price, and some providers list the cheap model for far less than the figure I used.

I don't think that means you send everything to the cheap model by default, for the reasons in the post on failure rates and cheap models. But I can see why everyone has suddenly become so interested in what each step of an agent actually needs. A step that renames a file does not need the model you'd trust with a pricing memo.

The 1,200 is the shakiest thing on the envelope anyway, and it belongs to whoever built the loop as much as to the task. A good agent summarises as it goes and doesn't reread everything. A badly built one can sail past 1,200 without trying. The same job can cost ten times as much or a tenth as much depending on how the loop remembers things, and that gets decided in a sprint by someone who never opened a spreadsheet.

Which is where I stopped, because most of those 1.7 million input tokens are the same context being read again at every step, and that's exactly what gets cached, and a cached token is billed at a fraction of the normal rate. So the real number is smaller than $8.80, and the $6.80 line is the one I'd cross out first, except I can't write anything in its place until I know how many of those steps actually hit the cache.