LangGraph or CrewAI: a state graph versus a team of roles
Both frameworks are MIT-licensed, both assemble agents from a model, tools and memory, and both survive production. The difference is the mental model: LangGraph asks you to describe the process as a graph with explicit state, CrewAI as a team of agents with roles and tasks. That decides what is easy in week one and what hurts six months in. A breakdown as of 29 October 2026, plus the third option people ask about less: plain code with no framework.
8 min read
Two mental models
LangGraph describes an agent as a directed graph: nodes do the work, edges define transitions, state flows between nodes and is saved at checkpoints. You write the process explicitly, including loops, branches and the points where execution should pause and ask a human. It is a low-level tool: it hides no prompts and makes no decisions for you about error handling.
CrewAI describes an agent as a team. Each agent has a role, a goal and a backstory, tasks are assigned to agents, and the crew runs them sequentially or hierarchically, where a manager agent plans and delegates. For scenarios where the process is not yet formalised that yields a working prototype in hours. For precise control of step order CrewAI offers Flows: event-driven workflows with state and branching.
Both approaches can build the same system. The question is how much code of which kind you write and where the hidden decisions end up: in your graph or inside the framework.
What we verified on 29 October 2026
So that the comparison does not become a retelling of other people's reviews, here are facts from the primary pages.
- LangGraph: MIT licence, stable 1.0 shipped in October 2025 with no breaking changes. The 1.0 announcement lists durable execution, built-in persistence and first-class human-in-the-loop patterns. Python and JavaScript. Hosting and observability through LangSmith is a separate commercial product.
- CrewAI: MIT licence, Python 3.10 to 3.13. The repository page lists Crews and Flows, sequential and hierarchical processes, and MCP and A2A support for tool access and delegation to remote agents. A commercial deployment platform exists.
- What we did not find on primary pages: comparable performance figures. Every “40% faster to prototype” number in third-party reviews traces back to vendor material and is not used in this article.
Comparison on the criteria that decide in production
The criteria below come from what breaks in agents after launch: state, retries, permissions, cost, reproducibility. They matter more than first-week convenience.
| Criterion | LangGraph | CrewAI |
|---|---|---|
| Control flow | Explicit graph: every transition is visible in code | Crew process or a Flow; inside a Crew the model partly decides the order |
| State and resumption | Checkpoints are built in: pause, resume after a restart, multi-day approvals | State exists in Flows; long pauses and resumption need your own plumbing |
| Human-in-the-loop | First-class API: pause, show, edit, continue | Through task settings and Flows; less granular |
| Multiple agents | Subgraphs and routing; you write the code | The framework's main scenario: roles, delegation, A2A |
| Learning curve | Higher: you design the graph and the state | Lower: roles and tasks read without preparation |
| Observability | Most detailed in LangSmith; OpenTelemetry via third-party tools | Built-in telemetry plus integrations with Langfuse and similar tools |
Where CrewAI's convenience runs out
A team of roles describes research-style tasks well: gather information, draft, review, format. There it is acceptable for the model to decide who gets the work next. Problems start when the process has a cost of error.
- Deterministic steps. “Check permissions, then debit, then notify” is not delegation but an order that must not be violated. In a Crew that moves into a Flow, and at that point you are already writing a graph, just with different syntax.
- Idempotency and retries. The manager agent repeated a task after a timeout and the request was filed twice. Retry protection has to live in the process state, and in the team model that state is smeared across agents.
- Cost. Every agent in the team reasons separately, and delegation adds model calls. Irrelevant for a prototype, the main line of the bill at ten thousand tasks a day. A per-task step limit is harder to enforce in the team model than in a graph.
What LangGraph's control costs
Control is not free. The graph has to be designed before the first node is written: what state, which transitions, where the checkpoints are. For a team without prior experience that is a week to the first working agent instead of a day, and the first version of the graph usually gets rewritten.
The checkpoint store is a database holding user state, including the content of their requests. It has to be secured and maintained like any database: access rights, encryption, retention, library updates. That is a part of operations demos never show.
Out-of-the-box observability means LangSmith. If traces cannot go to a third-party cloud, wire a self-hosted tool through OpenTelemetry and budget for it.
The third option: no framework
One agent with three to five tools and no long pauses is a “call the model, run the tool, repeat” loop in a couple of hundred lines. Such code has no dependencies that break on upgrade, no foreign prompts inside and no abstractions to explain to a new engineer.
A framework pays off in three cases: the process must survive restarts and wait for a human for days, there are several agents handing work to each other, or the team already knows the tool and does not want to reinvent state persistence. If none of the three applies, start with code and move to LangGraph when the first multi-day pause appears.
How to choose with three questions
The decision usually fits into three questions, and they can be answered before any code is written.
- Are there steps whose order cannot be trusted to the model? If yes, it is a graph: LangGraph or your own code. CrewAI fits only through Flows.
- Must the process wait for a human longer than one request? If yes, you need checkpoints, which is LangGraph's strength.
- Is the task research-like, with several roles and a tolerable cost of error? If yes, CrewAI delivers a working result fastest, and you may never need to rewrite it.