OpenAI Swarm: Lightweight Multi-Agent Orchestration#

Original | Raw

OpenAI’s experimental/educational framework (October 2024). Radically minimal: agents are system prompts with functions, handoffs are functions that return another agent. Explicitly NOT for production — demonstrates patterns implementable with any LLM SDK.

⚠️ Superseded (2025): The [[openai-agents-sdk|OpenAI Agents SDK]] (26.2K stars) is the production successor. Swarm remains useful as a learning tool but is no longer the recommended path for production systems.

Two Primitives#

  1. Routines — system prompt + callable functions
  2. Handoffs — functions that return another Agent, transferring control

That’s the entire framework on top of Chat Completions API.

Context Variables#

Shared state between agents without putting it in conversation history. Keeps sensitive data out of messages. Passed at runtime.

Design Philosophy#

Shows multi-agent orchestration doesn’t require complex infrastructure. The handoff pattern itself IS production-ready even though Swarm isn’t. Echoes pai’s CODE → CLI → PROMPT → SKILL hierarchy: use the simplest tool that works.

Limitations#

No state persistence, no memory beyond context variables, no checkpointing, no human-in-the-loop. Educational only.

See Also#