Token Costs shows what a thunk spends on AI, and helps you find what to change when it costs more than it should.
This article has two parts. Concepts explains what you pay for when an AI agent runs, and where that money goes. Details explains how to tell why a run cost what it did, and how to read the Cost tab in Monitor.
Concepts
What you pay for
Every time an AI agent decides what to do next, it makes a call to an AI model, and each call is billed by the tokens it uses — roughly a short piece of a word each. A call's tokens come in three kinds, priced differently:
Input — what the model reads: the step's instructions, the work item's data, the platform's own guidance on how to work, the descriptions of the tools it can use, and everything that has happened in the run so far.
Cached input — input the model's provider recognises from an earlier call and charges much less for.
Output — what the model writes. Output tokens are the most expensive kind.
Each model has its own prices, and smaller models cost much less than larger ones. For the arithmetic and worked examples, see Understanding LLM costs and latency.
Where the money goes
A run is many model calls, not one. Each call re-reads the run's context — the instructions, the data, and every earlier turn and tool result — so a run's cost grows with both how many turns it takes and how much each turn has to read. Caching makes the repeated part cheaper, but not free.
Money is also spent beyond the step's own calls:
Custom AI tools run their own agent, with their own model calls, and possibly on a different model. Their spend is part of the run that called them.
Retries and resumes are new runs, and a work item pays for every one of them.
Setup and automation — planning the workflow, building tools, routing incoming messages — is real spend that is not done for any one work item.
Figures are in US dollars and cover the AI work itself: the model usage behind every agent run the thunk made.
Details
Why a run cost what it did
The figures say where the money went. The shape of the spend says why. These are the common shapes, and what each one usually means:
Many model turns multiply the cost, because each turn re-reads the run's context. A step that takes many small steps — usually because it is asked to do several things at once — costs more than one that does the same work in fewer turns.
Large tool results become part of the run's context, so the turns after them read them again. A search or a document read that returns far more than the step needs makes the rest of the run more expensive.
A low cache hit rate means the run paid full price for prompt text that could have been served from the cache. If the expensive runs are the ones with little cached input, that is the place to look.
Long outputs cost the most per token. A step that writes long answers or long documents costs more than one that reads a lot and answers briefly.
A custom AI tool that accounts for most of the spend is the next place to look: its instructions, how often the step calls it, and which model it runs on.
A retried or repeated call was paid for twice. A call that repeats an earlier one with the same inputs bought nothing new.
A more capable model costs more for the same work. If a step's results are good on a smaller model, the larger one is spend without benefit; test before switching.
When one line accounts for most of a run's cost, that is the one to act on. The cost icon beside a run's spend shows that run's ledger, call by call; see Understanding LLM costs and latency for how to read it.
Where to find the Cost tab
Token Costs shows, across many work items, what a single work item typically costs to put through the workflow, a chart of every work item's cost over time, a day-by-day chart of the spend, and the most expensive work items underneath. Use it to see whether a thunk's cost is steady or climbing, to find which step accounts for most of it, and to tell a predictable bill apart from one driven by a few expensive work items.
Open your thunk, go to Monitor, and select the Cost tab. Monitor is available to thunk admins.
Choosing what you are looking at
Two controls sit at the top, and everything below them follows your choice.
Scope decides whose spend you are seeing. The list follows your workflow, and each option shows what it cost over the window:
Whole workflow — what your workflow steps spent, added up. This is the default.
A single step — one step of your workflow. Steps are listed in the order the workflow runs them and numbered to match — Step 1, Step 2 and so on — so you can find one by where it sits rather than by reading every name. Which step is the expensive one is on the figure beside each option, and on the chart once you pick it.
Setup & automation — work that is not part of your workflow, such as planning it, building a tool, or routing an incoming message. It is real spend, so it is shown rather than left out — but it is not counted in the whole-workflow figures, so those tell you what running your workflow costs and nothing else.
Only the steps of your workflow are numbered. Setup work is grouped into that single Setup & automation entry rather than listed step by step, and the handful of steps behind planning, automation and tool building are listed after the numbered ones, without a number.
Window sets how far back to look: the last 7, 30 or 90 days.
The daily chart
Each column is one calendar day's spend for the scope you picked, in your own time zone — so a column here means the same day as one in the Errors tab. Hover a column to see that day's figure.
The line above the chart gives the window's total and how many agent runs are behind it. Reading the two together is what separates more work from pricier work: a day that costs twice as much on twice as many runs is simply a busier day, while the same rise on a flat run count means each run got more expensive.
Show changes what each column is:
Total per day (the default) — the day's spend.
Median work item per day — what the typical work item cost that day: the median cost of the work items that started that day. It is the same figure as the median line in the chart of work items under Is the cost per item changing?, drawn as columns. A day on which no work item started has no column.
Runs per day — how many agent runs the day had. Set beside the total, this is the quickest way to see whether a costly day was a busy one.
Median work item per day is only offered when the scope has work items — Setup & automation does not.
What one work item costs
Above the chart is the part most worth acting on: what a single work item costs in this scope. A work item's cost is everything spent on it — across every step it passed through, and across every attempt, including retries and steps that paused and resumed.
Median — half of your work items cost less than this. The typical item.
Mean — the average.
90th pct — 9 in 10 work items cost less than this.
99th pct — 99 in 100 work items cost less than this. The items past it are listed below the chart.
Max — the single most expensive work item in the window.
Work items — how many work items these figures are based on.
The median and the mean sit side by side because comparing them is the most useful thing you can do here.
Pick a single step in Scope and the same figures describe what that step costs per work item, so you can see which part of the workflow the money goes to.
Reading them together
The gap between the median and the mean is the most useful thing here. If they are close, your costs are predictable and the median is a fair basis for estimating. If the mean sits well above the median, a small number of expensive work items is driving the bill — and the 99th percentile and Max tell you how expensive those outliers get. That is the case where the average alone would badly mislead you: most items cost far less than it, and a few cost far more.
A high 90th or 99th percentile on one step is a good place to start looking. It usually means that step sometimes does much more work than it typically needs to — often worth checking against the step's instructions and the tools available to it. Open one of those work items from the list below the chart, and see Analysis of AI behavior for how to read what its runs actually did.
Is the cost per item changing?
Below the figures, a chart plots every work item in the scope you picked as a dot: across, when the item started; up, what it cost. Three lines run through the dots — each day's median, 90th and 99th percentile — and the items past the 99th percentile are drawn larger, matching the p99 marks in the list at the bottom. Hover a dot to see that item's cost and when it started.
Read it for drift, which the figures above cannot show. A cloud that climbs across the window means the same work is costing more than it used to; a single column of high dots means something happened at one moment rather than with one kind of work; a flat band means your cost per item is steady.
Colour dots by adds a second reading to every dot:
Cache hit rate (the default) — how much of the item's prompt the AI model served from its cache. Cached prompt tokens are billed at a lower rate, so dark dots, which paid full price for their whole prompt, are often the expensive ones. If the high dots are the dark ones, your prompt is falling out of the cache between runs, which is something you can change.
LLM model — which model the item ran on, so you can see whether the expensive items are the ones on a particular model. An item that used more than one model — because an AI tool it called used another — is named by both.
Items recorded before Thunk tracked these are shown grey rather than guessed at.
On a very busy thunk, the chart shows an evenly spread sample of the work items rather than every one, and says so beneath it. The shape and the lines still describe the whole window; the list at the bottom still names the most expensive items.
Which work items were the expensive ones
Under the chart is Most expensive work items — the dearest items in whatever scope you picked, most expensive first, with what each cost, how many agent runs it took and when it started. The ones past the 99th percentile are marked p99; the rest are there so you can see what normal looks like beside them.
This is the answer to the question the 99th percentile raises. "The 99th percentile is $2.40" tells you a tail exists; this tells you which items are in it. Each name opens the item — or, when you have picked a single step, that step on that item — so you can read what actually happened.
When nothing is marked, the list says so. That is a real finding: it means your costs are even, and the most expensive item is simply the top of a normal spread rather than a runaway.
Things worth knowing about the figures
A run still in progress counts as nothing until it finishes. Its cost is recorded when it completes, so today's column can understate slightly and will settle as work finishes.
Setup & automation has no per-item figures. That work is not done on behalf of any one work item, so there is nothing to divide it by. Select it and you still get its daily spend and its total — but that spend is not included in any whole-workflow figure, because it is not what your workflow costs to run.
The window cuts at its edges. A work item that was still being worked on when the window began contributes only what it spent inside the window, so a long-running item can look cheaper than it was.
A thin sample makes the tail percentiles unreliable. With only a handful of work items, the 90th and 99th percentiles are really just "the most expensive one or two", and the tab says so when that is the case. The median is still meaningful; give it more work items before reading much into the tail.
Comparing with a single work item's cost
The work items table has an AI Cost ($) column showing what one work item has cost over its whole life — add it from Manage columns if it is not already showing. Token Costs is the windowed view: it covers only the period you selected. The two will differ for a work item that has been running longer than the window, and both are correct — they are answering different questions.

