---
title: "Tokens, cost and speed"
id: "2224"
type: "page"
slug: "tokens"
published_at: "2026-11-08T07:23:41+00:00"
modified_at: "2026-11-18T17:59:49+00:00"
url: "https://xedant.com/agents/multiagent/docs/tokens/"
markdown_url: "https://xedant.com/agents/multiagent/docs/tokens.md"
excerpt: "Three neighboring screens of “Management” answer three questions about money: how many tokens the agents…"
---

# Tokens, cost and speed

[https://xedant.com/agents/multiagent/docs/tokens/.md](https://xedant.com/agents/multiagent/docs/tokens/.md)

Three neighboring screens of “Management” answer three questions about money: how many tokens the agents spend, what that costs, and how fast they work. In the sidebar list they stand one under the other right after “Fleet” — “Tokens”, “Cost”, “Speed”.

There used to be a separate “Analytics” screen for this. Its content moved into these three screens and into the tables of the “Chats” screen, while machine access to the same numbers — Prometheus, GraphQL and the archive in ClickHouse — stayed and is described on the [Analytics and exports](/agents/multiagent/docs/analytics)
 page.

## What the three screens share

They are built the same way, so having learned one you have learned all three.

- **The period** is picked to the right of the title: the last 7, 14, 30 or 90 days, the last 12 months, or all time. There are no “Today” and “Yesterday” items in the list — two separate tiles at the bottom answer for those days. “Last 12 months” is exactly the same day one year back, not “roughly a year”;
- **The chart step** is picked by the length of the period on its own: up to 31 days — by days, up to 180 days — by weeks, beyond that by months. There is no separate setting, so a day is never compared with a month by mistake;
- **Days are counted in the system time zone** — the same one as in the “Appearance” dialog. Day boundaries here therefore coincide with the reports and with what the agents see;
- **Refreshing runs by itself**, without a page reload: as soon as an agent has finished a chat, the numbers catch up. The spinner to the right of the period selector appears only on a manual period change — with a fast answer you never see it;
- **The fleet in the header narrows everything at once.** The chosen fleet acts on the tiles, the charts, the tables and the export alike. Returning to “All” shows you the whole picture again;
- **The “Download” button** under the breakdown table hands out a CSV file with the same rows: the key, the sum, the share and the number of chats. Not a single line of conversation is in the file — only numbers.

## Tokens: how many in total and where they go

The top of the screen is five tiles. First three about the chosen period: how much there was over the same window before it, how much over the period itself, and how much will go over the next equally long stretch if nothing changes (that is an estimate over the last observed week, not a promise). Then two daily ones: for yesterday and for today. Under the numbers stands the difference against the previous window or against yesterday — green on a rise, red on a fall, “even with yesterday” on equality.

One number falls to an entity: input, output, cache reads and cache writes add up together. This is deliberate — otherwise the same chat would be counted four times. The split by kind exists in exactly one place: the **“By types”** tab of the charts and of the table. Four constant bands live there — “Cache read”, “Cache write”, “Input” and “Output” — in the same order as in the reports. Their sum equals the total for the period.

The charts are called “Token trends” and carry six tabs: by factory, by agent, by model, by skill, by app and by types. They are drawn right away, with no animation: switching a tab or a period never makes the bars “grow” all over again. If you rest the pointer on an individual bar, its whole series lights up and the tooltip narrows to that series alone — with the number for the hovered day and the series’ total over the whole period. Hovering an empty spot brings back the shared tooltip with all the series of the day and their sum.

Under the charts stands the **“Token distribution”**: two profiles and one histogram. The profiles “Tokens by hour of day” (24 bars) and “Tokens by day of week” (seven, starting with Monday) answer *when* the tokens are spent. The histogram shows how individual chats scatter around the total: each chat is one point with its own lifetime tokens. The biggest and the smallest 3% of chats gather into the edge “≤” and “≥” columns, so rare outliers do not flatten the rest.

## Cost: what it works out to

The “Cost” screen is the same five tiles, only in money: the spend for the previous window, for the current one, a forecast, yesterday and today. When a monthly budget is set, a sixth tile with what is left of it appears beside them.

The “by app” tab answers who exactly pulls the budget: a chat belongs to the app that created it (MultiAgent, the agent itself, another app of the factory). Whatever could not be attributed — older chats without a mark — gathers in a single “No app” row, so the sums still agree with the total tiles.

Below come four blocks. **“Spend trends”** — the same tabs as on “Tokens”, but in money. **“Attribution”** takes the full width: one row per factory, agent, model or skill — the spend, the share and the number of chats, with the agent’s card or the factory’s page one click away. Next — **“Caps and guards”**: a limit per chat, per agent per day and per run’s total tokens, plus what happens on crossing — stop the work, just notify, or ask for confirmation. The last pair of blocks — **“Deviations”**: agents spending noticeably more than their usual profile.

The traffic light over the model-provider accounts is not on this screen any more — it moved into the bottom of the “Fleet” screen, which is where it belongs: that is the state of external services, not spend. The quotas and balances are still set on the [Accounts](/agents/multiagent/docs/accounts)
 page.

**“Cost distribution”** is built exactly like the token distribution, only in money: over hours of the day, over days of the week and over individual chats. The hour and day bars add up to the same sum the period tiles show.

## Speed: how fast the agents answer

Speed is how many output tokens an agent produces per second of processing. It is computed for every chat separately, and a chat lands on the day it was last active. The number shows the model’s actual working speed, not the time spent waiting in a queue.

The screen’s main rule: every aggregate number is a **weighted** speed, that is, all the tokens of the period divided by all the processing time. This way one fast chat cannot produce a flattering figure: long and short chats affect the result by their real work. An average of averages is never computed here.

There are five tiles here too: the speed for the previous window, for the current one, a forecast, yesterday and today. The difference under the number reads the opposite way from money: a rise is green (faster is better), a fall is red. When there is nothing to measure yet, the screen says so honestly — “No speeds to account for yet” — instead of drawing zeroes.

**“Speed trends”** — five tabs (by factory, agent, model, skill and app) and one chart, but lines instead of bars: speeds do not add up, so stacking them would be a lie. Where a key did not work that day, there is simply no line — a gap, not a zero: an unobserved speed is not the same as a slow one. The lines are smoothed lightly, so you see the bends rather than an ideal wave; hovering a line highlights it and shows only its numbers.

Two blocks stand under the trends. **“Attribution”** — one row per key: its speed, its share of the period’s output tokens (speeds do not sum, so the share is taken over tokens) and the number of chats. The rows run from the fastest, and keys whose speed was never observed are not shown at all. **“Speed distribution”** — the same three charts as on “Tokens” and “Cost”: speed over hours of the day, speed over days of the week, and a histogram of tokens per second across individual chats.

## What is worth knowing

- **A chat belongs to the day of its last activity.** If the work ran for three days, all of it lands on the third day. Restarting MultiAgent does not reset the picture — the history stays where it is;
- **“All time” is not infinity.** The deepest period you can look at is about a year: enough for every ready-made option, but there is no multi-year history in these numbers. The archive in ClickHouse is there for long-term storage;
- **Chats deleted on the agent disappear from the lists** but stay in the totals and on the charts for past periods — otherwise the sums would “jump” retroactively;
- **All three screens read a local copy of the data**, not the agents themselves: they open instantly and put no load on the factories, but a fresh figure arrives with a delay of a few seconds;
- **There is no spend breakdown by account.** A chat’s whole cost belongs to its current model, so changing the model mid-run moves the entire row. The screen says so outright.

How the console itself is built — on the [Management](/agents/multiagent/docs/management)
 page; about machine access to the same numbers — on the [Analytics and exports](/agents/multiagent/docs/analytics)
 page.

[← Back to documentation](/agents/multiagent/docs)
