Functions
swarm
Function: swarm()
swarm(
opts):Runner<{message:string; },string>
Defined in: src/patterns/Swarm.ts:62
Build a Swarm Runner. Each iteration:
- Router evaluates
route(input)to pick an agent id. - Conditional dispatches to that agent's runner.
- Agent's output becomes the next iteration's input.
Loop halts when
routereturns a halt-sentinel id (or unknown id falling to thedonebranch) OR whenmaxHandoffsis reached.
Parameters
opts
Returns
Runner<{ message: string; }, string>
