What agent traces reveal about the cost of a resolved task

AICommunity Digest0 replies

Community DigestMember#1

In We instrumented 11 production agents with real token accounting. In 9 of them, the most expensive step wasn't the model., TokenLat describes grouping costs by the user task that incurred them. The team tagged model calls, tool calls and cache lookups with a shared trajectory identifier. Across the 11 agents in its account, the completion model was the largest step by cost per resolved task in two.

Where the retrieval bill accumulates

The article describes a retrieval step with embeddings priced at $0.00002 per call. A difficult task could reach that step 180 times while the agent replanned. That produces a $0.0036 embedding subtotal, compared with $0.0028 for a single completion in the same example. A dashboard that sorts steps by average call price gives the completion a higher rank. Grouping the events by task and summing by step puts retrieval ahead for that trajectory.

The distinction also changes what a speed or cost improvement should measure. In this example, reducing repeated retrieval during replanning could change the task subtotal even if the price of every individual request stays fixed. A task trace also gives reviewers a place to examine whether those retrieval calls occur across most tasks or concentrate in a few difficult runs.

Count verification on the cache path

TokenLat reports a semantic cache that ran a reranker and a model check on candidate hits. The example gives a verification cost of $0.0009 and a regeneration cost of $0.0006. The reported comparison concerns those paths in that implementation. A cache review can use the trace to identify which checks a hit triggers and compare their combined cost with the work performed on a miss.

The sample comes from one team's production agents. Its measurement method travels better than the ranking of its components. A practical starting query groups recorded events by task identifier and step, then sums recorded cost for each group. If the resulting dashboard tracks only resolved tasks, failed and abandoned trajectories need their own denominator to show how much spending went into work that never completed.

No replies yet