AgentEngineering
toolFrameworksMulti-Agent SystemsPython

OpenAI Swarm

A lightweight, experimental framework by OpenAI for building multi-agent systems with minimal abstraction. Focuses on explicit agent handoffs and stateless design.

AgentEngineering Editorial2 min read
ShareY

Overview

Swarm is an open-source experimental framework released by OpenAI that provides minimal, ergonomic primitives for building multi-agent systems. It is intentionally lightweight — no state persistence, no complex graph abstractions — designed for teams who want explicit control without a heavy framework dependency.

Core Concepts

  • Agents — defined by a system prompt, a model, and a list of available functions (tools).
  • Handoffs — an agent can transfer control to another agent by returning a reference to it. The receiving agent takes over with full context.
  • Context variables — a dictionary of shared state passed between agents across handoffs.

When to Use Swarm

Swarm is best for:

  • Simple multi-agent pipelines with a small number of well-defined agent roles.
  • Prototyping and learning — the minimal API makes it easy to understand what is happening.
  • Teams who want to understand agent coordination at the primitive level before adopting a heavier framework.

It is not suitable for production systems requiring persistence, complex branching, or observability tooling.

Key Limitation

Swarm is stateless by design. Each .run() call is independent. Long-running workflows that need to resume across sessions require building your own state persistence layer on top.

Resources

  • GitHub: openai/swarm
  • Experimental status: not intended for production use without modification.
ShareY

Cite this article

@article{agentengineering2025,
  title   = {OpenAI Swarm},
  author  = {AgentEngineering Editorial},
  journal = {AgentEngineering},
  year    = {2025},
  url     = {https://agentengineering.io/topics/tools/openai-swarm}
}

More in Tools & Resources