Open-source Python framework that organizes AI agents into company-like hierarchies with strict communication channels. Built on the OpenAI Agents SDK. Free to use; you pay only for API calls to the LLM providers.
Build reliable AI agent teams that communicate through structured channels — like creating your own AI company with specialized roles and clear reporting lines.
Agency Swarm is the only multi-agent framework that forces you to design an organizational chart before your agents send a single message. Where CrewAI lets agents chat freely and LangGraph gives you a state machine, Agency Swarm makes you define who talks to whom and in what direction. That constraint is the entire point.
Most multi-agent failures happen when agents talk to everyone about everything. You end up with circular conversations, redundant work, and ballooning API costs. Agency Swarm prevents this by design. You define agencies with the > operator: CEO > Developer > Tester means the CEO can task the Developer, and the Developer can task the Tester, but the Tester can't bypass the chain to message the CEO.
This mirrors how companies work. Not every employee emails the CEO. Information flows through channels. When your AI agents follow the same structure, you get predictable behavior, lower token usage, and easier debugging.
Each agent gets a role, instructions, and tools. Tools use Pydantic models for type-safe argument validation. The @function_tool decorator lets you turn any Python function into an agent tool in two lines of code. Need to connect to an external API? The ToolFactory converts any OpenAPI schema into agent-ready tools.
A shared agency_manifesto.md file gives all agents organization-wide context. Think of it as the company handbook that every employee reads. Individual agents get their own instruction files that define their specific responsibilities.
Agency Swarm was built for OpenAI models, and it shows. GPT-5, GPT-4o, and the Agents SDK are first-class citizens. But v1.8.0 added LiteLLM router support, which means you can now route to Claude, Gemini, Grok, Azure OpenAI, or any provider through OpenRouter. The integration works, but OpenAI models still get the smoothest experience. If your stack is Claude-first, CrewAI or LangGraph may fit better.
The framework is free (MIT license). Your cost is 100% API calls. A three-agent agency running GPT-4o with moderate tool use costs $5-15 per complex task depending on conversation length. Multi-agent workflows multiply costs because each agent in the chain makes its own API calls. A five-agent workflow can burn 10x the tokens of a single-agent approach.
Compare to CrewAI Enterprise (paid platform with managed hosting) or running a single-agent approach with LangChain. The break-even point: Agency Swarm saves money when your tasks are complex enough that a single agent fails, but not so complex that token costs spiral.
To build an equivalent multi-agent system without Agency Swarm, you'd need: a framework like LangGraph (free but requires writing your own orchestration), a prompt management system, and custom inter-agent communication logic. Agency Swarm bundles this into a structured package. The trade-off is flexibility. LangGraph gives you total control at the cost of more code. Agency Swarm gives you guardrails at the cost of rigid topology.
On Reddit's r/AI_Agents, developers praise the structure: "does what most agentic apps need in an easy way." The key insight from users building production systems is that agent swarms excel when you need specialized focus. One developer described having "one agent whose only context is Rule #42" instead of loading every rule into a single massive context window.
The main complaint: cost. Multi-agent systems multiply API bills, and Agency Swarm doesn't hide that. Developers on r/ArtificialIntelligence flag cost as the primary barrier to adoption, not framework complexity.
Source: GitHub repository
Was this helpful?
Agency Swarm stands out from other multi-agent frameworks by enforcing organizational hierarchy in agent communication. Free and open-source with MIT license. Best for Python developers who want structured multi-agent workflows and are comfortable with OpenAI-centric tooling.
Agents communicate through explicitly defined channels rather than free-form messaging, reducing chaos and improving reliability.
Use Case:
Building a content agency where the editor can request changes from writers but writers cannot bypass the editor to publish directly.
Agents organized hierarchically (CEO, managers, specialists) mimicking real company structures for natural task delegation.
Use Case:
Creating a research agency with a CEO agent that receives requests, a research manager that plans, and specialist agents for web search and analysis.
Tools defined as Python classes with Pydantic validation for type safety, automatic schema generation, and clear interfaces.
Use Case:
Creating a CRM tool with validated input fields that ensures agents provide complete, correctly-typed data.
Built on top of Assistants API, providing built-in file search, code interpreter, and persistent threads without additional infrastructure.
Use Case:
Giving agents the ability to process uploaded documents and run data analysis code without setting up separate RAG or code execution services.
Gradio-based interface for testing agencies with real-time visibility into agent communications and delegation chains.
Use Case:
Debugging a multi-agent workflow by watching the CEO agent delegate tasks and reviewing each specialist's responses.
AI-powered tool generator that creates Python tool implementations from natural language descriptions.
Use Case:
Rapidly creating a custom API integration tool by describing what it should do rather than coding it from scratch.
Free
Custom pricing
Ready to get started with Agency Swarm?
View Pricing Options →Business process automation with multiple specialized agents and role delegation
Content creation workflows requiring structured review and approval chains
Complex research and analysis projects with hierarchical task breakdown
Internal tool automation across different business functions and departments
Production environments requiring reliable multi-agent coordination
Organizations needing structured agent communication without chaos
Development teams using Cursor IDE for AI-assisted coding workflows
Enterprise deployments requiring state persistence and session management
We believe in transparent reviews. Here's what Agency Swarm doesn't handle well:
Agency Swarm is built on OpenAI's Assistants API, so it primarily works with OpenAI models. Some community forks add support for other providers, but it's not officially supported.
Agency Swarm uses OpenAI's Assistants API with structured channels; CrewAI is model-agnostic with role-based design. Agency Swarm offers more control over communication flow; CrewAI is more flexible with model choice.
Yes, many teams use Agency Swarm in production. The structured communication model and Assistants API foundation provide reliability. Add monitoring and error handling for production deployments.
Tools are Python classes inheriting from BaseTool with Pydantic fields. The tool creation assistant can also generate tool code from natural language descriptions.
Weekly insights on the latest AI tools, features, and trends delivered to your inbox.
v1.8.0 released with PresentFiles tool and conversation starters with caching. v1.7.0 completed v1.x transition by removing deprecated v0.x APIs. Full migration to OpenAI Agents SDK with new @function_tool decorator.
People who use this tool also find these helpful
Open-source multi-agent framework forked from Microsoft AutoGen, using conversation-driven coordination to orchestrate AI agents for code generation, research, and collaborative problem-solving.
The next-generation AG2 platform with AgentOS runtime, framework interoperability, teachable agents, and enhanced planning for production multi-agent systems.
Research-first multi-agent framework with #1 GAIA benchmark performance, designed for studying agent societies and role-playing simulations at scale
Zero-code multi-agent orchestration platform from Tsinghua University for developing everything — from software to data visualization and deep research — using LLM-powered agent collaboration.
Open-source agent framework built on Llama models with local deployment options and community-driven development.
Multi-agent software company simulation platform.
See how Agency Swarm compares to CrewAI and other alternatives
View Full Comparison →AI Agent Builders
CrewAI is an open-source Python framework for orchestrating autonomous AI agents that collaborate as a team to accomplish complex tasks. You define agents with specific roles, goals, and tools, then organize them into crews with defined workflows. Agents can delegate work to each other, share context, and execute multi-step processes like market research, content creation, or data analysis. CrewAI supports sequential and parallel task execution, integrates with popular LLMs, and provides memory systems for agent learning. It's one of the most popular multi-agent frameworks with a large community and extensive documentation.
Agent Frameworks
Open-source multi-agent framework from Microsoft Research with asynchronous architecture, AutoGen Studio GUI, and OpenTelemetry observability. Now part of the unified Microsoft Agent Framework alongside Semantic Kernel.
Multi-Agent Builders
Educational framework from OpenAI for exploring lightweight multi-agent orchestration patterns using agent and handoff abstractions. Superseded by the OpenAI Agents SDK for production use.
Multi-Agent Builders
Multi-agent software company simulation platform.
No reviews yet. Be the first to share your experience!
Get started with Agency Swarm and see if it's the right fit for your needs.
Get Started →Take our 60-second quiz to get personalized tool recommendations
Find Your Perfect AI Stack →Explore 20 ready-to-deploy AI agent templates for sales, support, dev, research, and operations.
Browse Agent Templates →