Notes

OpenAI Swarm

Swarm was a teaching project that turned out to be influential. OpenAI published it in late 2024 as an experimental, educational framework, and its purpose was to show that multi-agent coordination needs far less machinery than the frameworks of the day implied.

Two ideas, and nothing else
The entire library rests on a pair of primitives:

  • Routines: an agent is just instructions plus a set of functions it may call — no graph to declare, no roles to configure.
  • Handoffs: a function can return another agent, and from that point the conversation belongs to the new one. Moving a refund question from a triage agent to a refunds agent is a single return statement.

Deliberately stateless
Swarm kept nothing between calls. Orchestration ran entirely on the client, with the conversation passed in and handed back, so the whole control flow was readable in one short file. OpenAI labelled it not for production use — no persistence, no retries, no tracing — and meant it.

Why it matters
The handoff-as-return-value idea outlived the code. Swarm was superseded by the OpenAI Agents SDK, which carries those same two primitives into a supported library with sessions, guardrails and tracing attached. Treat Swarm today as a reference design worth reading rather than a dependency worth adding — and as evidence that a multi-agent system can be a handful of prompts that hand work to each other, not a distributed architecture.

OpenAI Swarm was an experimental, educational framework for lightweight multi-agent orchestration, built on two primitives: routines — an agent as instructions plus callable functions — and handoffs, where a function returns another agent that takes over the conversation. Stateless and client-side by design, and explicitly not for production, it demonstrated how little machinery multi-agent coordination actually requires. The OpenAI Agents SDK is its supported successor.

Imagine a shop counter. The first person listens to what you need, then walks you over to whoever handles returns. Nothing complicated — just a handover.

OpenAI Swarm was a small demonstration project showing that AI helpers can work together in exactly that way. Each helper was given a short job description and a few things it could do, and when a request belonged to someone else, it simply passed the conversation along. OpenAI released it as a teaching example rather than a finished product, to make the point that a team of AI helpers needs very little heavy software underneath. Those ideas now live on in the company's supported toolkit.