Download all docs

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

ElementRole
triformerBoth the lead coordinator and the worker agents it delegates to.
automationCoordinates the fan-out and gathers results.
boardOne card per sub-task — the shared, visible state of the swarm.

Flow

  1. Create your worker triformer agents — one per specialty (research, drafting, review), each with its own prompt and tools.
  2. Create a lead triformer. It breaks the task down and dispatches each piece with the delegate operation — fire-and-forget to another agent element in the same circle (it requires a target agent and a prompt, and returns a delegation_id). The delegation is circle-scoped and A2A-aligned.
  3. Track each dispatched piece. Poll delegation_status with the delegation_id to see how a worker is doing, and cancel_delegation to abort one that has gone astray.
  4. Make the swarm’s state visible on a board: add-card per sub-task as it is delegated, update-card as workers report back, and board-summary for the roll-up. Now “what is the swarm doing right now?” is a glance, not a guess.
  5. Coordinate the whole thing with an automation, which references triformer and board as steps — its loop child fans a list of sub-tasks out to delegate calls, and a condition decides 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.

Next pages