acceptodds
Under review as a conference paper at ICLR 2027

Tokenometrica: Trace-Grounded Accounting and Scaling Laws for Agentic Token Demand

Abstract

LLM agents are metered and billed in tokens, yet a token total says neither where the tokens went nor how they will grow as tasks get longer. We introduce Tokenometrica, a framework that treats every agent run as an observable metered trace and partitions each model call, through an exact accounting identity, into new prompt, replayed context, completion, reasoning, tool-schema, tool-argument, and tool-observation tokens. Token-demand functions over families of traces are stated with ordinary in named scale variables under an explicit quality floor. We prove a replay law: under full-history replay, a -round loop costs tokens, with a closed-form depth beyond which replay dominates. Under random termination, expected token demand is finite if and only if , and the bill inherits half the tail index of the interaction count. We also give an exact log-mean Divisia identity that attributes an empirical scaling exponent to mechanisms. We apply Tokenometrica to 26,437 public trajectories from -bench, -bench, and SWE-agent, covering nine LLMs including a reasoning model; the reconstructed meters match provider-reported usage within 0.6% median error. Replayed context and repeatedly exposed tool schemas account for 89–96% of tokens in every system. Model-generated tokens are under 3% for non-reasoning agents, and reasoning adds only 5.3% for o4-mini because it is never replayed. On SWE-agent the token elasticity in rounds rises from 1.06 to 1.69 as runs lengthen, and replay explains 93% of it. Replay-aware forecasts cut the error of interaction-count extrapolation by about half. Live -bench runs confirm the architectural saving that counterfactual accounting predicts, but expose a behavioral cost: with less in context an agent takes more calls, which replay makes expensive, so masking keeps half its predicted saving and every tool-loading variant raised the bill. A 15-round circuit breaker makes each resolved SWE-agent issue cheaper.

open until 14 Dec 2026

est. 32% chance this paper gets accepted at ICLR 2027.

Reject 68%Accept 32%

What do you think this paper will get?

All positions stay anonymous.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.