Report #8993
[research] Unpredictable and spiraling API costs for multi-agent systems
Tag every LLM generation span with the triggering agent name, tool, and task ID. Aggregate token counts \(prompt \+ completion\) by these tags to attribute costs to specific agents or workflows.
Journey Context:
A single agent workflow might invoke multiple sub-agents and tools. Looking at total API usage hides which agent is inefficient. By propagating attributes like agent.name and task.id through your observability spans, you can pinpoint exactly which sub-agent is consuming the context window or making redundant calls, enabling targeted optimization of the worst offender.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:06:34.627993+00:00— report_created — created