LangGraph vs CrewAI vs AutoGen: which to pick for a first agent project
For agent builders4 min read
LangGraph vs CrewAI vs AutoGen is a choice between three different ideas. LangGraph is a graph runtime, CrewAI organizes agents into crews and flows, and AutoGen is a layered framework for conversational and event driven agents. This comparison uses each project's own documentation. It does not rank them, because no source here tests them against each other.
What each docs page says
| Framework | How its docs describe it |
|---|---|
| LangGraph | A low level orchestration framework and runtime for long-running, stateful agents; mixes coded steps and model-driven steps in one graph |
| CrewAI | An open source framework for orchestrating autonomous agents; Crews are teams of agents, Flows manage state, events and branching |
| AutoGen | A framework for building AI agents and applications, in layers: Core, AgentChat, Extensions, plus a no-code Studio |
Source: LangGraph overview(opens in a new tab)
Source: CrewAI introduction(opens in a new tab)
Source: AutoGen documentation(opens in a new tab)
LangGraph: you draw the control flow
LangGraph's docs list durable execution so agents can resume after a failure, human-in-the-loop inspection and editing of state, short and long-term memory, and streaming. You define state, add nodes and connect them with edges. That means you decide the control flow, and the model decides within the nodes you give it.
pip install -U langgraphPick it when you want to see and control the exact path, for example a support flow that must always check an order before offering a refund.
CrewAI: you describe roles and tasks
In CrewAI's quick start, an agent is a role with a goal and tools, and a crew lists agents and tasks to run in a process. The page defines the agent in a configuration file. This is a shortened version, with the goal reworded.
{ "role": "{topic} Senior Data Researcher", "goal": "Find recent developments in {topic}", "tools": ["SerperDevTool"], "settings": { "verbose": true }}A Python helper then loads the crew and runs it with inputs.
from pathlib import Pathfrom crewai.project import load_crew def kickoff_content_crew(inputs: dict): crew, default_inputs = load_crew(Path(__file__).with_name("crew.jsonc")) return crew.kickoff(inputs={**default_inputs, **inputs})Source: CrewAI quickstart(opens in a new tab)
Pick it when the work reads naturally as a team: a researcher, then a writer, then a reviewer. The quick start also uses a project scaffold and a command line, so expect more structure from the start.
AutoGen: you start from a conversation
AutoGen's page describes Core as an event driven framework for scalable multi-agent systems and AgentChat as a framework for conversational single and multi-agent applications, built on Core. The install line and the first agent are short.
pip install -U "autogen-agentchat" "autogen-ext[openai]"The page also lists extensions for outside services, including one for MCP and one for running code in Docker. The page links a guide for people migrating from the 0.2 version, so tutorials from older posts may not match current code.
Build the same task three times
The fairest comparison is your own. Pick one small task, such as answering a customer question using two tools and a policy document. Write ten test cases with exact checks. Build the task in each framework, run every case five times, and record three numbers: how often it passed, what it cost per run, and how long it took. Also note how many lines of framework code you needed and how clear the error messages were when something broke.
Those last two notes rarely appear in comparisons and often decide the choice. A framework that gives you a slightly lower pass rate but a failure you can read in one minute may be the one your team can maintain.
LangGraph vs CrewAI vs AutoGen: how to choose for a first project
- Write the task as a flow chart on paper. If every step is known, use LangGraph or plain code.
- If it reads as roles passing work along, try CrewAI.
- If it is a conversation between a user and one or more assistants, start with AutoGen's AgentChat.
- Build the same small task in your top two, and measure the success rate, cost and time with your own eval.
- Keep the model calls and tools in plain functions, so the framework is a thin layer you can replace.
That last step is the one that saves you later. All three frameworks change, and a framework migration is much cheaper when your tools and prompts are not tangled into it.
A caution about comparisons
Anthropic's article on building agents advises starting with the simplest solution and adding complexity only when it measurably helps, since agents trade latency and cost for performance. A direct model call with one or two tools may be all your first project needs.
Source: Building effective agents(opens in a new tab)
Whichever you choose, write the checks first. A small set of tasks with exact graders will tell you more than any comparison article, including this one.