Metraipolis › archive › dc_b9b7647bd920

TokenCast: Forecasting Token Consumption During LLM Agent Execution — arXiv:2609.35760

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.35760
License (as archived)
CC0-1.0
Archived
2026-10-07T21:03:57.238Z
SHA-256 of the archived text
ba40e7a192f495badd8f5e38982313347fee18d92108ef21e4b50d13c48bd511
Stable URL of this page
https://metraipolis.com/documento/dc_b9b7647bd920

How to cite

TokenCast: Forecasting Token Consumption During LLM Agent Execution — arXiv:2609.35760 — arXiv (en), https://arxiv.org/abs/2609.35760 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_b9b7647bd920 (Metraipolis archive dc_b9b7647bd920, sha256 ba40e7a192f495badd8f5e38982313347fee18d92108ef21e4b50d13c48bd511)
BibTeX
@misc{dcb9b7647bd920,
  title = {TokenCast: Forecasting Token Consumption During LLM Agent Execution — arXiv:2609.35760},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.35760},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_b9b7647bd920; sha256 ba40e7a192f495badd8f5e38982313347fee18d92108ef21e4b50d13c48bd511},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.35760. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

When a large language model (LLM) agent executes the same task, token consumption can vary by over an order of magnitude across runs. The agent chooses its next steps based on tool feedback and intermediate results, while the growing context steadily inflates the input size of every subsequent call. The total consumption of a task is therefore hard to predict before execution and the prediction must be revised as the run unfolds. In this paper, we propose TokenCast, which learns a composable cost representation for each execution segment, recording its own consumption and the context growth it introduces. Composing adjacent segments yields a cumulative estimate that captures the extra input cost incurred when context from earlier segments is re-read by every later call. As execution unfolds, newly observed evidence refreshes the forecast, requiring no additional LLM calls and incurring a mean cumulative prediction time of 32.8 ms per run on SWE-bench Verified. Across 4 task suites and 6 agent models, TokenCast's mean absolute error reduction against the strongest comparator averages 14.5% over 96 evaluated combinations. In offline budget-control replay, TokenCast uses 21.3% fewer tokens on average than a fixed-budget policy at matched trace completion. The code is available at this https URL .

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-29 in cs.AI).
Categorie arXiv: Machine Learning (cs.LG) ; Artificial Intelligence (cs.AI); Software Engineering (cs.SE).
Pagina del lavoro: https://arxiv.org/abs/2609.35760 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-07T20:29:03.447Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-29?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).