Recipe: Agent Swarm Orchestration
This recipe runs a team of agents instead of one. A lead triformer breaks a task into pieces and hands each to another agent with its delegate operation, an automation coordinates the fan-out, and a board tracks every sub-task as a visible card. One big problem becomes many small ones, worked in parallel.
The problem it solves
Some work is too big or too varied for a single agent: it needs a researcher, a writer, and a reviewer, or it needs ten independent things done at once. A lone agent does them serially and loses the thread. This recipe lets one agent act as a coordinator that dispatches work to specialists and tracks the results — a swarm, not a soloist.
Elements
| Element | Role |
|---|---|
triformer | Both the lead coordinator and the worker agents it delegates to. |
automation | Coordinates the fan-out and gathers results. |
board | One card per sub-task — the shared, visible state of the swarm. |
Flow
- Create your worker
triformeragents — one per specialty (research, drafting, review), each with its own prompt and tools. - Create a lead
triformer. It breaks the task down and dispatches each piece with thedelegateoperation — fire-and-forget to another agent element in the same circle (it requires atargetagent and aprompt, and returns adelegation_id). The delegation is circle-scoped and A2A-aligned. - Track each dispatched piece. Poll
delegation_statuswith thedelegation_idto see how a worker is doing, andcancel_delegationto abort one that has gone astray. - Make the swarm’s state visible on a
board:add-cardper sub-task as it is delegated,update-cardas workers report back, andboard-summaryfor the roll-up. Now “what is the swarm doing right now?” is a glance, not a guess. - Coordinate the whole thing with an
automation, which referencestriformerandboardas steps — itsloopchild fans a list of sub-tasks out todelegatecalls, and aconditiondecides when enough have returned to assemble the final result.
What this shows
delegate makes agent-to-agent dispatch a first-class operation, not a hack — a triformer can hand work to another agent and track it by delegation_id, so a coordinator pattern needs no special infrastructure. The board turns an otherwise-opaque swarm into shared, inspectable state: every sub-task is a card with a status. And because every worker is just another element in the circle, you scale the swarm by creating more agents and delegating to them — the orchestration shape does not change.