ModelRefs / Agent Swarm / Swarm — AI Glossary

Agent Swarm / Swarm — AI Glossary

A multi-agent pattern using lightweight, ephemeral agents with handoff-based routing rather than a persistent orchestrator.

Overview

OpenAI Swarm (2024, experimental) demonstrates a minimalist multi-agent pattern: agents are stateless, context is passed via handoffs, no central orchestrator. Agents can hand off to other agents when their task scope is exceeded. The pattern reduces architectural complexity at the cost of less sophisticated coordination.

Reference details

Topicagents
Last reviewed2026-06-24

How it works

  1. Agents are stateless functions with a role instruction and a tool set. Nothing persists in an agent between invocations, so there is no agent-level memory to reason about.
  2. Routing happens by handoff: an agent returns a reference to another agent rather than a result, and the loop continues with that agent holding the same conversation.
  3. Because the conversation is passed rather than summarised, the receiving agent sees the full history. That removes the under-specified-handoff failure of summary-based delegation and gives up the context saving that summarising buys.
  4. There is no orchestrator. Control flow emerges from which agent decides to hand off to whom, which makes the system simple to write and its paths hard to enumerate in advance.
  5. Handoff targets are declared per agent, so the reachable graph is defined even though the actual path is not, which is what keeps the pattern from being wholly unpredictable.
  6. The cost profile is the pattern's main advantage: a handoff replaces the agent rather than adding a supervisory turn, so coordination is nearly free compared with routing every step through a manager.

Example: What removing the orchestrator saves in model turns

Take a task needing 10 substantive steps. Under a manager-and-worker pattern, each step costs two model turns — one for the manager to decide and assign, one for the worker to act — so the run is 2 x 10 = 20 turns. Under handoff routing, each step is one turn and a handoff is also one turn, so a run with 3 handoffs is 10 + 3 = 13 turns. That is 20 / 13 = 1.5x fewer turns, and at 800ms per turn it is 20 x 800 = 16,000ms against 13 x 800 = 10,400ms — 5.6 seconds saved on coordination that produced no output either way. The cost of the saving is that no component has an overview: the manager pattern can notice that three steps have made no progress and change approach, while a handoff chain can only pass the problem along. So the trade is 35% of the latency against the ability to supervise, which is why this pattern suits routing — getting a request to the right specialist — and suits long multi-stage problem solving much less well.

Commonly confused with

Handoff and delegation are different control transfers and the distinction decides which failures you get. A handoff replaces the active agent: control moves, the conversation moves with it, and nothing returns to the caller. Delegation calls a sub-agent, receives a result, and continues — the caller retains control and can act on what came back. Handoff is cheaper and gives up supervision; delegation costs a turn and keeps it. A system that handles a request end to end by handoff has no component that can see whether the request was ultimately answered.

When to use it

Reach for it when:

  • Routing to specialists, where the work is identifying the right handler and then getting out of the way.
  • Clear ownership boundaries — triage to billing to technical support — where each stage owns its outcome.
  • Latency-sensitive multi-agent flows, since handoffs avoid the supervisory turn per step.
  • Prototyping multi-agent structure, where the pattern's simplicity makes the shape easy to change.

Reach for something else when:

  • Long multi-stage problem solving needing an overview, which no component in a handoff chain has.
  • Work requiring results to be combined, since a handoff passes control rather than returning a value.
  • Context-sensitive cost control, because passing the full conversation means every handoff inherits its growing size.
  • Anything needing an enumerable set of execution paths for audit, where emergent routing is the wrong property.

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Agent Swarm / Swarm — AI Glossary.

Frequently asked questions

What is Agent Swarm / Swarm?

A multi-agent pattern using lightweight, ephemeral agents with handoff-based routing rather than a persistent orchestrator.

What concepts are related to Agent Swarm / Swarm?

Closely related concepts include autogen, worker agent, orchestrator.