swarm  by openai

Multi-agent orchestration framework for lightweight agent coordination

Created 1 year ago
20,411 stars

Top 2.1% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides an educational framework for building lightweight, controllable, and testable multi-agent systems. It's designed for developers interested in exploring agent orchestration patterns, particularly when complex logic is difficult to encode in a single prompt.

How It Works

Swarm utilizes two core abstractions: Agents and handoffs. An Agent encapsulates instructions and tools (Python functions). Agents can dynamically hand off conversations to other Agents by returning them from function calls. The framework orchestrates these interactions using OpenAI's Chat Completions API, managing state between calls by passing conversational history and context variables. This client-side orchestration allows for flexible composition of agents into complex workflows.

Quick Start & Requirements

Highlighted Details

  • Lightweight, client-side orchestration for multi-agent systems.
  • Supports dynamic agent handoffs and context variable updates.
  • Automatically converts Python functions to JSON Schemas for tool use.
  • Enables streaming responses and provides event delimiters for agent switches.

Maintenance & Community

Managed by the OpenAI Solution team. Core contributors include Ilan Bigio, James Hills, Shyamal Anadkat, Charu Jaiswal, Colin Jarvis, and Katia Gil Guzman.

Licensing & Compatibility

The repository does not explicitly state a license in the README.

Limitations & Caveats

The project is marked as experimental and educational. OpenAI recommends migrating to the production-ready OpenAI Agents SDK for all production use cases, as Swarm is being replaced by this newer SDK.

Health Check
Last Commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
195 stars in the last 30 days

Explore Similar Projects

Starred by Andrew Ng Andrew Ng(Founder of DeepLearning.AI; Cofounder of Coursera; Professor at Stanford), Thomas Wolf Thomas Wolf(Cofounder of Hugging Face), and
4 more.

ag2 by ag2ai

0.9%
4k
AgentOS for building AI agents and facilitating multi-agent cooperation
Created 10 months ago
Updated 2 days ago
Feedback? Help us improve.