# swarms

> swarms is an open-source agent framework for ai models and llm tooling. Python framework for orchestrating teams of LLM agents in sequential, parallel and graph. It is available on API, CLI, Self-hosted, Linux, macOS and Windows.

- **Kind:** Agent
- **Pricing:** Open source
- **Platforms:** API, CLI, Self-hosted, Linux, macOS, Windows
- **Website:** https://docs.swarms.world
- **Repository:** https://github.com/kyegomez/swarms
- **GitHub stars:** 7,415
- **License:** Apache-2.0
- **Categories:** [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm), [workflow automation](https://ai-powered.com/categories/workflow-automation), [multi-agent frameworks](https://ai-powered.com/categories/multi-agent-frameworks)
- **Listing updated:** 2026-12-01

## About

Swarms is a Python library for wiring several LLM-backed agents into one working system. Instead of writing the plumbing yourself, you pick a structure such as a sequential chain, a concurrent batch, a DAG, a group chat or a director-and-workers hierarchy, and the library handles how the agents pass results between each other.

An agent is built from a model name, a system prompt, optional tools and memory, and a loop setting that can either run a fixed number of iterations or let the agent decide when it has finished. Agents can also load tools from remote MCP servers, and an agent or swarm can be published as an MCP server behind an API key. A SwarmRouter provides one interface for switching between swarm strategies without rewriting the agents.

The project suits Python developers who need multi-agent pipelines for research, content, analysis or reporting work and want control over orchestration. It installs with pip, uv or poetry, and a Docker image is published for running scripts without a local setup.

## Features

- **Multiple orchestration patterns:** Choose sequential, concurrent, graph-based, group chat, hierarchical or mixture-of-agents structures for coordinating agents.
- **Autonomous looping agents:** Agents can run until they judge a task complete instead of stopping after a fixed number of iterations.
- **MCP client and server support:** Agents can consume tools from MCP servers, and MCPDeployer can expose an agent or swarm as an MCP server.
- **Unified swarm router:** SwarmRouter runs the same agents under different swarm strategies by changing one parameter.
- **Agent-to-agent protocol:** A2A server and client classes let agents built on the library call remote A2A agents and be called by them.
- **Docker and CLI packaging:** An official Docker image and a command-line interface make it straightforward to run scripts without a local Python setup.

## Good for

- Building a researcher-and-writer pipeline that turns a topic into a draft article
- Running several specialist analysis agents in parallel on the same question and merging their answers
- Routing a research task through a director agent that assigns work to specialist workers
- Exposing an internal agent as an MCP tool that other assistants can call with an API key
- Prototyping a multi-agent team quickly from a plain-language task description

## FAQ

### How do I install swarms?

Install with pip3 install -U swarms, uv pip install swarms, or poetry add swarms. A Docker image is also published on Docker Hub.

### Which models can agents use?

Agents are configured with a model name, and the library documents support for several providers including OpenAI, Anthropic and Groq via API keys in environment variables.

### Can I connect agents to external tools?

Yes. Setting mcp_url or mcp_urls lets an agent load tools from one or more MCP servers.

### What license is swarms under?

Swarms is licensed under the Apache License 2.0.

### Is swarms free?

Yes. swarms is open source, so you can use and self-host it for free.

### What are the best alternatives to swarms?

The closest alternatives to swarms are agency-swarm, swarmclaw, OpenProgram, mcp-agent and swarm.

## Where this comes from

- Description: written from the project's README and the project's website.

## Alternatives

- [agency-swarm](https://ai-powered.com/agents/agency-swarm): agency-swarm is an open-source agent framework for multi-agent frameworks.
- [swarmclaw](https://ai-powered.com/agents/swarmclaw): swarmclaw is an open-source agent for ai models and llm tooling.
- [OpenProgram](https://ai-powered.com/agents/openprogram): OpenProgram is an open-source agent framework for ai models and llm tooling.
- [mcp-agent](https://ai-powered.com/agents/mcp-agent): mcp-agent is an open-source agent framework for ai models and llm tooling.
- [swarm](https://ai-powered.com/agents/swarm-3): swarm is an open-source agent framework for multi-agent frameworks.
- [atomic-agents](https://ai-powered.com/agents/atomic-agents): atomic-agents is an open-source agent framework for ai models and llm tooling.
- [lagent](https://ai-powered.com/agents/lagent): lagent is an open-source agent framework for multi-agent frameworks.
- [ag2](https://ai-powered.com/agents/ag2): ag2 is an open-source agent framework for ai models and llm tooling.

---
Source: https://ai-powered.com/agents/swarms
