Asked to review the UX of one module, an agent started 826 sub-agents and spent $78,000 with no result.
- AAsk the agent at the end of each run to estimate and report how much it probably spent
- BUse a cheaper model for the sub-agents so the same fan-out costs less next time
- CCap parallel agents and set a budget that stops the run
- DForbid sub-agents entirely, because a single agent can never run up a bill that large
Answer: C
Cap parallel agents and set a budget that stops the run
Why
A report after the fact or a cheaper model only changes how much the same mistake costs. A hard cap on how many agents run and a budget that halts the run turn an open-ended bill into a known maximum.
- ScalingYour agent re-embeds the same product catalog on every request to answer questions, and traffic is climbing fast.
- ScalingUnder load your agent fires many parallel model calls at once and starts getting 429 rate-limit errors.
- ScalingYou classify millions of short messages a day with your most capable (and priciest) model, and accuracy on this task is already…
- ScalingYour bill tripled this month.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path