Agent Cost
What each AI agent spent on model calls this period. The total against last period, the budget it eats into, a daily trend and a row per agent with its tokens, its share and the models behind it.
Cost by agent
Nov 1 to Nov 22| day | Atlas | Forge | Scout | Quill | Relay |
|---|---|---|---|---|---|
| Nov 1 | 7.43 | 6.28 | 5.82 | 4.32 | 2.91 |
| Nov 2 | 30.35 | 19.71 | 14.35 | 9.87 | 5.07 |
| Nov 3 | 22.7 | 24 | 13.89 | 9.99 | 6.36 |
| Nov 4 | 21.95 | 21.93 | 12.38 | 9.55 | 4.96 |
| Nov 5 | 28.94 | 21.73 | 17.83 | 9.6 | 5.97 |
| Nov 6 | 26.69 | 21.3 | 11.64 | 10.6 | 6.46 |
| Nov 7 | 9.72 | 10 | 5.65 | 4.78 | 2.04 |
| Nov 8 | 12.1 | 10.1 | 5.65 | 3.76 | 3.06 |
| Nov 9 | 30.62 | 19.85 | 16.75 | 11.06 | 7.61 |
| Nov 10 | 28.04 | 19.67 | 18.97 | 8.87 | 7.71 |
| Nov 11 | 30.31 | 25.32 | 15.93 | 10.68 | 7.78 |
| Nov 12 | 29.95 | 20.06 | 13.31 | 9.57 | 7.94 |
| Nov 13 | 32.83 | 18.29 | 15.39 | 9.57 | 7.53 |
| Nov 14 | 9.98 | 8.04 | 5.82 | 4 | 2.39 |
| Nov 15 | 10.85 | 8.72 | 6.15 | 4.9 | 2.05 |
| Nov 16 | 32.27 | 20.49 | 16.03 | 12.82 | 6.01 |
| Nov 17 | 32.46 | 28.1 | 15.42 | 8.78 | 5.47 |
| Nov 18 | 23.18 | 23.96 | 17.27 | 12.76 | 5.26 |
| Nov 19 | 32.9 | 26.22 | 18.15 | 8.77 | 7.49 |
| Nov 20 | 29.94 | 28.25 | 15.03 | 10.7 | 6.19 |
| Nov 21 | 14.88 | 7.48 | 8.43 | 3.75 | 3.24 |
| Nov 22 | 14.31 | 8.59 | 6.92 | 3.61 | 2.9 |
- AtlasLead
- ForgeEngineering
- ScoutResearch
- QuillWriting
- RelaySupport
Installation#
Usage#
The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.
Have a license? Unlock it here
Anatomy#
import {
AgentCost,
AgentCostHeader,
AgentCostTitle,
AgentCostPeriod,
AgentCostTotal,
AgentCostBudget,
AgentCostChart,
AgentCostList,
} from "@/components/ui/agent-cost"
<AgentCost>
<AgentCostHeader>
<AgentCostTitle />
<AgentCostPeriod />
</AgentCostHeader>
<AgentCostTotal />
<AgentCostBudget />
<AgentCostChart />
<AgentCostList />
</AgentCost>Budget levels#
The budget stays neutral until warnAt (70%), turns amber there and red from criticalAt (90%). Only the meter changes colour: the rows stay ink, so the agents never compete with the warning. Drag the budget to move between levels.
Only the parts you need#
Every part reads the same data from the root, so you render only what the screen needs. A header and the list make a top agents widget; variant="plain" drops the frame when the page already gives it one.
Top agents
This month- AtlasLead
- ForgeEngineering
- ScoutResearch
- QuillWriting
- RelaySupport
With Model Cost#
Side by side with Model Cost, the same spend reads both ways: who spent it and on what. Both panels share one anatomy, so their rows, budgets and charts line up.
Cost by agent
Nov 1 to Nov 22| day | Atlas | Forge | Scout | Quill | Relay |
|---|---|---|---|---|---|
| Nov 1 | 7.43 | 6.28 | 5.82 | 4.32 | 2.91 |
| Nov 2 | 30.35 | 19.71 | 14.35 | 9.87 | 5.07 |
| Nov 3 | 22.7 | 24 | 13.89 | 9.99 | 6.36 |
| Nov 4 | 21.95 | 21.93 | 12.38 | 9.55 | 4.96 |
| Nov 5 | 28.94 | 21.73 | 17.83 | 9.6 | 5.97 |
| Nov 6 | 26.69 | 21.3 | 11.64 | 10.6 | 6.46 |
| Nov 7 | 9.72 | 10 | 5.65 | 4.78 | 2.04 |
| Nov 8 | 12.1 | 10.1 | 5.65 | 3.76 | 3.06 |
| Nov 9 | 30.62 | 19.85 | 16.75 | 11.06 | 7.61 |
| Nov 10 | 28.04 | 19.67 | 18.97 | 8.87 | 7.71 |
| Nov 11 | 30.31 | 25.32 | 15.93 | 10.68 | 7.78 |
| Nov 12 | 29.95 | 20.06 | 13.31 | 9.57 | 7.94 |
| Nov 13 | 32.83 | 18.29 | 15.39 | 9.57 | 7.53 |
| Nov 14 | 9.98 | 8.04 | 5.82 | 4 | 2.39 |
| Nov 15 | 10.85 | 8.72 | 6.15 | 4.9 | 2.05 |
| Nov 16 | 32.27 | 20.49 | 16.03 | 12.82 | 6.01 |
| Nov 17 | 32.46 | 28.1 | 15.42 | 8.78 | 5.47 |
| Nov 18 | 23.18 | 23.96 | 17.27 | 12.76 | 5.26 |
| Nov 19 | 32.9 | 26.22 | 18.15 | 8.77 | 7.49 |
| Nov 20 | 29.94 | 28.25 | 15.03 | 10.7 | 6.19 |
| Nov 21 | 14.88 | 7.48 | 8.43 | 3.75 | 3.24 |
| Nov 22 | 14.31 | 8.59 | 6.92 | 3.61 | 2.9 |
- AtlasLead
- ForgeEngineering
- ScoutResearch
- QuillWriting
- RelaySupport
Cost by model
Nov 1 to Nov 22| day | Claude Opus 5.5 | Claude Sonnet 5.5 | GPT-5 | Claude Haiku 5.5 | Gemini 2.5 Pro |
|---|---|---|---|---|---|
| Nov 1 | 9.78 | 8.11 | 3.48 | 1.37 | 2.01 |
| Nov 2 | 32.98 | 26.44 | 8.83 | 4.96 | 4.87 |
| Nov 3 | 30.99 | 19.37 | 7.13 | 3.4 | 3.99 |
| Nov 4 | 37.4 | 18.79 | 11.09 | 4.34 | 4.86 |
| Nov 5 | 27.72 | 28.25 | 8.17 | 4.65 | 4.59 |
| Nov 6 | 28.69 | 24.47 | 8.81 | 4.2 | 4.82 |
| Nov 7 | 16.73 | 12.37 | 4.1 | 1.67 | 1.5 |
| Nov 8 | 16.95 | 9.48 | 3.17 | 1.78 | 1.38 |
| Nov 9 | 43 | 23.61 | 10.25 | 3.78 | 5.16 |
| Nov 10 | 40.81 | 26.34 | 8.85 | 5.67 | 5.57 |
| Nov 11 | 32.62 | 33.41 | 12.08 | 5.87 | 3.66 |
| Nov 12 | 43.72 | 32.61 | 8.73 | 6.11 | 5.47 |
| Nov 13 | 42.68 | 34.11 | 9.25 | 4.96 | 3.95 |
| Nov 14 | 16.26 | 9.63 | 3.34 | 2.17 | 2.23 |
| Nov 15 | 11.55 | 8.52 | 3.85 | 2.29 | 1.85 |
| Nov 16 | 30.09 | 26.5 | 9.03 | 4.89 | 4.5 |
| Nov 17 | 43.76 | 33.31 | 9.33 | 4.73 | 5.83 |
| Nov 18 | 32.31 | 35.26 | 11.65 | 4.19 | 5.74 |
| Nov 19 | 35.38 | 32 | 13.02 | 5.35 | 4.29 |
| Nov 20 | 35.44 | 31.94 | 8.89 | 6.66 | 5.28 |
| Nov 21 | 19.67 | 13.27 | 5.17 | 2.72 | 1.66 |
| Nov 22 | 12.64 | 10.9 | 4.38 | 2.52 | 1.99 |
- Claude Opus 5.5Anthropic
- Claude Sonnet 5.5Anthropic
- GPT-5OpenAI
- Claude Haiku 5.5Anthropic
- Gemini 2.5 ProGoogle
API reference#
AgentCost
The root, a <section> named by its title. It sorts the agents by cost, sums the total and works out the budget level every part reads.
| Prop | Type | Default | Description |
|---|---|---|---|
| agents* | AgentCostDatum[] | - | One entry per agent. Order does not matter: rows are sorted by cost. |
| previousTotal | number | - | What the same days cost last period. Drives the trend, whose tooltip names the previous amount. |
| budget | number | - | The period's spend limit. Without it AgentCostBudget renders nothing. |
| warnAt | number | 0.7 | Fraction of the budget from which the level turns warning. |
| criticalAt | number | 0.9 | Fraction of the budget from which the level turns critical. |
| currency | string | "USD" | ISO currency for every amount. Formatted in en-US, so server and client agree. |
| variant | "outline" | "plain" | "outline" | outline draws the panel's hairline frame; plain leaves it to the page. |
| Data attribute | Description |
|---|---|
| data-level | normal, warning or critical, when a budget is set. |
AgentCostHeader
The title row: title at the start, period at the end.
AgentCostTitle
The panel's <h2>, which names the section. Medium weight, like every app section title.
| Prop | Type | Default | Description |
|---|---|---|---|
| info | React.ReactNode | - | How the figure is computed, behind an info Toggletip that also opens on touch. |
| infoLabel | string | "About this cost" | The info button's accessible name. |
AgentCostPeriod
The date range, muted, in tabular figures.
AgentCostTotal
The total as a plain Stat, with an inverted trend against previousTotal: spending more reads as negative. Hover or focus the trend for last period's amount. Children render after the trend.
AgentCostBudget
Spend against budget as a Meter in the level's tone. The amounts and the reset date sit in its tooltip, so the panel keeps one line for it.
| Prop | Type | Default | Description |
|---|---|---|---|
| label | React.ReactNode | "Monthly budget" | The meter's label. |
| resets | React.ReactNode | - | When the budget starts over, shown in the tooltip. |
| Data attribute | Description |
|---|---|
| data-level | normal, warning or critical. |
AgentCostChart
Daily cost as stacked bars, one series per agent on the tonal ramp, biggest agent on the strongest step.
| Prop | Type | Default | Description |
|---|---|---|---|
| data* | ChartDatum[] | - | One point per day, a key per agent id. |
| index | string | "day" | The key that names each point. |
| tickFormatter | (value: string | number) => string | - | How a day is written on the axis. |
| label | string | "Daily cost by agent" | The chart's accessible name and its data table caption. |
AgentCostList
One row per agent, kept to two lines: mark, name and cost, then a neutral share bar and the trend. Everything else waits in the row's tooltip: share, tokens in, out and cache, the models the agent used and its effective rate per million.
The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.
Have a license? Unlock it here