Build customer support systems where a triage agent routes requests to specialized billing, technical, or refund agents.
Create multi-agent workflows where agents hand off conversations based on expertise or task type.
Prototype and learn how AI agents can coordinate with each other in a stateless, testable way.
Requires OpenAI API key and valid credentials to run agent examples.
Swarm is an experimental, educational Python framework from OpenAI for building systems where multiple AI agents coordinate with one another. An "agent" here means a configured instance of a language model, something with a set of instructions and a set of tools (functions it can call), and "multi-agent orchestration" means writing code that lets those agents hand off control to each other depending on what a user needs. The framework is built around two concepts: Agents and handoffs. You define agents by giving each one instructions and optionally some Python functions it can call. When one agent decides the conversation is better handled by a different agent, it performs a handoff, it returns a reference to the other agent, and Swarm automatically routes the conversation there. This makes it easy to build systems like a customer support flow where a general triage agent routes requests to specialized agents for billing, technical support, or refunds. Swarm is stateless, meaning it does not store conversation history between calls, you manage state yourself, which keeps it simple and testable. It runs on the client side using the standard OpenAI Chat Completions API under the hood. The README notes that Swarm has been superseded by the OpenAI Agents SDK, which is described as the production-ready version, and recommends migrating to that for any real-world use. Swarm remains available as an educational resource for understanding the concepts behind multi-agent coordination. It requires Python 3.10 or later and is installed directly from the GitHub repository using pip.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.