Per-agent cost as a stacked bar over time is the one panel worth shipping first; it converts 'multi-agent is expensive' into a named agent and a concrete fix.
Imagine the team you hired sent you one big bill at the end of the month. You know you spent too much, but you cannot tell who to talk to. Now imagine the bill itemises each person's hours: the project manager logged forty hours, three workers logged eight each, the reviewer logged twenty. Suddenly you can see the project manager is eating most of the budget and ask why. Maybe they sit in on every conversation when they only need a summary. That itemised view is exactly what a per-agent cost dashboard gives you for an LLM agent team. The total bill is shouting; the breakdown is whispering the actual diagnosis.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Every multi-agent rollout eventually faces the same meeting: the engineering lead, the product manager, and someone from finance are looking at a graph that has been climbing for two weeks and trying to decide whether to roll back. The graph in that meeting is almost always aggregate cost.
That is the wrong panel. Aggregate cost tells you there is a problem and gives you no purchase on it. The panel that converts the meeting from 'what do we do' into 'let us fix the supervisor' is per-agent cost attribution. It is one chart, and it pays for the modest effort to instrument it within the first incident.
What aggregate cost actually tells you
Aggregate cost is a single time series: how much you spent on the LLM bill for the multi-agent feature, summed across all agents and all tasks. It answers exactly one question: is the bill going up?
That answer is useful for a leadership review and useless for everything else. Because the bill is one number, the only actions it suggests are coarse ones: roll back to single-agent, cap the request rate, swap to a cheaper model across the board. Each of those is either a hammer (rollback) or a coin-flip (cheaper model often hurts quality more than it saves).
The deeper issue is that aggregate cost is a sum, and multi-agent cost distributions are heavy-tailed. One agent typically eats forty to sixty percent of the bill while others contribute a few percent each. Aggregate hides this skew completely.
When the bill is too high, the question you actually need to answer is 'which agent is the cost-dominant one, and what is the cheapest fix for that specific agent?' Aggregate cost cannot tell you. Per-agent cost can.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- LangSmith's traces UI groups token counts per node, which doubles as the per-agent cost slice for LangGraph workflows.
- Anthropic's Claude usage dashboard exposes per-API-key cost, which teams use to tag each agent with its own key and recover the slice.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you wire per-agent cost attribution into an existing LangGraph workflow without changing every node?
Add a single global callback that reads the active node name from the run state, multiplies the LLM-call token usage by the per-model price, and emits a per-node metric to your observability backend.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Shipping aggregate cost first because it is easy. Aggregate tells you there is a problem; it does not tell you which agent to cut, which is the question you actually need answered.
60 second bullets to scan on the way to the call.
Why aggregate cost is insufficient for multi-agent diagnosis
Common dominant patterns: supervisor, critic loop, retrying worker
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.