Agency Swarm

A reliable multi-agent orchestration framework built on the OpenAI Agents SDK for creating and managing collaborative AI agent swarms.

Stars
★ 4.6k
Last updated
5d ago v1.11.0
FARS reviewed
Nov 08, 2026
License
MIT
Primary language
Python

At a glance

How it runs
FrameworkCLIWeb app
Works with
Portable with changesOpenAI API
Cost
Free software; you pay for model usage
Setup effort
Low · running in minutes
You'll need
Python 3.12+OpenAI API keyShell / CLINetwork accessLocal filesystem
Typical use
Build a multi-agent system with roles like CEO and Developer to handle software development tasks.
Not a fit if
  • Projects still on Python 3.11 or older
  • Teams wanting to avoid OpenAI ecosystem dependency
Website
agency-swarm.ai ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-27latest release v1.11.0 (2026-08-03)

What does this agent do, and when should you use it?

Agency Swarm is an open-source framework for building multi-agent applications. It extends the OpenAI Agents SDK to provide specialized features for creating, orchestrating, and managing collaborative swarms of AI agents. Inspired by real-world organizational structures, the framework allows users to define agents with roles such as CEO and Developer. Key features include customizable agent roles, full control over prompts and instructions, type-safe tools using Pydantic models, orchestrated agent communication through directional flows, flexible state persistence via callbacks, and a production-ready focus. Installation is via pip and requires Python 3.12+ and an OpenAI API key. The framework offers a Web UI, terminal UI, and programmatic interfaces.

Agency Swarm enables you to define agents with specific roles (e.g., CEO, Developer) and orchestrate their interactions via directional communication flows. It provides a @function_tool decorator and BaseTool class for defining type-safe tools, and supports converting OpenAPI schemas into tools via ToolFactory. Agents communicate using a send_message tool, with flows managed by the Agency object. It includes callbacks for saving and loading thread history for persistence, and offers copilot_demo(), tui(), and async get_response() methods for interaction. It is built on the OpenAI Agents SDK and uses the Responses API, with support for other model providers via LiteLLM.

  1. Build a multi-agent system with roles like CEO and Developer to handle software development tasks.
  2. Create a virtual assistant agent that handles client communication and delegates tasks to specialized agents.
  3. Automatically generate tools from OpenAPI schemas to integrate with public APIs seamlessly.
  4. Persist conversation state across sessions using save/load thread callbacks for long-running interactions.
  5. Prototype and test multi-agent workflows using the Web UI (copilot_demo) or terminal UI (tui).

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install -U agency-swarm
Environment variables
OPENAI_API_KEY
Config files
.env
Runtime
Python 3.12+

How do you install or deploy this agent?

Install via pip install -U agency-swarm. Requires Python 3.12+ and an OpenAI API key (set via environment variable OPENAI_API_KEY or a .env file).

How do you use this agent?

  1. Set OPENAI_API_KEY in a .env file. 2. Define tools using the @function_tool decorator or a BaseTool subclass. 3. Create Agent instances with name, description, instructions, tools, and model. 4. Create an Agency with a CEO as the entry point and define communication flows (e.g., ceo > dev). 5. Run via agency.copilot_demo(), agency.tui(), or async await agency.get_response("...").

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Seamless integration with the OpenAI Agents SDK and Responses API.
  • Type-safe tools via Pydantic field descriptions enhance reliability.
  • Explicit directional communication flows give clear control over agent interactions.
  • Support for session persistence via callbacks adds flexibility for long-running tasks.
Limitations
  • Primary model backend is OpenAI; other providers need extra configuration.
  • Requires Python 3.12+, which may restrict use on older systems.
  • Strong reliance on OpenAI, with adaptation needed for other providers.
  • Adds an abstraction layer over the native OpenAI SDK, increasing complexity.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Agency Swarm This agent 49 · Major gaps FrameworkFree + model costs ★ 4.6k 5d ago Python OpenAI API
AgenticX Multi-Agent Platform 55 · Major gaps CLIFree + model costs ★ 1.3k 1d ago Python Claude Code · OpenAI API · Claude API
DevAll 54 · Major gaps CLIFree + model costs ★ 35k 1mo ago Python —
aiXplain SDK 51 · Major gaps Library / SDKFreemium ★ 59 15d ago Python —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
49/ 100 5-point scale 2.5 / 5
Trust 12/29
Reliability 5/14
Adaptability 10/18
Convention 10/18
Effectiveness 7/13
Verifiability 5/8
Why each dimension lost points
Trust12 / 29 · 2.1/5

Communication flows are explicitly directional, and thread persistence callbacks make some data flows visible, supporting a score of 2 for transparency. Tools, file uploads, models, and external APIs can carry broad permissions, but the packet shows no general least-privilege controls or per-action user confirmation. The persistence example does not address sensitive data protection. Examples show external effects such as code interpretation, remote API access, and file upload without describing approval, rollback, or recovery, so those criteria receive 1. The dependency list and exact OpenAI Agents SDK pin provide limited dependency-management evidence, but no security audit or vulnerability response is shown. README attribution to the SDK, project, and license is clear; author and maintainer contact details provide some provenance, but publisher identity is unverified and is not inferred.

Reliability5 / 14 · 1.8/5

README describes an orchestration layer over the SDK, while AGENTS.md and CLAUDE.md state a clear SDK-first principle. The packet also contains inconsistent naming and version clues, including the CLI's default model versus the README example and the generator version in package.json versus the project version in pyproject.toml. Pinning the core SDK and specifying Python versions and operating systems provide limited dependency-availability evidence, but other dependencies have broad ranges and no lockfile evidence is included. The CLI reports template-generation exceptions and exits, but failure messages and recovery behavior for other paths are not well documented.

Adaptability10 / 18 · 2.8/5

The packet targets Python developers and shows scenarios for multiple agents, tools, communication flows, persistence, a web UI, terminal use, and asynchronous calls, earning 2 for audience and scenarios. Agent descriptions, communication flows, and custom tools provide configurable boundaries, but no comprehensive permission boundary or backend capability matrix is shown, so capability boundaries receive 1. README explains the framework's purpose and onboarding steps clearly. Python 3.12+, macOS/Linux/Windows, and several model backends are described, but deployment prerequisites and backend differences remain incomplete, supporting 2 for environment fit.

Convention10 / 18 · 2.8/5

README sections for overview, installation, getting started, folder structure, guides, and FAQ provide usable information architecture. Installation material covers virtual environments and pip, while initial configuration such as API key setup is distributed across other pages. Naming is mostly consistent around Agency, Agent, and communication_flows, but the packet has inconsistent version and model clues between package metadata, README, and CLI, so naming stability receives 1. Examples and FAQ cover tools, roles, persistence, and deployment. A limitation about third-party model function calling is stated, but general limitations and risk guidance are thin. MIT metadata and license text agree, earning full marks. The release skill requires change notes and migration documentation, but no release history or changelog is included, so the update path is only partly evidenced. AGENTS.md gives maintenance principles and upgrade/release procedures, with a contribution guide entry point; publisher identity remains unknown.

Effectiveness7 / 13 · 2.7/5

The examples show developers how to define tools and agents, set communication flows, and run the framework, giving outputs practical usability. Directional agent communication, persistence callbacks, and SDK integration provide orchestration value beyond a single-agent setup, but the packet does not quantify the value relative to the underlying SDK. Configuration and deployment involve API keys, external services, and multiple components; no cost, resource-use, or operational-burden estimate is provided, so cost-benefit receives 1.

Verifiability5 / 8 · 3.1/5

README claims have corresponding evidence in examples, pyproject.toml, and sampled source, such as the SDK dependency, CLI commands, and RealtimeAgent wrapper, supporting traceability at 2. README, installation documentation, FAQ, project metadata, and source corroborate some features. However, this is a sample packet and does not include enough implementation or runtime evidence to verify every claim, so cross-source corroboration receives 2. The text distinguishes some facts from recommendations, such as the recommended asynchronous call and the stated third-party model limitation. Claims such as production readiness lack evidence in the packet, so fact/inference separation receives 2.

Risks and how to mitigate them
  • Before connecting tools, files, models, or remote APIs, define authorization boundaries in the application and plan controls for sensitive data, external effects, and failure recovery; the packet does not show general confirmation or rollback mechanisms.
  • Version and model examples differ across README, CLI, and package metadata; verify the defaults and compatibility of the intended release before adoption.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 1bec92f0fc6e New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/agency-swarm.svg)](https://followagents.com/en/agents/agency-swarm)
<a href="https://followagents.com/en/agents/agency-swarm"><img src="https://followagents.com/badge/agency-swarm.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v2.0.0-beta.1 Pre-release
    Release notes excerpt
    This release moves Agency Swarm onto the newest versions of its core libraries: the OpenAI Python SDK 3, MCP 2 and FastMCP 4. Long conversations now cost less, because OpenAI compacts them and later turns send only what comes after the compaction. The default model is now GPT-6 Luna. 2.0.0b1 is a pre-release, so pip install --upgrade agency-swarm still installs 1.11. To try it: ```bash pip install --pre "agency-swarm==2.0.0b1" ``` Several changes need action when you upgrade. The [migration guide](https://agency-swarm.ai/migration/v2) lists each one with the code to change. …
    View on GitHub ↗
  2. v1.11.0
    Release notes excerpt
    This release adds realtime voice calls, per-user OAuth for MCP servers, and first-class system reminders. It also changes the default model, corrects usage-cost accounting, and fixes a token-isolation bug found by driving the OAuth flow end to end. Voice agents Run an existing agency as a realtime voice service. Use run_realtime(agency=...) for a dedicated server, add /{agency}/realtime to an existing app with run_fastapi(enable_realtime=True), or call Agency.to_realtime() to build your own. Ships with OpenAI and xAI support, a packaged browser client, and a Twilio phone bridge ( …
    View on GitHub ↗
  3. v1.10.5
    Release notes excerpt
    What's Changed * fix: keep runtime handoffs available across mid-run agent switches by @nicko-ai in https://github.com/VRSEN/agency-swarm/pull/727 Full Changelog: https://github.com/VRSEN/agency-swarm/compare/v1.10.4...v1.10.5
    View on GitHub ↗

FAQ

How does Agency Swarm differ from using the OpenAI Agents SDK directly?
Agency Swarm adds a higher-level abstraction with features like communication flows and callbacks, specifically tailored for multi-agent orchestration, while still building on the SDK.
Can I use this framework with models other than OpenAI?
Yes, through LiteLLM router, but it requires additional configuration; the documentation primarily lists OpenAI as the native backend.
Can conversation history be persisted?
Yes, by providing load_threads_callback and save_threads_callback to the Agency, you can save and load conversation threads across sessions.
Is this framework production-ready?
The framework is designed with a production-ready focus, but as with any software, testing and monitoring are essential for your specific use case.
Is there a migration guide for users of v0.x?
Yes, the official documentation provides a migration guide to help you adapt your project to the new version.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts