← Back to Leaderboard
Skyegomez

kyegomez/swarms

Python SDK for orchestrating LLM agents in chains, parallel groups, and DAGs

Engineering Health (Methodology)
A+ · 89/100
Maintenance Activity
● Updated today
Latest Release
6.8.1
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption23/25
Release Cadence11/20
License Clarity20/20
DockerMCPAPI
Total Stars
★ 7,418
24h Growth
+4
7d Growth
+20
Forks
1,086

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

kyegomez/swarms Star History (2023-06-26 - 2026-12-04) ALL-TIME STAR HISTORY (2023-06 – 2026-12) +7.4k in 1257d · avg +6/day 7.8k 3.9k 0 2023-06-26: ★ 12023-09-16: ★ 1832023-12-02: ★ 2662024-02-17: ★ 4472024-05-04: ★ 6422024-07-20: ★ 9042024-10-05: ★ 1,1422024-12-21: ★ 1,9502025-03-08: ★ 4,5162025-05-24: ★ 4,7262025-08-09: ★ 4,9622025-10-25: ★ 5,2182026-01-10: ★ 5,4722026-03-28: ★ 6,0502026-06-13: ★ 6,7752026-08-29: ★ 7,0632026-12-04: ★ 7,418 ★ 7.4k 2023-06 2025-03 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Swarms is an embeddable Python orchestration SDK. Agent.run() is the basic execution unit: an agent wraps a configured LLM with optional tools and memory, and workflow objects determine how tasks and outputs move between agents. SequentialWorkflow passes results down a chain, ConcurrentWorkflow gives independent agents the same task, and GraphWorkflow uses DAG edges to express dependencies and runs independent branches in parallel.

The build uses poetry-core. The requirements list includes LiteLLM for model integration, Pydantic, NetworkX, the MCP SDK, and the OpenTelemetry SDK with an OTLP HTTP exporter. MCP is a two-way integration boundary: an agent can consume tools from one or more servers, and MCPDeployer can expose a set of agents or swarms as separately callable tools behind API-key authentication.

Key Capabilities & Differentiators

AgentRearrange expresses mixed serial and parallel stages in a compact flow string. SwarmRouter provides one interface for changing execution strategies through swarm_type, including concurrent and hierarchical layouts. For tasks that call for several perspectives rather than a fixed handoff, MixtureOfAgents synthesizes parallel contributions, while GroupChat coordinates agents through conversation.

Model configuration is per agent; the example configurations include OpenAI and Anthropic models, and environment setup includes credentials for OpenAI, Anthropic, and Groq. The optional swarms[fast] extra adds RouteHub as a model gateway and makes GraphWorkflow(backend="rustworkx") available. These target different bottlenecks: model routing versus graph execution. SWARMS_LLM_BACKEND=litellm switches model calls back to LiteLLM.

Trade-offs & Limitations

Swarms earns its dependency when a team wants to reuse agent roles across several coordination patterns. For a fixed two-step process, direct model calls in Python can be easier to test and operate. If the application revolves around explicit state transitions rather than selecting a predefined team layout, evaluate a state-graph framework such as LangGraph instead. The integration surface is useful, but the application still owns the acceptance criteria for each workflow.

Sequential calls accumulate wait time; parallel fan-out can shorten the critical path but raises peak provider load and may increase spend. max_loops="auto" lets the agent decide when to stop without a fixed iteration cap; use fixed loops, deadlines, and concurrency limits where predictability matters. Before exposing MCP tools, scope their permissions and decide how to handle timeouts, partial results, and retries around side-effecting calls. Do not infer durable execution or high availability from the workflow classes or telemetry dependencies alone.

Hardware & Deployment Guide

Install via pip, uv, or Poetry, or run a Python script in swarmscorp/swarms with the script directory mounted at /app and model credentials injected at runtime. The published image uses Python 3.13 on linux/amd64 and linux/arm64. The multi-stage Dockerfile defaults to a Python 3.13 Alpine base and uses uv to install the package into /opt/venv. With hosted models, the container runs orchestration and tool calls, not model inference; self-hosting it does not make those upstream calls offline.

The listed GitHub release history calls out Graph Workflow in 5.3.7 and shows 6.8.1 dated December 27, 2024. The supplied pyproject.toml instead declares 18.0.0. Treat the source snapshot, release listing, and container image as distinct artifacts: pin the package or image you intend to deploy and smoke-test its imports, model calls, and MCP behavior rather than assuming the examples apply unchanged.

Execution graphs: GraphWorkflow models dependencies as a DAG and runs independent branches in parallel
Flow composition: AgentRearrange uses -> for sequencing and , for fan-out
Strategy selection: SwarmRouter changes the execution pattern through swarm_type
Bidirectional MCP: Agents consume tools via mcp_url or mcp_urls; MCPDeployer exposes agents or swarms as authenticated tools
Optional backends: swarms[fast] adds the RouteHub model gateway and an opt-in rustworkx graph backend
Container runtime: The published Python 3.13 image targets linux/amd64 and linux/arm64
Best For

Python teams building role-based analysis, review, or reporting pipelines that need to reuse agents across linear and parallel workflows, with MCP as a tool boundary.

Skip If

A single model call or short fixed chain is enough, or you need proven durable execution and recovery guarantees out of the box.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerMCPAPI
# pip
$ pip3 install -U swarms

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

# poetry
$ poetry add swarms

Comparison vs. Top Agents & Frameworks Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
swarms ★7.4k+20PythonApache-2.0Python SDK for orchestrating LLM agents in chains, parallel groups, and DAGs
langchain150.4k+299PythonMITModular Python framework for building agents across model providers
langgraph45.8k+293PythonMITPython graph orchestration for stateful, resumable agents and workflows
ruflo82.8k+312TypeScriptMITA TypeScript orchestration layer for coding agents, with shared memory and MCP

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/kyegomez/swarms.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

kyegomez/swarms Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about swarms

When should I use a sequence, a concurrent batch, or a DAG?

Use SequentialWorkflow when each stage consumes the previous stage’s output. Use ConcurrentWorkflow when independent agents should receive the same task. Use GraphWorkflow when stages have explicit dependencies, such as two independent analyses feeding a final synthesis step.

Do I need a GPU, and what determines runtime overhead?

Not for the external model API path. Size the Python process for concurrent requests, retained conversation state, and tool output; size network and provider quotas for peak model traffic. If you run models locally, CPU and VRAM requirements depend on the inference stack and model you choose, not on the Swarms image.

Can I use Swarms commercially and host it myself?

Swarms is Apache-2.0 licensed and can be embedded or self-hosted commercially. If you redistribute it, comply with the license’s distribution and notice requirements. Hosting the orchestrator yourself does not keep requests on premises if it calls hosted model APIs, an external gateway, or remote MCP tools; review those services’ terms and data handling separately.

How should I choose between Swarms, LangGraph, and plain Python?

Swarms is a good candidate when the same agent roles need to run in several predefined layouts, such as a sequence, a parallel batch, or a hierarchy. Consider LangGraph when you want to model execution primarily as application state and transitions. For a single fixed pipeline, compare both with plain Python and direct model calls before taking on a framework dependency.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining kyegomez/swarms? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature kyegomez/swarms on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare