Skip to main content
Version: v2.0

Analyze cost and usage

Agenta records requests, latency, tokens, and an estimated cost, and traces every model and tool call. Where you look depends on how narrow your question is. For what drives the numbers, see Cost and usage.

Your questionWhere to look
What is the whole project using?Usage on the project home
What is one agent using?The agent's Overview
What did that one message cost?The message footer in the playground
Where did the cost in one run go?The trace, under Observability

The whole project

Go to Sidebar > Home and find the Usage section below Templates. Collapsed, it is one row: a date range button (Last 1 month by default), then Requests, Latency, Cost, and Tokens.

Click Expand for the four charts over the same range:

CardValues
RequestsTotal: and Failed:
LatencyAvg:
CostTotal: and Avg:
TokensTotal: and Avg:

Change the date range with the button on the left of the row.

One agent

Go to Sidebar > Agents > <agent name> > Overview. It carries the same four cards, Requests, Latency, Cost, and Tokens, scoped to that agent, with their own Last 1 month range control. A chart with nothing in range reads No data.

Below the cards, Deployment shows the Development, Staging, and Production cards for the agent.

One message

In the playground, the footer of each assistant message shows three values inline: how long the turn took, how many tokens it used, and what it cost. Use it while you are editing an agent, to see what a change to the instructions or the tool list did to a single turn.

One run

Traces are under Observability, either project-wide at Sidebar > Observability or for one agent at Sidebar > Agents > <agent name> > Observability.

On the Traces tab, narrow the list before you read it:

  • The date range button defaults to Last 24 hours.
  • Search and the filter button cut the list down further.
  • The Root / LLM / All control changes which spans are listed.
  • Export takes the current table out as a file.

Click a row to open the trace. The left pane is the span tree, and each node shows its duration, cost, and token count, which is how you find the step that spent the money. If the footer says spans are hidden, click Show all to see every one.

The right rail has Trace info with Type, Status, Latency, Timestamp, and Tokens & Cost for the trace as a whole. The centre pane shows inputs, parameters, and outputs for the selected span, so you can read exactly what was sent to the model.

The Sessions tab next to Traces lists activity by session rather than by trace.

note

The cost figures are estimates calculated from token counts and model prices. What you are billed comes from whoever serves the model, which is set by the credential on the agent. See Choose a harness and model.