Agency Swarm

Active
GitHub Python MIT

Description

Agency Swarm is a reliable multi-agent orchestration framework built on OpenAI API, providing structured multi-agent collaboration and communication.

Key Features

  • Customizable agent roles with tailored instructions, tools, and capabilities
  • Orchestrated communication flows with directional `>` operator for explicit agent messaging
  • Type-safe tools via Pydantic models with automatic argument validation
  • Flexible state persistence with load/save thread callbacks for DB or file storage
  • Built on OpenAI Agents SDK with extended orchestration layer for multi-agent workflows
  • Web UI (copilot_demo) and terminal UI (tui) for immediate testing

Use Cases

💡 Building virtual agency teams (CEO, Developer, Assistant) for task automation
💡 Multi-agent document processing and review pipelines
💡 Customer-facing AI systems with structured agent handoffs
💡 Rapid prototyping of collaborative agent architectures

Quick Start

Install with `pip install -U agency-swarm`. Set `OPENAI_API_KEY` in your environment. Define agents using `Agent(name, instructions, tools)`, establish communication flows with `Agency(ceo, communication_flows=[ceo > dev, ceo > va])`, then run `agency.copilot_demo()` for web UI or `agency.tui()` for terminal. Python 3.12+ required.

Related Projects

Related Articles