Skip to main content
Version: v2.0

Cost and usage

One request to an agent can create more activity than one reply suggests. The agent may ask a model what to do, use a tool, return the result to the model, and repeat that cycle before it gives you an answer.

Agenta records that work so you can see how much the agent used and which steps contributed to it.

One request can involve several model calls

Return to the marketing launch agent preparing its Monday campaign report. You ask for one report, but the agent may need to:

  1. Decide which campaign data to collect.
  2. Call the analytics tool.
  3. Review the result and notice an unusual audience.
  4. Fetch more detail.
  5. Draft the report and post it to your team's channel.

The harness may call the model several times while it moves through those steps. Model providers usually measure the text the model reads and writes in tokens, so each model call contributes to usage.

Tool calls can add work even when the tool itself has no model fee. The tool result becomes new information for the agent to interpret, which may lead to another model call or another tool.

Longer work usually carries more context

As the report develops, the agent may need earlier messages, instructions, tool definitions, and recent tool results to choose its next step. More relevant context usually means more input tokens for the model to process.

This is why two requests that look similar can have different usage. A quick campaign summary and a deeper investigation may begin with the same spreadsheet, but the investigation takes more steps and carries more findings forward.

The model and harness matter too. Models have different prices and capabilities, and harnesses can manage long tasks differently. A lower-cost model is not automatically the cheaper choice if it needs more attempts to finish the work reliably.

Keep the always-needed context focused

You do not need to remove useful guidance simply to save tokens. Give each kind of information the right home:

  • Keep the agent's main instructions focused on guidance it needs across its work.
  • Put repeatable procedures in skills that the agent can load when the task calls for them.
  • Keep detailed reference material in agent files and tell the agent when to read it.
  • Connect only the tools the agent needs for its job.

This also makes the agent easier to maintain. Cost is one benefit of clearer context, not the only reason to organize it.

Agenta records usage at several levels

Agenta shows requests, latency, tokens, and estimated cost for the project and for individual agents. In the playground, an assistant message also shows its duration, tokens, and estimated cost.

These views answer different questions:

QuestionWhere to look
How is the project using models over time?The Usage section on the project home
How much activity belongs to one agent?That agent's Overview page
What did this response use?The assistant message footer in the playground
Which step used the time and tokens?The run's trace in Observability

Estimated cost is not your provider bill

Agenta estimates cost from the recorded token usage and model pricing. This makes it useful for comparing agents, runs, and changes over time.

The actual charge comes from the service that provides the model. Discounts, subscription access, private pricing, gateways, and provider billing rules can make that charge different from Agenta's estimate. Treat the estimate as a way to understand and compare usage, not as an invoice.

A trace shows where the work went

Suppose the Monday report costs more than usual. The total tells you that something changed; the trace helps explain what.

Open the run in Observability and inspect its model and tool steps. You may find that the agent retried an analytics query, received an unusually large result, or spent several model calls investigating the weak audience.

That evidence gives you a better next step than guessing. You might narrow a tool result, shorten material the agent always receives, choose a different model, or keep the extra work because it produced a better report.

Continue with the guide

Analyze cost and usage shows where to find project usage, agent usage, message estimates, and trace-level detail.

Related concepts: