Agent Cost Analysis
Agent Cost Analysis shows what each agent costs, which models the money goes to, and how spend changes over time. It is built from the model calls (generations) your agents make, priced with your model prices.
Enterprise feature. Open it from Gauge AI → Agent Cost Analysis. It needs Gauge AI dashboard read access: Owner, Department Admin, Security & Compliance and Cost Analyst have it. Members who own agents see their own agents only, see Agent owners. Without the Enterprise plan, the page shows a sample preview.
Filters
| Filter | Options |
|---|---|
| Date range | Last 24 hours, Last 7 days, This month (default), Last month, Last 30 days, Last 90 days, Last 12 months, or Custom range of up to 12 months. Presets beyond your plan's data access period or your data retention are disabled. |
| Environment | One or more environments |
| Agent | One or more agents |
Clear filters resets them. Filters are kept in the page URL, so a filtered view can be shared or bookmarked. Preset ranges use your browser's time zone.
Every change figure compares the selected range with the period before it, of the same length. This month compares with the same days of last month, Last month with the month before, and Last 12 months with the 12 months before.
Summary
| Card | What it shows |
|---|---|
| Total cost | What the model calls cost in the range, with the cost per call |
| Projected month-end | With This month only: a straight-line estimate from spend so far this month. Available after the first full day. |
| Tokens | Input and output tokens. Input includes cached input. |
| Agents | Agents with cost or calls in the range, and the number of models used |
| Unattributed | Cost of model calls with no agent, and its share of the total. Shown only when there is some. |
Each card has a sparkline and the change from the previous period. When you select a single agent, Agents and Unattributed are replaced by Runs (one end-to-end task of the agent, which can make several model calls) and Avg cost / run.
Charts and tables
- Spend over time: tabs Cost by agent, Cost by model, Tokens by agent and Tokens by model, with the top 8 shown, and the previous period for comparison. Select an agent in the legend to focus the page on it. Select Unattributed to jump to the unattributed section.
- Model costs: per model, Tokens, Calls, Cost and Share, with a total. A model with no price shows No price: its calls count as $0 and totals are understated until you add a price in Settings → Models.
- Agent × model: the top 10 agents by cost and how each agent's cost splits across models.
- Agents: one row per agent with Cost, Share, Change, Input tokens, Output tokens, Calls, Runs, Avg cost / run and Models. Select a column to sort, and open an agent to see its models. Agents with no spend in the range are folded behind Show n agents with no spend this period. An agent known only by its ID shows as Unnamed agent with the start of the ID.
- Unattributed spend: model calls with no agent, split by source: AI Gateway · model group for Budget AI keys not linked to an agent, and SDK calls with no agent tag.
Each agent row has View traces and Open in Agent Center. Selecting an agent shows a focus bar with its models, its share of all spend, a Suspended badge when the agent is suspended, and the same two actions. All agents returns to the full view.
How the numbers are calculated
- Cost is the sum of the cost of every generation that started in the range, in USD. It is the same cost shown on the trace: the cost your trace reported, or usage × price less any project discount.
- Cost is assigned to the agent recorded on each generation. A generation with no agent counts as Unattributed.
- Calls counts generations that reported tokens or cost. Refused gateway calls with no usage are not counted.
- Runs counts the agent's traces.
- Total cost includes unattributed spend. With an agent filter, Share is measured against the cost of all agents.
Calls made through Budget AI with a key that is linked to an agent are counted for that agent. Link your gateway keys to agents to reduce unattributed spend. Calls made before a key was linked stay unattributed.
The Total cost card in the AI Agent Center uses the same unattributed figure, so both pages show the same total for the same period. Select that card to open Agent Cost Analysis on the same range.
Export
Select Export in the page header and choose CSV, JSON or JSONL. The export uses the current date range, environments and agents. It is queued and runs in the background; when it is ready you get a notification, and an email if the deployment can send email. Download it from Project Settings → Exports. See Data Exports.
The file has one row per agent and model, with the columns agent, agentId, model, costUsd, inputTokens, outputTokens, totalTokens, calls, periodStart and periodEnd. Unattributed rows come last. costUsd is an exact decimal, never rounded.
Exporting needs data export access: Owner, Department Admin and Cost Analyst have it. The export range can be at most 12 months.
Agent owners
A member without Gauge AI dashboard access who owns one or more agents (Manage owners in the AI Agent Center) can open Agent Cost Analysis and sees the cost of their own agents only. Unattributed spend is not shown to them, and the page says so. When someone owns more than 500 agents, totals, charts and exports cover the first 500 by agent ID.
API access
Agent Cost Analysis has no dedicated public API endpoint. To read cost per agent from code, use the Metrics API with the observations view, the totalCost measure and the agentId dimension. Generations with no agent have an empty agentId.
Next steps
- AI Agent Center: status, risk and cost per agent.
- Budget AI Keys: link gateway keys to agents.
- Models & Pricing: price every model so totals are complete.
- Cost & Latency Dashboards: spend by model, user and trace name.