Swarms Multi-Agent Framework
Build and deploy coordinated agent systems with sequential, concurrent, graph-based, and hierarchical workflows.
- Source repo
- kyegomez/swarms
- Stars
- ★ 7.4k
- Last updated
- today
- License
- Apache-2.0
- Primary language
- Python
- FA score
- Insufficient evidence
At a glance
- How it runs
- Works with
- Universal · cross-platformClaude Code · OpenAI API · Claude API
- Cost
- Free software; you pay for model usage
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A content or engineering team can use
SequentialWorkfloworGraphWorkflowwhen research, drafting, review, and publication have explicit dependencies. - Not a fit if
- Teams that need a turnkey hosted business app
- Teams needing fixed cost and latency guarantees
- Source review
- Insufficient evidence 8 safety controls not found
What does this agent do, and when should you use it?
Swarms is a Python multi-agent orchestration framework whose core primitive is an Agent composed of an LLM, tools, and memory. It includes prebuilt execution architectures such as SequentialWorkflow, ConcurrentWorkflow, GraphWorkflow, AgentRearrange, MixtureOfAgents, GroupChat, HierarchicalSwarm, and HeavySwarm, with SwarmRouter providing a common entry point. Tasks can move through a linear pipeline, execute in parallel, follow a directed acyclic graph, or be planned and delegated by a director agent; outputs may be one synthesized result or separate results keyed by agent. Model credentials are configured through environment variables, with the source showing OpenAI, Anthropic, and Groq settings. Agents can consume tools exposed by MCP servers, while MCPDeployer can expose an agent, swarm, workflow, or function as an authenticated MCP tool. It is a fit for Python teams that need explicit control over agent topology and execution, rather than users looking for a finished hosted application.
A developer constructs one or more Agent instances, selects each model_name, prompt, tools, memory, and loop policy, and then passes the agents to an orchestration component. SequentialWorkflow feeds each agent's output into the next; ConcurrentWorkflow runs agents in parallel; GraphWorkflow models a DAG with Node and Edge, running a node only after its upstream dependencies finish; and AgentRearrange expresses routing through strings such as researcher -> writer, editor. MixtureOfAgents sends work to experts in parallel and asks an aggregator agent to synthesize their responses, while GroupChat uses forced respond(score, message) calls to decide which agents should speak. HierarchicalSwarm assigns planning and evaluation to a director, AutoSwarmBuilder generates specialized agents and a workflow from a task description, and SwarmRouter switches among strategies through swarm_type. Setting mcp_url or mcp_urls lets an agent discover and invoke tools from one or more MCP servers. In the opposite direction, MCPDeployer turns targets into MCP tools protected by static API keys, a custom authentication callable, or a scoped TokenVerifier.
- A content or engineering team can use
SequentialWorkfloworGraphWorkflowwhen research, drafting, review, and publication have explicit dependencies. - An analysis team can run market, financial, and risk specialists on the same question concurrently with
ConcurrentWorkflowand retain separate results. - A research group that needs one recommendation from several expert perspectives can use
MixtureOfAgentswith a dedicated aggregator. - A project team that needs central planning, specialist delegation, and feedback loops can organize its agents with
HierarchicalSwarm. - A prototyping team can use
AutoSwarmBuilderto generate specialized roles and workflow configurations from a detailed task description. - An integration team can connect agents to external MCP tools through
mcp_url, or publish existing agents to MCP hosts withMCPDeployer.
How do you install or deploy this agent?
A Python environment is required. The supplied material does not state a minimum Python version. Install with pip, uv, or Poetry.
Using pip:
pip3 install -U swarmsUsing the recommended uv installer:
uv pip install swarmsUsing Poetry:
poetry add swarmsTo install from source:
git clone https://github.com/kyegomez/swarms.git
cd swarms
pip install -r requirements.txtConfigure credentials for the model provider you intend to use; unused provider keys need not be populated. The documented environment entries are:
OPENAI_API_KEY=""
WORKSPACE_DIR="agent_workspace"
ANTHROPIC_API_KEY=""
GROQ_API_KEY=""How do you use this agent?
This minimal invocation constructs and runs one agent. Set OPENAI_API_KEY to a valid value before using the shown gpt-5.4 model; the call requires network access to the corresponding model service.
from swarms import Agent
agent = Agent(
model_name="gpt-5.4",
max_loops="auto",
interactive=True,
temperature=None,
)
agent.run("What are the key benefits of using a multi-agent system?")For a two-stage pipeline, pass the researcher's output to a writer with SequentialWorkflow:
from swarms import Agent, SequentialWorkflow
researcher = Agent(
agent_name="Researcher",
system_prompt="Research the provided topic and provide a detailed summary.",
model_name="gpt-5.4",
)
writer = Agent(
agent_name="Writer",
system_prompt="Turn the research summary into an engaging blog post.",
model_name="gpt-5.4",
)
workflow = SequentialWorkflow(agents=[researcher, writer])
result = workflow.run("The history and future of artificial intelligence")
print(result)Use max_loops="auto" when the number of steps cannot be known in advance. For bounded, latency-sensitive, or cost-sensitive production tasks, use a fixed loop count.
What are this agent's strengths and limitations?
- The library includes orchestration models with materially different execution semantics: linear, concurrent, DAG-based, expert aggregation, group chat, and director-worker coordination.
SwarmRouteroffers a common interface across swarm strategies, whileAgentRearrangeprovides compact string-based routing for one-to-many and mixed flows.- MCP support works in both directions: agents can discover remote MCP tools, and
MCPDeployercan publish agents and workflows as authenticated MCP services. - The source documents multi-provider configuration and claims backward compatibility with LangChain, AutoGen, and CrewAI, giving existing agent projects an identified integration path.
GraphWorkflowsupplies topological ordering, automatic parallel execution of independent branches, and node-completion callbacks for dependency-heavy workflows.
- Adopters must operate Python code, prompts, provider credentials, and contracts between agent outputs; this is not a turnkey hosted business application.
- The supplied material does not identify the minimum Python version, a complete provider support matrix, or feature parity across providers, so target environments require validation.
- Most examples call remote model services, making cost, rate limits, context capacity, and availability dependent on the selected provider; no pricing or capacity guarantees are supplied.
max_loops="auto"makes iteration counts variable for open-ended tasks, so cost- and latency-sensitive systems need explicit loop limits and stopping policies.- Sophisticated topologies add concurrency, aggregation, recovery, and observability concerns. The material lists production and observability features but provides no auditable benchmarks, failure semantics, or service-level evidence.
How does this agent compare with similar options?
The project names LangChain, AutoGen, and CrewAI as frameworks with which it offers backward compatibility, so Swarms may serve as an orchestration layer or migration destination for existing agent systems. Its documented distinctions are the breadth of bundled swarm topologies, the unified SwarmRouter, and bidirectional MCP support. The supplied material does not provide performance comparisons, detailed API coverage, or evidence that migrations from those frameworks are complete.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Swarms Multi-Agent Framework This agent | Insufficient evidence | Library / SDKFree + model costs | ★ 7.4k | today | Python | Claude Code · OpenAI API · Claude API |
| AgentScope 2.0 | 70 · Some gaps | Library / SDKFree + model costs | ★ 35k | 2d ago | Python | OpenAI API · Claude API |
| AgenticX Multi-Agent Platform | 64 · Some gaps | CLIFree + model costs | ★ 977 | 1d ago | Python | Claude Code · OpenAI API · Claude API |
| npcpy Agent Framework | 43 · Major gaps | Library / SDKFree + model costs | ★ 1.5k | 4d ago | Python | Codex · Claude Code · OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
Evidence shows: The repository contains a SECURITY.md that claims security features such as environment variables, no telemetry, encryption, etc., but these are assertions without code or configuration support. No evidence of least privilege, user confirmation, data flow transparency, sensitive data handling, dependency security, external effects control, rollback mechanisms, or source attribution. Therefore all criteria scored 0.
Evidence shows: README and pyproject.toml provide version information, but no evidence of self-consistency checks, dependency availability guarantees, or failure message handling. Therefore all criteria scored 0.
Evidence shows: README describes various multi-agent architectures and scenarios, but does not specify target audience, capability boundaries, trigger precision, or environment fit. Therefore all criteria scored 0.
Evidence shows: README provides installation instructions and examples, but no clear evidence of information architecture, naming stability, FAQ, known limitations, versioning changelog, or maintenance responsibility. License is Apache-2.0 but no copyright attribution provided. Therefore all criteria scored 0.
Evidence shows: README claims to be a production-grade framework, but no concrete evidence of output usability, marginal value, or cost-benefit. Therefore all criteria scored 0.
Evidence shows: Claims in README lack traceability, no cross-source corroboration, and no separation of facts and inferences. Therefore all criteria scored 0.
- Not found in source: least-privilege scopingGrant only what the task needs: a dedicated account or read-only token, scoped to specific directories and repos.
- Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- Not found in source: data-flow disclosureWatch which external services it contacts (proxy or firewall logs) and keep sensitive data out until you know where it goes.
- Not found in source: sensitive-data handlingUse dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
- Not found in source: dependency securityPin versions and run a dependency audit (npm audit, pip-audit) before installing; prefer running it in a container.
- Not found in source: disclosed external effectsEstablish which external systems it writes to, sends to or changes, and verify with test accounts or repos before production.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- Not found in source: verifiable attributionInstall from the official repo or registry and check the publisher and URL to avoid look-alike packages.
- Security claims in the repository (e.g., SECURITY.md) lack code or configuration support and should not be taken as actual security guarantees.
- Example code in README may not run directly as it depends on external API keys and unverified model names (e.g., gpt-5.4).
- Publisher identity is unverified; do not trust reliability or safety based on brand.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Swarms Version 2.5.0 Changelog Commits on Dec 1, 2023 Fix: execute_futures_dict Commit ID: 452bf7d Fix: execute_futures_dict Commit ID: 1c280b1 Cleanup Commit ID: 64ecedb AbstractLLM Commit ID: a0a0128 Update base_multimodal_model.py Commit ID: 061db36 Feature: Readme Commit ID: b726f04 Feature: Docs for AbstractLLM, Docs for BaseMultiModalModel Commit ID: a7a6d54 Feature: AutoScaler Prototype, Tests Commit ID: 3ae305e Feature: Agent prompt cleanup Commit ID: 84a8449 Commits on Nov 30, 2023 Cleanup Commit ID: 0555a2b AbstractLLM Commit ID: d8fb6f8 Update stable_diffusion.py …View on GitHub ↗
FAQ
Does Swarms require OpenAI models?
Is MCP mandatory?
Agent and workflow examples run without MCP. MCP is needed only when discovering external MCP tools or publishing targets through MCPDeployer.How can a team limit unpredictable cost or latency?
max_loops value for bounded or cost-sensitive work instead of max_loops="auto". Actual inference prices and rate limits depend on the chosen model provider and are not documented here.Can an MCP-deployed agent be exposed anonymously?
allow_anonymous=True is passed. Supported authentication options include static API keys, a custom callable, and a scoped TokenVerifier.