Agency Swarm v1.x is a complete rewrite built on the OpenAI Agents SDK, bringing significant improvements and new capabilities.

Installation

pip install "agency-swarm<1.0.0"
v0.x documentation remains available at the current site until v1.0 reaches general availability.

What’s New in v1.x

Latest AI Models

Full support for reasoning modelsWeb Search and Computer Use capabilities

Better Performance

Async-first architecture with direct conversation control

Enhanced Tools

Simple @function_tool decorator replaces complex BaseTool classes

Direct Control

No more black-box Assistants API - full control over threads and runs

Step-by-Step Migration

πŸ”§ Agency & Agent Updates

πŸ› οΈ Tool Migration

πŸ”’ Validation & Outputs

πŸ”„ Interaction Updates

Complete Migration Example

from agency_swarm import Agency, Agent, BaseTool
from pydantic import Field

class DataProcessor(BaseTool):
    """Processes data."""
    data: str = Field(..., description="Input data")

    def run(self):
        return f"Processed: {self.data}"

class Analyst(Agent):
    def __init__(self):
        super().__init__(
            name="Analyst",
            description="Analyzes data",
            tools=[DataProcessor],
            temperature=0.7
        )

    def response_validator(self, message):
        if "error" in message.lower():
            raise ValueError("Invalid response")
        return message

agency = Agency(
    agency_chart=[Analyst()],
    shared_instructions="Be helpful and accurate."
)

result = agency.get_completion("Analyze sample data")

Reference Tables

Getting Help