What an hour with an agent actually costs

An agent resends the whole conversation on every step. Why spend grows non-linearly, and what to do about it.

3 min · · Updated · цены · агенты · экономия

A common story: someone tries an agent, solves a couple of tasks over an evening, and looks at the charge in surprise. The same questions in a chat would have cost cents.

It isn't a markup. It's how the agent loop works.

Where the spend comes from

An agent works in steps. On every step it sends the model the whole accumulated conversation: the original task, every previous tool call, and all their output.

Rough arithmetic. A ten-step task, each step adding command output to the context — say two thousand tokens.

First request: 2,000 tokens. Second: 4,000. Third: 6,000. By the tenth step: 20,000. Across the session: about 110,000 input tokens instead of the naive 20,000.

Spend grows quadratically with the number of steps. That is the whole answer to "why is this so expensive".

In money

At $0.30 per million input tokens the example session costs about three cents. Not much — but it's a short one.

A real hour of work isn't ten steps but fifty, and command output is sometimes twenty thousand tokens rather than two, when the agent reads a large file or catches a long log. There you're into millions of tokens and tens of cents per hour.

A caveat if you're comparing with vendors' official pricing: with them, resent context is partly read from the prompt cache at ~10% of the input price, while Zukko bills cached tokens at the regular price. So for agent sessions with a large repeated context, the real difference from the vendor is smaller than a head-to-head price comparison suggests.

Still small next to an hour of a developer's time. But it explains why subscriptions work badly for agents: spend is poorly predictable, and any fixed cap either cuts you off mid-task or was sold with a wide margin at your expense.

Four ways to cut it

Keep sessions short. The most effective move by far. Task done — start a new session. Dragging the previous context along is both expensive and bad for quality: the model starts leaning on stale information.

Don't make the agent search for what you can name. "Find where WeeklyStat is used" sends it through files. Putting grep -rn WeeklyStat in the task narrows it immediately and saves several steps.

Push routine onto a cheap model. Most agent steps are mechanical. glm-5.3 costs $0.10 per million against $0.30 for flagships — on input tokens, which dominate in agent work, that's three times cheaper; whether the result on your simple steps is good enough, test on your own tasks.

Watch the spend. The per-model breakdown in your dashboard shows exactly where money goes. Usually it turns out 80% came from one task where the agent went in circles — and that's fixed by a better prompt, not by economising.

What not to do

Don't chase a lower max_tokens. Output tokens are a small share of agent spend, and a tight limit causes truncated replies and extra retries — a higher total bill.

Don't disable tools to save money. An agent that can't read a file starts guessing, and you pay for several wrong attempts instead of one read.

Estimating up front

If you need a figure before starting, token counting is a separate free request that tells you what the context you're about to send will cost.

bash
curl https://api.zukko.pro/v1/messages/count_tokens \
  -H "x-api-key: fetch_your_key" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-opus-5-5","messages":[{"role":"user","content":"..."}]}'

For an agent session, multiply by the expected number of steps and then by about 1.5 — a crude but honest upper bound.

Billing at Zukko is per token actually used, with no subscription and top-ups from $1, so testing your own workflow costs a few cents.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

Cost of an agent session — where it goes · Zukko