Content
summary Summary

OpenAI has released a new open-source framework called "Swarm" on GitHub. The company describes it as an experimental tool for creating, orchestrating, and deploying multi-agent systems.

Ad

Swarm aims to make agent coordination and execution lightweight, highly controllable, and easily testable, according to OpenAI. It achieves this through two key concepts: routines and handovers.

A routine consists of instructions and tools. It can decide to hand over a conversation to another agent at any time. OpenAI says these basic building blocks can express complex dynamics between tools and agent networks.

The framework also demonstrates OpenAI's concept of "Agentic AI" - an abstraction that includes a language model, specific instructions (system prompts), and tools. These agents can interact, pass tasks to other agents, and use available tools.

Ad
Ad
Flowchart: Several AI assistants process weather requests, triage forwards to weather specialists.
This illustration shows an example of two AI assistants working together to answer a weather question. A triage assistant passes the query to a specialized weather assistant, which retrieves the exact information and provides a precise answer. | Image: OpenAI

OpenAI claims that Swarm allows developers to test scalable solutions to real-world problems without a steep learning curve. The framework runs mostly on the client side and doesn't store state between calls, similar to the Chat Completions API. The company stresses that Swarm is currently an experimental example framework to explore multi-agent system interfaces. It's not meant for production use and receives no official support.

Core concepts: Handoffs and routines

Swarm's main goal is to showcase handoffs and routines described in an OpenAI Cookbook. Handoffs let an agent transfer conversation control to another agent, like a phone transfer.

Routines are natural language sequences of steps defined with the tools necessary to execute them. They can be thought of as state machines that language models can handle robustly.

OpenAI argues this approach suits managing many independent capabilities and instructions that are hard to code in a single prompt.

Swarm offers a lightweight, scalable, and customizable alternative to the Assistants API. While Assistants provides fully hosted threads and integrated memory and call management, Swarm targets developers wanting full transparency and fine-grained control over context, steps, and tool calls.

Recommendation

Examples and documentation

OpenAI has published several examples of Swarm use cases on GitHub. These include a simple triage agent, a weather agent, and more complex setups like airline customer service and a personal shopping assistant.

The Swarm Cookbook explains core concepts and framework usage. This covers running Swarm, defining agents and functions, and handling streaming and evaluations.

OpenAI sees multi-agent systems as a path to improved AI reasoning capabilities, in line with the third tier of its five-tier scale for measuring progress toward AGI. The company is building a multi-agent research team working on two types of AI agents: one for automating complex tasks on devices, and another for web-based tasks such as data collection and flight booking.

Ad
Ad
Join our community
Join the DECODER community on Discord, Reddit or Twitter - we can't wait to meet you.
Support our independent, free-access reporting. Any contribution helps and secures our future. Support now:
Bank transfer
Summary
  • OpenAI has released "Swarm", an experimental open-source framework for creating, orchestrating, and deploying multi-agent systems, on GitHub. It is designed to make the coordination and execution of agents lightweight, controllable, and easy to test.
  • The framework is built around two basic abstractions: Routines, which contain instructions and tools, and Handoffs, which allow agents to pass conversations to other agents.
  • Swarm is currently an experimental example framework, not intended for production use. It is meant to demonstrate the patterns of handoffs and routines. OpenAI provides examples and detailed documentation on GitHub.
Sources
Online journalist Matthias is the co-founder and publisher of THE DECODER. He believes that artificial intelligence will fundamentally change the relationship between humans and computers.
Join our community
Join the DECODER community on Discord, Reddit or Twitter - we can't wait to meet you.