Agency Swarm is an open-source Python framework for building collaborative agent teams ("agencies") on top of the OpenAI Agents SDK / Responses API, with role-based agents, Pydantic-typed tools, and production-focused deployment patterns.
Agency Swarm is an open-source Python framework for building collaborative agent teams ("agencies") on top of the OpenAI Agents SDK / Responses API, with role-based agents, Pydantic-typed tools, and production-focused deployment patterns.
Agency Swarm is designed by an AI agency owner (VRSEN) trying to fully automate his own agency's work. That heritage shows: the framework's default patterns look like real service delivery — a CEO agent that scopes the work, specialists that execute, and a virtual assistant that handles logistics. The v1.x line (post-migration from v0.x) is built on the OpenAI Agents SDK / Responses API. Tools are Python functions with Pydantic-typed arguments; the framework validates inputs before execution, retries with error context on validation failure, and surfaces guardrails-friendly outputs. Deployment ships via FastAPI integration or MCP tools server so an agency can be exposed as an HTTP service or an MCP-callable toolset.
Agency Swarm prioritizes control over convenience, forcing explicit communication flows to prevent token-burning chaos. Best for Python developers who need production reliability and can trade setup complexity for deterministic behavior.
Define specialized agents with distinct responsibilities, instructions, and tool sets — for example CEO, developer, or virtual assistant roles. Each agent operates on its own system prompt and toolbox, mirroring how real organizations divide labor. This structure scales cleanly from 2-agent prototypes to 20+ agent hierarchies without performance degradation.
Communication between agents is explicitly declared using a directional syntax (A > B means A can initiate conversation with B). This prevents the chaotic broadcast behavior common in AutoGen-style frameworks and helps reduce token usage versus broadcast-based models. Developers can model hierarchies, peer-to-peer chat, star topologies, or meshes with full determinism.
Tools are defined as Pydantic models, giving automatic input validation and schema generation compatible with the OpenAI Agents SDK FunctionTool format. This eliminates entire classes of runtime errors common in loosely-typed tool frameworks. OpenAPI schemas can also be auto-converted into tools, accelerating integration with existing services and APIs.
Natively supports OpenAI models (GPT-4o, GPT-5) and plugs into 50+ additional providers — Anthropic, Google Gemini, Grok, Azure OpenAI, and open-source endpoints — through LiteLLM. Teams can mix cheap models (GPT-4o-mini) for routine agents with frontier models for reasoning roles, optimizing cost without rewriting code.
Built-in observability tracks token usage, cost, and multi-agent workflow traces, with integration points for logging and monitoring backends. FastAPI integration and MCP Tools Server support turn agencies into deployable HTTP services with streaming, guardrails, and state persistence — suitable for production workloads requiring high availability.
$0
Ready to get started with Agency Swarm?
View Pricing Options →Agency Swarm works with these platforms and services:
We believe in transparent reviews. Here's what Agency Swarm doesn't handle well:
Agency Swarm v1.x (current release) introduces FastAPI integration, MCP Tools Server support, built-in guardrails, streaming responses, agent memory persistence across sessions, and expanded LiteLLM coverage to 50+ providers. The framework also added Azure OpenAI support, third-party agent compatibility, and improved observability. A documented migration guide from v0.x to v1.x is available in the official repository.
Pricing and features change often. If anything on this Agency Swarm page is wrong or missing, tell us and include a link to the source. We review every correction.