#3030th of 33 in Agent frameworks and SDKs

swarm

Educational Python library for multi-agent handoffs on Chat Completions

Stars
22k
License
MIT
Last commit
Apr 2026
Language
Python

Missed the latest GitHub check; these facts may be older.

OpenAI is hiring: 804 open roles

Overview

Swarm is a small Python library built around two primitives: Agents (instructions plus Python functions) and handoffs, where a function returns another Agent to take over. client.run() loops over completions, tool calls, agent switches and context variable updates, and keeps no state between calls. The README marks it experimental and educational, and says the OpenAI Agents SDK has replaced it.

Who it is for: Developers learning multi-agent orchestration patterns in Python

Strengths

  • Two primitives, Agent and handoff, keep the whole run loop easy to read
  • Python functions become tool JSON schemas from type hints and docstrings
  • Stateless client.run() with streaming, max_turns and an execute_tools switch
  • Examples cover airline, support bot and triage agents, with eval samples

Weaknesses

  • Superseded by the OpenAI Agents SDK, which the README recommends for production
  • Built on the Chat Completions API; README mentions no other providers
  • No persistence or memory; caller must pass state back in each run
  • Installed from GitHub with pip; no release published

What it needs

  • no GPU
  • Needs OpenAI API, Python 3.10+
  • Models: OpenAI Chat Completions models (default gpt-4o)

Also in Agent frameworks and SDKs

See all 33
Also in Agent frameworks and SDKs
RankProjectScore
1ppt-masterAgent skill that turns documents into natively editable PowerPoint decks Live demo ↗ (opens in a new tab)62.1k starsMIT92 out of 100
2langchainPython framework for building LLM agents and apps from interoperable components147.8k starsMIT88 out of 100
3browser-usePython library that lets an LLM agent control a web browser Live demo ↗ (opens in a new tab)118k starsMIT88 out of 100
#4tradingagentsLangGraph multi-agent framework simulating a trading firm to analyze tickers Live demo ↗ (opens in a new tab)111.2k starsApache-2.087 out of 100
#5copilotkitSDK for adding agent chat, generative UI and shared state to apps38k starsMIT84 out of 100