#193193rd of 242 in Agent frameworks and SDKs

swarm

Educational Python library for multi-agent handoffs on Chat Completions

Stars
22.2k
License
MIT
Last commit
Apr 2026
Language
Python
Stars, last 35 weeks+1,205
25 Mar 2026: 20,982 stars1 Apr 2026: 21,032 stars8 Apr 2026: 21,065 stars15 Apr 2026: 21,115 stars22 Apr 2026: 21,172 stars29 Apr 2026: 21,224 stars6 May 2026: 21,256 stars13 May 2026: 21,307 stars20 May 2026: 21,349 stars27 May 2026: 21,385 stars3 Jun 2026: 21,427 stars10 Jun 2026: 21,470 stars17 Jun 2026: 21,504 stars24 Jun 2026: 21,587 stars1 Jul 2026: 21,624 stars8 Jul 2026: 21,652 stars15 Jul 2026: 21,676 stars22 Jul 2026: 21,744 stars29 Jul 2026: 21,765 stars5 Aug 2026: 21,792 stars12 Aug 2026: 21,812 stars19 Aug 2026: 21,823 stars26 Aug 2026: 21,847 stars2 Sept 2026: 21,868 stars9 Sept 2026: 21,898 stars16 Sept 2026: 21,929 stars23 Sept 2026: 21,954 stars30 Sept 2026: 21,982 stars7 Oct 2026: 22,000 stars14 Oct 2026: 22,031 stars21 Oct 2026: 22,052 stars28 Oct 2026: 22,079 stars4 Nov 2026: 22,106 stars11 Nov 2026: 22,132 stars18 Nov 2026: 22,163 stars25 Nov 2026: 22,187 stars

20,982 on 25 Mar 202622,187 on 25 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

OpenAI is hiring: 877 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 242
Also in Agent frameworks and SDKs
RankProjectScore
#191cheshire-cat-ai/corePython agent framework with a web UI and REST API, built for learning3.1k starsGPL-3.043 out of 100
#192spacy-llmspaCy component that runs LLM prompts for NER, text classification and more1.4k starsMIT42 out of 100
#194browsergymGymnasium environments for web agents, with ten browser benchmarks1.5k starscustom license41 out of 100
#195metagptPython multi-agent framework that turns one-line requirements into a software repo Live demo ↗ (opens in a new tab)71.5k starsMIT40 out of 100
#196kalosmRust library for running local language, audio and image models2.2k starsApache-2.040 out of 100