Skip to content
Lees in het Nederlands

What an AI agent costs per task

An AI agent costs the tokens it reads and writes, at the price of its model. How to estimate the cost of a task, what drives it up, and how to read it back.

Cost & value · 1 of 66 min readUpdated

In 30 seconds

  1. 1A task costs its tokens in and out, at the price of the model it runs on.
  2. 2Long context, many steps and a bigger model push the cost up the most.
  3. 3Every run records its tokens and estimated cost, per AI agent and AI team.

On this page

  1. The formula
  2. A worked example
  3. What drives it up
  4. How to bring it down
  5. Estimating before you start
  6. How Infinized records it
  7. Estimate versus invoice
On this page7 sections · 6 min
  1. The formula
  2. A worked example
  3. What drives it up
  4. How to bring it down
  5. Estimating before you start
  6. How Infinized records it
  7. Estimate versus invoice

The short answer

An AI agent's cost per task is the tokens it reads times the model's input price, plus the tokens it writes times its output price, added up over every step the task takes. A token is a piece of a word. A short answer from a small model costs a fraction of a cent, while a long investigation with many tool calls on a large model costs many times more. You can estimate it beforehand and read it back afterwards.

The formula

Cost = tokens in × the model's input price + tokens out × its output price. Prices are quoted per million tokens and differ a lot between models, and output usually costs several times more than input. As a rule of thumb a token is about four characters of English, or three-quarters of a word. Dutch, German and code tend to need more tokens for the same meaning.

An AI agent rarely answers in one go. It reads, calls a tool, reads the result and decides again. Each of those steps is a model call with its own tokens in and out, so the cost of a task is the sum over its steps. In Infinized the price list is configured per model, and a run on a model without a listed price is costed at zero, which is worth knowing if you add a model yourself.

A worked example

A 40-person webshop wants a colleague to handle "where is my order?" tickets: read the ticket, look up the order, check the delivery policy and draft a reply for a person to approve. Take an illustrative mid-sized model at $3 per million input tokens and $15 per million output tokens.

Step What the colleague does Tokens in Tokens out
1 Reads its instructions, the knowledge passages and the ticket, and asks for the order 5,000 150
2 Reads the order and its tracking, and searches the policy 6,500 150
3 Reads the policy article and drafts the reply 8,000 450
4 Checks the draft and proposes it for approval 8,500 400
Total 28,000 1,150

Input: 28,000 tokens at $3 per million is $0.084. Output: 1,150 tokens at $15 per million is about $0.017. The ticket costs about $0.10, and 1,500 tickets a month about $150.

Two things stand out. Input is more than 80 per cent of the cost, even though it is the cheaper side, because every step reads everything that came before it. And the same four steps on an efficient model priced at $0.40 and $2.00 would cost about $0.014 a ticket, around $20 a month, provided its drafts pass the same checks.

What drives it up

  • Context. Everything a colleague reads on each step counts as input: its instructions, the knowledge passages, memories, the conversation and every tool result. Long tool results are the usual culprit.
  • Steps. Each step reads the context again, so a task that takes eight steps costs far more than one that takes two.
  • The model. A flagship model can cost many times what a small one does for the same work.
  • Reasoning. Reasoning models think in tokens that are billed as output, and a higher reasoning effort lets a colleague take more steps per turn.
  • Failures. A failed attempt still used tokens, and it is recorded as a run of its own.

How to bring it down

  • Match the model to the work. Every colleague has its own model, so sorting and routing can run on an efficient one while judgement stays on a stronger one. See which model each colleague should use.
  • Keep tool results short. Ask for the fields you need, not the whole record. A list of fifty orders is read again on every step after it arrives.
  • Cut steps with clear instructions. Tell a colleague what to look up first and when to stop. Work that always follows the same path can be a flow with fixed steps.
  • Put a ceiling on a chain. A flow has a cost ceiling per run, and a delegated chain can have one too, so one runaway task cannot spend the month.
  • Tidy the knowledge. Infinized adds a bounded set of the most relevant passages to a step, not whole documents, so a bigger help centre does not make every step dearer. Duplicate and outdated articles still take up that space.

Estimating before you start

Take ten representative tasks, including a few awkward ones, run each a few times and read the cost of the runs. Use the typical figure for planning, and look at the expensive tail: that is where the long tool results and the extra steps are. Multiply by the volume you expect and leave room for retries.

Then set a monthly budget a little above it: the estimate tells you what to expect, and the cap stops runs if you pass it. For a colleague with no history yet, the cost overview shows an expected cost per run at a typical footprint for its model. Treat that as a starting point, not a measurement.

How Infinized records it

Every run records its model, tokens in and out and an estimated cost. A task's page totals the runs of that task, and the subtasks it delegated keep their own totals. Costs roll up per colleague, per team and per model, with a daily trend and a month-end forecast, and a day that spends three times the average of the week before is flagged to the owners.

The forecast also shows whether the budget will run out before the month ends at the current pace, and the most expensive tasks of the period are listed, so you know where to look first. Helper calls with no colleague behind them, such as summarising a long conversation, choosing who answers in a channel or embedding a knowledge source, are recorded as runs too and count towards the budget. The same figures are available through the API.

Task · ticket #20417Example

Run receipt · 14:10:31Succeeded

Provider · model
Anthropic · claude-sonnet-5
Tokens in / out
3,412 / 286
Estimated cost
$0.0097
Duration
2.1 s
Served
Task · ticket #20417

Tool calls

  1. 1zendesk_get_ticket#20417 · “Invoice paid twice”
  2. 2search_knowledge3 passages · Refund policy
  3. 3create_subtask“Check the payment” → Otis

Task total $0.0220Subtask, its own total: $0.0003

Estimate versus invoice

The figure is an estimate from list prices. Your provider's invoice is the authority, and with BYOK, on your own keys, it is billed to you directly. When an AI agent's own provider is not connected and its work goes to another, the run is priced on the model that actually answered.

Details the estimate does not model, such as a discount for cached input or a price change at the provider, make the two drift apart. Compare them once a month, per model, and adjust the budget rather than the expectation.

Questions people ask

How much does an AI agent cost per month?

Multiply the cost of a typical task by the number of tasks you expect, then leave room for retries and helper work such as summaries and embeddings. An AI agent drafting 1,500 simple tickets on a mid-sized model might spend around $150 a month on tokens, and far less on a small model. The platform fee comes on top, and with your own keys the provider bills the tokens.

Why do output tokens cost more than input tokens?

A model reads your input in one pass, but writes its answer one token at a time, and every new token needs another pass through the model. Writing is slower and dearer to serve, so providers price output several times higher. In agent work input still tends to dominate the bill, because the whole context is read again on every step.

Do reasoning models cost more per task?

Usually, yes. They write out their thinking before the answer, and those thinking tokens are billed as output, the expensive side. They can still come out cheaper overall when they reach a correct answer in fewer attempts. Use them for multi-step analysis and judgement, and keep sorting, routing and extraction on an efficient model.

Does a failed AI agent task still cost money?

Yes. The provider bills the tokens a model read and wrote before the failure, whether the run ended in an error or a timeout. In Infinized each attempt is recorded as a run with its own cost, so a task that needed a retry shows both attempts, and an AI agent that fails often shows up in the cost figures as well as in the list of failures.

How many tokens is one word?

In English a token is roughly four characters, or about three-quarters of a word, so 1,000 words come to around 1,300 tokens. Dutch, German, code and text full of numbers or names usually need more tokens for the same length. Every provider splits text slightly differently, so treat any conversion as an estimate rather than a price.

See it at work in your organisation.

We start by listening to your question. Then we show you a demo that fits your organisation.

  • Approvals from the first run
  • Budgets that stop
  • Hosting in the Netherlands