AI GLOSSARY · AGENTS AND AGENT TOOLING

OpenAI Swarm

Markdown version

Definition

OpenAI Swarm is an experimental, educational open-source Python library from OpenAI for learning multi-agent orchestration, where one AI agent hands a conversation to another. OpenAI's README says it has been replaced by the OpenAI Agents SDK.

Also called: Swarm, swarm openai, swarm agents, OpenAI Swarm framework, openai/swarm.

In plain language

Swarm is a small teaching project published by OpenAI. It shows how several AI helpers, each with its own instructions and abilities, can pass a conversation between them: a general helper might hand a customer to a billing helper, then to a refunds helper. It is code you read and run to learn the idea, not a finished product. OpenAI's README says Swarm has been replaced by the OpenAI Agents SDK and recommends migrating to it for production use. If you copy Swarm into something real, you inherit a project the publisher describes as experimental, so check the README first. Running agents also means model calls that cost money.

Technical definition

Swarm's README says an Agent encapsulates a set of instructions with a set of functions, and that an agent can hand off to another agent by returning it from a function. Its client.run() implements a loop: get a completion from the current agent, execute any tool calls, switch agents if a function returned one, update context variables, and return once there are no new function calls. The README labels the project experimental and educational and states that Swarm is now replaced by the OpenAI Agents SDK, which it calls a production-ready evolution of Swarm. The Agents SDK documentation likewise describes itself as an upgrade of the earlier experimentation, Swarm, and lists handoffs among its primitives.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    subagent-design 47/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A skill that helps decide what to delegate and then writes subagent definitions and briefs that work without the conversation.
    Why it exercises the concept
    Swarm's idea is dividing work between agents with separate instructions. This skill is about drawing that same boundary for a coding agent.
  2. Skill by Jesse Vincent · Illustrative, not executed

    subagent-driven-development 30/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A skill that executes a plan by handing independent tasks to separate subagents.
    Why it exercises the concept
    It is a delegation pattern in the same family as handing work from one agent to another, in a coding-agent setting rather than Swarm's Python library.
  3. Guide · Illustrative, not executed

    Claude Code Subagents: When to Delegate and How to Scope Tools

    What you see
    A guide to subagents in Claude Code.
    Why it exercises the concept
    Shows how a coding tool splits work across agents with their own instructions, which is the problem Swarm was written to teach.
  4. Coding tool · Illustrative, not executed

    Codex

    What to try
    codex
    What you see
    Open a project directory and run codex.
    Why it exercises the concept
    A coding agent from the same publisher as Swarm. It is a separate product and does not use Swarm.

How it shows up when you use agents

Swarm turns up when you search for a simple way to see multi-agent handoffs in code. In its README, an agent is instructions plus functions, and a handoff happens when a function returns another agent. That makes it a readable demo of agent orchestration inside a multi-agent system.

What goes wrong is treating it as a supported framework. OpenAI's README labels it experimental and educational and says the OpenAI Agents SDK replaces it. If you are starting a project, read the SDK docs first and use Swarm as reading material.

Swarm is a Python library you call from your own code. If you use Claude Code, Codex or Cursor, you are unlikely to meet it in a session. The same idea, splitting work between agents with their own instructions, appears there as subagents. Next step: if you only want delegation in a coding session, read the subagents guide and the subagent-design skill.

Common confusions

  • Swarm versus the Agents SDK. Swarm is the experimental, educational predecessor. The README says the Agents SDK replaces it.
  • Handoff versus tool call. In Swarm a handoff is a function that returns another agent, which switches who answers next. An ordinary tool call returns data to the same agent.
  • Myth: OpenAI Swarm is a product for production use. The README says it is experimental and educational and recommends the Agents SDK for production.

More in Agents and agent tooling

Next steps

  1. Claude Code Subagents: When to Delegate and How to Scope Tools The long-form guide.
  2. subagent-design A skill that exercises it.
  3. AI agent Related term.
  4. Tool calling (function calling) Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-24. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; sources and example targets checked by claude-haiku-5-5 source check; claude-sonnet-5-5 editor pass on 2026-11-24. Last verified .

This entry is still in review, so it is not listed in search engines yet.

Change log (2)
  • : First version.
  • : Verifier pass: Codex example now quotes the CLI page and adds it as a source, cut unsourced confusion bullet, softened absolute.