Swarms: Multi-Agent Orchestration Framework
A Python agent framework to build, deploy, and scale multi-agent systems
Verified
Core facts
Read by a script from the official API, not rewritten by a model.
- Repository
- https://github.com/kyegomez/swarms
- License
- Apache-2.0
- Languages
- Python
- Maintainer
- kyegomez
- Homepage
- https://docs.swarms.world
- Verified
What it is
The project describes Swarms as an enterprise-grade, production-ready multi-agent orchestration framework. The project says Swarms Python is an agent framework for building, deploying, and scaling multi-agent systems. The project says Swarms features harnesses for sequential, concurrent, and hierarchical architectures, and integrations with MCP, x402, and skills. The project describes Swarms as an open-source, community-driven framework.
Main features
A SequentialWorkflow executes tasks in a strict order, forming a pipeline where each agent builds upon the work of the previous one.
A ConcurrentWorkflow runs multiple agents simultaneously, allowing for parallel execution of tasks.
AgentRearrange lets you define complex, non-linear relationships between agents using a simple string-based syntax.
GraphWorkflow orchestrates agents as nodes in a Directed Acyclic Graph.
The MixtureOfAgents architecture feeds tasks to multiple expert agents in parallel.
Getting started
An agent is the building block of a swarm: an autonomous entity powered by an LLM, tools, and memory.
A swarm consists of multiple agents working together.
In auto loop mode, the agent keeps reasoning and acting until it reaches a stopping condition, rather than halting after a fixed number of iterations.
# pip
$ pip3 install -U swarms
# uv (recommended): https://github.com/astral-sh/uv
$ uv pip install swarms
# poetry
$ poetry add swarms# Clone the repository
$ git clone https://github.com/kyegomez/swarms.git
$ cd swarms
$ pip install -r requirements.txt# 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/swarmsOPENAI_API_KEY=""
WORKSPACE_DIR="agent_workspace"
ANTHROPIC_API_KEY=""
GROQ_API_KEY=""
SWARMS_TELEMETRY_ONfrom 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?")from swarms import Agent, SequentialWorkflow
# Agent 1: The Researcher
researcher = Agent(
agent_name="Researcher",
system_prompt="Your job is to research the provided topic and provide a detailed summary.",
model_name="gpt-5.4",
)
# Agent 2: The Writer
writer = Agent(
agent_name="Writer",
system_prompt="Your job is to take the research summary and write a beautiful, engaging blog post about it.",
model_name="gpt-5.4",
)
# Create a sequential workflow where the researcher's output feeds into the writer's input
workflow = SequentialWorkflow(agents=[researcher, writer])
# Run the workflow on a task
final_post = workflow.run("The history and future of artificial intelligence")
print(final_post)
Who it is for
In GraphWorkflow, each node is an agent and each edge declares a dependency, so a node only runs after every upstream node has finished. AutoSwarmBuilder automatically generates specialized agents and their workflows based on a task description. GroupChat is an asynchronous, self-selecting groupchat.
GroupChat has no turn order: multiple agents can react to the same message at the same time, and silent agents stay silent. In HierarchicalSwarm, a director creates plans and distributes tasks to specialized worker agents; the director evaluates results and can issue new orders in feedback loops. HeavySwarm implements a 5-phase workflow inspired by X.AI's Grok heavy implementation.
An optional real-time dashboard in HeavySwarm shows the analysis as it runs. Social Algorithms provide a flexible framework for defining custom communication patterns between agents. Swarms has at least 60 multi-agent structures available.
X402 is a cryptocurrency payment protocol for API endpoints. X402 enables monetization of agents with pay-per-use models. Agent Skills is a lightweight, markdown-based format for defining modular, reusable agent capabilities introduced by Anthropic.
Two hosted MCP servers give an assistant live Swarms context instead of training data that may predate a rename. Swarms is licensed under the Apache License 2.0.
Sources
This page is written from the official sources below. Open them to check the original text.
- GitHub READMEhttps://github.com/kyegomez/swarmsFetched
Verified ·
This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.