Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Token Forensics for Agent Runs: Five Waste Signatures and the Order to Fix Them

说明与用途

夜间代理因重试、静态令牌和提示增长等结构性浪费导致令牌预算过早耗尽。实施逐步计量器识别了这些问题,并通过有针对性的修复降低了成本并提升了输出质量。

问题

Nightly agent jobs exceeded token budgets early, producing few usable outputs.

结果

The meter revealed that structural waste, not model cost, caused budget overruns. Fixing retry amplification, static token overhead, and prompt growth reduced token consumption and improved output quality.

工作流

  • Measure per‑step token usage using the provided meter script.
  • Identify waste signatures: static token overhead, reused context, retry amplification, prompt growth, and leaf branching.
  • Prioritize fixes: stop rule for retries, shrink system prompt and tool schemas, reduce redundant context, limit leaf suggestions, and control prompt growth.
  • Apply fixes incrementally and re‑measure to confirm cost reduction.
  • Iterate until token budget aligns with expected usage.

证据

It was not the model. It was step 7 resending the same 4,000-token tool output on every attempt, after a validation failure that fired four times.

来源

Measure per step first. Then the routing question becomes answerable with numbers instead of vibes.

来源

You need three numbers per step that providers already return in usage, plus two annotations you add yourself: how many tokens are static, and how many are reused from an earlier step.

来源

  • 记录日期: 2026-10-20T10:41:03.968Z