| Capability | LangGraph | CrewAI | AutoGen | LangChain | Swarms API |
|---|---|---|---|---|---|
| Deployment | Self-hosted | Self-hosted | Self-hosted | Self-hosted | Fully hosted |
| Language | Python | Python | Python | Python / JS | Any (REST) |
| Multi-agent | Graph DAG | Sequential / Hierarchical | GroupChat | Chains / Agents | 10+ architectures |
| State management | Explicit state graph | Task-based | Conversation history | Memory modules | Handled by API |
| Parallelism | Async / compiled graph | Limited | GroupChat turns | Limited | Native parallel execution |
| Model support | OpenAI, Anthropic, etc. | OpenAI, Anthropic, etc. | OpenAI, Anthropic, etc. | 100+ via LiteLLM | 300+ via unified endpoint |
| Pricing | Infra cost + model cost | Infra cost + model cost | Infra cost + model cost | Infra cost + model cost | Per-token + per-agent |
Concept Mapping
The table below maps every major concept from each framework to its Swarms API equivalent.Agents
| Framework | Their Concept | Swarms API Equivalent |
|---|---|---|
| LangGraph | node (a callable or Runnable) | agent object in agents array |
| CrewAI | Agent(role, goal, backstory) | agent with agent_name + system_prompt |
| AutoGen | AssistantAgent / ConversableAgent | agent with system_prompt |
| LangChain | AgentExecutor / LLMChain | Single agent completion or SequentialWorkflow |
Workflows & Orchestration
| Framework | Their Concept | Swarms API Equivalent |
|---|---|---|
| LangGraph | StateGraph with conditional edges | GraphWorkflow with edges, entry_points, end_points |
| CrewAI | Crew(process=Process.sequential) | SequentialWorkflow |
| CrewAI | Crew(process=Process.hierarchical) | HierarchicalSwarm |
| AutoGen | GroupChat + GroupChatManager | GroupChat swarm type |
| LangChain | SequentialChain | SequentialWorkflow |
| LangChain | Parallel RunnableParallel | ConcurrentWorkflow |
Tasks & Prompts
| Framework | Their Concept | Swarms API Equivalent |
|---|---|---|
| LangGraph | State dict passed between nodes | Agent output is appended to context automatically |
| CrewAI | Task(description, agent, expected_output) | Top-level task string; agent role defined in system_prompt |
| AutoGen | initiate_chat(message) | Top-level task string |
| LangChain | PromptTemplate + chain.invoke(input) | system_prompt + task |
Tools
| Framework | Their Concept | Swarms API Equivalent |
|---|---|---|
| LangGraph | ToolNode / bind_tools | tools array on agent (e.g. "browser", "code_interpreter") |
| CrewAI | @tool decorated functions | tools array on agent |
| AutoGen | register_function | tools array on agent |
| LangChain | Tool / BaseTool | tools array on agent |
Architecture Selection Guide
Once you know what you were building in your old framework, use this table to pick the right Swarms workflow:| What you were building | Best Swarms architecture |
|---|---|
| Linear pipeline (A → B → C) | SequentialWorkflow |
| Parallel fan-out (all agents same task) | ConcurrentWorkflow |
| Graph with mixed parallel + sequential | GraphWorkflow |
| Hierarchical with a manager agent | HierarchicalSwarm |
| Route tasks to the right specialist | MultiAgentRouter |
| Multiple experts debate and consensus | MajorityVoting |
| Open-ended group discussion | GroupChat |
| Compare N approaches to same problem | MixtureOfAgents |
| Same tasks × multiple agents (grid) | BatchedGridWorkflow |
Universal Migration Checklist
Regardless of which framework you are migrating from, follow these steps:- Get your API key at swarms.world/platform/api-keys
- Set the environment variable:
export SWARMS_API_KEY="your-key" - Install the HTTP client of your choice (
requests,httpx,fetch,axios, etc.) - Map each agent in your old workflow to an
agentobject withagent_name,system_prompt, andmodel_name - Map the topology — sequential chain, parallel fan-out, or directed graph
- Replace
taskinputs — the top-leveltaskfield replaces allinvoke(),kickoff(), andinitiate_chat()calls - Remove local infrastructure — no more Python environments, LLM SDK imports, or API key plumbing per-library
Migration Guides
Choose your current framework:Quick Start After Migration
Every Swarms API call follows the same pattern regardless of workflow type:https://api.swarms.world. See the API Reference for all available endpoints.