C.W.K.
Stream
Lesson 05 of 05 · published

Cost, Latency, and Debugging Surface

~26 min · cost, latency, debugging

Level 0Observer
0 XP0/40 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Multi-agent costs multiply

A manager calls three specialists, each specialist uses five tool loops, the reviewer runs twice, and suddenly one user request became dozens of model calls. That may be worth it. It is not free.

Debugging also multiplies. You need traces per agent, shared correlation ids, handoff summaries, and a way to replay only the failed branch.

Budget before architecture

Set per-agent step limits and total run limits. Track cost by branch, not only by whole run. If a worker has no useful result after N steps, stop it and return partial failure.

Parallelism improves wall-clock time but can increase total cost. Measure both.

Code

Trace identifiers·json
{"run_id":"run_abc","parent_agent":"manager","agent":"researcher","branch":"sources","step":4,"cost_usd":0.032,"status":"tool_call"}

External links

Exercise

Estimate the call count for a manager with 3 workers, each allowed 6 steps, plus 2 review passes. Then set a cheaper budget.
Hint
The scary number is the lesson. Good.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.