Skip to main content
The Swarms API is a hosted, model-agnostic multi-agent REST API. Unlike Python-only orchestration frameworks, you call it over HTTP from any language, deploy nothing locally, and pay only for what you run. It handles all agent scheduling, context passing, parallel execution, and retries on its side.
CapabilityLangGraphCrewAIAutoGenLangChainSwarms API
DeploymentSelf-hostedSelf-hostedSelf-hostedSelf-hostedFully hosted
LanguagePythonPythonPythonPython / JSAny (REST)
Multi-agentGraph DAGSequential / HierarchicalGroupChatChains / Agents10+ architectures
State managementExplicit state graphTask-basedConversation historyMemory modulesHandled by API
ParallelismAsync / compiled graphLimitedGroupChat turnsLimitedNative parallel execution
Model supportOpenAI, Anthropic, etc.OpenAI, Anthropic, etc.OpenAI, Anthropic, etc.100+ via LiteLLM300+ via unified endpoint
PricingInfra cost + model costInfra cost + model costInfra cost + model costInfra cost + model costPer-token + per-agent

Concept Mapping

The table below maps every major concept from each framework to its Swarms API equivalent.

Agents

FrameworkTheir ConceptSwarms API Equivalent
LangGraphnode (a callable or Runnable)agent object in agents array
CrewAIAgent(role, goal, backstory)agent with agent_name + system_prompt
AutoGenAssistantAgent / ConversableAgentagent with system_prompt
LangChainAgentExecutor / LLMChainSingle agent completion or SequentialWorkflow

Workflows & Orchestration

FrameworkTheir ConceptSwarms API Equivalent
LangGraphStateGraph with conditional edgesGraphWorkflow with edges, entry_points, end_points
CrewAICrew(process=Process.sequential)SequentialWorkflow
CrewAICrew(process=Process.hierarchical)HierarchicalSwarm
AutoGenGroupChat + GroupChatManagerGroupChat swarm type
LangChainSequentialChainSequentialWorkflow
LangChainParallel RunnableParallelConcurrentWorkflow

Tasks & Prompts

FrameworkTheir ConceptSwarms API Equivalent
LangGraphState dict passed between nodesAgent output is appended to context automatically
CrewAITask(description, agent, expected_output)Top-level task string; agent role defined in system_prompt
AutoGeninitiate_chat(message)Top-level task string
LangChainPromptTemplate + chain.invoke(input)system_prompt + task

Tools

FrameworkTheir ConceptSwarms API Equivalent
LangGraphToolNode / bind_toolstools array on agent (e.g. "browser", "code_interpreter")
CrewAI@tool decorated functionstools array on agent
AutoGenregister_functiontools array on agent
LangChainTool / BaseTooltools 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 buildingBest Swarms architecture
Linear pipeline (A → B → C)SequentialWorkflow
Parallel fan-out (all agents same task)ConcurrentWorkflow
Graph with mixed parallel + sequentialGraphWorkflow
Hierarchical with a manager agentHierarchicalSwarm
Route tasks to the right specialistMultiAgentRouter
Multiple experts debate and consensusMajorityVoting
Open-ended group discussionGroupChat
Compare N approaches to same problemMixtureOfAgents
Same tasks × multiple agents (grid)BatchedGridWorkflow

Universal Migration Checklist

Regardless of which framework you are migrating from, follow these steps:
  1. Get your API key at swarms.world/platform/api-keys
  2. Set the environment variable: export SWARMS_API_KEY="your-key"
  3. Install the HTTP client of your choice (requests, httpx, fetch, axios, etc.)
  4. Map each agent in your old workflow to an agent object with agent_name, system_prompt, and model_name
  5. Map the topology — sequential chain, parallel fan-out, or directed graph
  6. Replace task inputs — the top-level task field replaces all invoke(), kickoff(), and initiate_chat() calls
  7. 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:
import os
import requests

response = requests.post(
    "https://api.swarms.world/v1/<workflow-endpoint>/completions",
    headers={
        "x-api-key": os.environ["SWARMS_API_KEY"],
        "Content-Type": "application/json",
    },
    json={
        "name": "My Workflow",
        "description": "What this workflow does",
        "task": "The task to complete",
        "agents": [ ... ],   # your agents here
        # workflow-specific fields (edges, entry_points, etc.)
    },
    timeout=300,
)

result = response.json()
The base URL is https://api.swarms.world. See the API Reference for all available endpoints.