Skip to content

Swarms

The Enterprise-Grade Multi-Agent Orchestration Framework. Website: https://swarms.ai

Install

$docker run --rm -e OPENAI_API_KEY -v "$PWD:/app" swarmscorp/swarms python agent.py
Claude Code
claude mcp add swarms -- docker run --rm -e OPENAI_API_KEY -v "$PWD:/app" swarmscorp/swarms python agent.py
Cursor / Claude Desktop (mcp.json)
{
  "mcpServers": {
    "swarms": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-e",
        "OPENAI_API_KEY",
        "-v",
        "\"$PWD:/app\"",
        "swarmscorp/swarms",
        "python",
        "agent.py"
      ]
    }
  }
}

Install command taken from the project's README or registry entry. Always review code before running it.

Swarms Website   •   Documentation   •   Swarms Marketplace   •   中文

Overview

Swarms, The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework

Build, deploy, and scale high-performance multi-agent systems with Swarms Python, a fast, flexible, and optimized agent framework. Featuring production-ready harnesses for sequential, concurrent, and hierarchical architectures, seamless framework compatibility, and integrations with MCP, x402, and skills.

Install

# pip
$ pip3 install -U swarms

# uv (recommended): https://github.com/astral-sh/uv
$ uv pip install swarms

# poetry
$ poetry add swarms

From source

# Clone the repository
$ git clone https://github.com/kyegomez/swarms.git
$ cd swarms
$ pip install -r requirements.txt

Faster model calls and graphs with swarms[fast]

swarms[fast] adds two optional speedups:

  • RouteHub for faster model calls through a drop-in LLM gateway. No code changes needed. To switch back to litellm, set SWARMS_LLM_BACKEND=litellm.
  • rustworkx, a graph library written in Rust, for faster GraphWorkflow graphs. Turn it on with GraphWorkflow(backend="rustworkx").
$ pip3 install -U "swarms[fast]"

Using Docker

The official image, swarmscorp/swarms on Docker Hub, has swarms and its CLI installed on Python 3.13, for linux/amd64 and linux/arm64.

# Pull the image
$ docker pull swarmscorp/swarms:latest

# Run a script from the current directory, passing your API key from the shell
$ docker run --rm -e OPENAI_API_KEY -v "$PWD:/app" swarmscorp/swarms python agent.py

# Open a Python shell with swarms installed
$ docker run -it --rm -e OPENAI_API_KEY swarmscorp/swarms

To build the image yourself, run docker build -t swarms . from the repository root.


Environment Configuration

Learn more about the environment configuration here

OPENAI_API_KEY=""
WORKSPACE_DIR="agent_workspace"
ANTHROPIC_API_KEY=""
GROQ_API_KEY=""
SWARMS_TELEMETRY_ON

Your First Agent

An Agent is the fundamental building block of a swarm: an autonomous entity powered by an LLM + Tools + Memory. Learn more Here

from swarms import Agent

# Initialize a new agent
agent = Agent(
    model_name="gpt-5.4", # Specify the LLM
    max_loops="auto",              # Set the number of interactions
    interactive=True,         # Enable interactive mode for real-time feedback
    temperature=None,
)

# Run the agent with a task
agent.run("What are the key benefits of using a multi-agent system?")

Autonomous Agent with max_loops="auto"

Setting max_loops="auto" lets the agent decide for itself when the task is complete. It keeps reasoning and acting until it reaches a stopping condition, rather than halting after a fixed number of iterations. This is the recommended mode for open-ended, multi-step tasks where the number of steps isn't known in advance.

from swarms import Agent

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…

Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…