Newsletter, guides
LangGraph vs LlamaIndex vs CrewAI vs AutoGen in 2026
How to choose an AI agent framework in 2026. LangGraph, LlamaIndex, CrewAI and AutoGen (now Microsoft Agent Framework) compared, with a decision flow and code.
You are ready to build a real agent and you are comparing LangGraph, LlamaIndex, CrewAI and AutoGen. They all say “agents”, they all have a quickstart that works, and half the tutorials you find use APIs from 2024. One of the four has also stopped getting new features since then.
An AI agent framework is a library that runs the loop where a model calls tools, keeps state between steps, and hands control between steps or agents. The short answer for 2026: use LangGraph when you need explicit control over steps, branches and human approvals. Use LlamaIndex when the agent’s main job is answering from your documents. Use CrewAI when the work splits into roles that hand off to each other. AutoGen is in maintenance mode, and Microsoft points new projects to its successor, Microsoft Agent Framework.
Key takeaways
- Decide first whether you need fixed steps with branches (a workflow), one model looping over tools (an agent), or several agents with roles. That choice narrows the field.
- LangGraph is a low-level graph of nodes, edges and state, with checkpoints for durable runs and human review. LangGraph 1.0 shipped in October 2025.
- LlamaIndex is data-first: its agents and Workflows sit on top of strong ingestion and query engines, with
AgentWorkflowfor multi-agent handoffs. - CrewAI pairs Flows (stateful, event-driven steps) with Crews (role-based agent teams). Its docs recommend starting with a Flow.
- AutoGen is in maintenance mode. Microsoft Agent Framework, its successor, reached 1.0 in April 2026 for Python and .NET.
Do you need an agent, a workflow or a team?
Answer this before you compare frameworks. Three shapes cover most systems:
- Workflow: the steps are known. Read the email, check urgency, check the calendar, draft a reply. Code decides the order, and the model fills in each step.
- Single agent with tools: the steps are not known. One model decides which tool to call next, in a loop, until it is done.
- Multi-agent team: several agents with different instructions and tools hand work to each other, such as a researcher and a writer.
Most production systems are workflows with one or two agent steps inside. Microsoft’s own docs put it bluntly: “If you can write a function to handle the task, do that instead of using an AI agent.” For more on the distinction, see giving your LLM hands with tool calling.
How do the four frameworks compare in 2026?
| Framework | Core idea | Best at | Status, October 2026 |
|---|---|---|---|
| LangGraph | Graph of nodes, edges and shared state | Custom control flow, durable runs, human review | 1.x, stable since October 2025 |
| LlamaIndex | Data framework with agents and Workflows | Agents that answer from documents | Active, Workflows 1.0 since June 2025 |
| CrewAI | Flows for steps, Crews for role-based teams | Role hand-offs such as research then write | Active, 1.x |
| AutoGen | Agents that talk in a group chat | Research and existing AutoGen code | Maintenance mode |
| Microsoft Agent Framework | Agents plus graph workflows, successor to AutoGen and Semantic Kernel | .NET and Azure teams, AutoGen migrations | 1.0 since April 2026 |
All of them call the major model providers and support tools over MCP or their own tool interfaces. The difference is how much structure they give you and how much they hide.
When should you use LangGraph?
Use LangGraph when you need to see and control every step. You define state as a typed dictionary, write each step as a function, and connect steps with edges. Conditional edges are the if statements of your agent. Loops are edges that point back.
LangGraph 1.0 kept the graph primitives stable and made durable execution first class: a checkpointer saves state after every step, so a run can resume after a crash or pause for a human to approve. The prebuilt create_react_agent was deprecated in favor of LangChain’s create_agent, which runs on LangGraph underneath. Here is the email triage workflow as a runnable graph, with stub functions where model calls would go:
# filename: triage_graph.py
# description: Email triage as a LangGraph workflow with conditional edges.
from typing import Literal
from langgraph.graph import END, START, StateGraph
from typing_extensions import TypedDict
class Triage(TypedDict, total=False):
email: str
urgent: bool
free: bool
reply: str
def check_urgency(state: Triage) -> Triage:
# Replace with a small-model classification call.
return {'urgent': 'asap' in state['email'].lower()}
def check_calendar(state: Triage) -> Triage:
# Replace with a calendar API tool call.
return {'free': True}
def draft_yes(state: Triage) -> Triage:
return {'reply': 'Yes, I can make it.'}
def draft_no(state: Triage) -> Triage:
return {'reply': 'Sorry, I am busy then.'}
def draft_later(state: Triage) -> Triage:
return {'reply': 'Thanks, I will reply this week.'}
def after_urgency(state: Triage) -> Literal['check_calendar', 'draft_later']:
return 'check_calendar' if state['urgent'] else 'draft_later'
def after_calendar(state: Triage) -> Literal['draft_yes', 'draft_no']:
return 'draft_yes' if state['free'] else 'draft_no'
graph = StateGraph(Triage)
for name, fn in [
('check_urgency', check_urgency),
('check_calendar', check_calendar),
('draft_yes', draft_yes),
('draft_no', draft_no),
('draft_later', draft_later),
]:
graph.add_node(name, fn)
graph.add_edge(START, 'check_urgency')
graph.add_conditional_edges('check_urgency', after_urgency)
graph.add_conditional_edges('check_calendar', after_calendar)
for name in ('draft_yes', 'draft_no', 'draft_later'):
graph.add_edge(name, END)
app = graph.compile()
print(app.invoke({'email': 'Can we meet tomorrow? ASAP please.'})['reply'])
Each node can call a different model: a small one for the urgency check, a larger one for the drafts. Choosing the right LLM for each task covers how to pick them. The cost is that you write more code than with the higher-level frameworks. The payoff is that nothing is hidden. To keep state across conversations and restarts, read LangGraph persistence and thread models.
When should you use LlamaIndex?
Use LlamaIndex when the hard part is your data. It loads, chunks, embeds and indexes a folder in a few lines, and its query engines handle sub-questions and routing across indexes. Any query engine can become a tool for an agent. The index underneath can live in any major vector store, so pick that separately with choosing a vector database.
The agent side is built on Workflows, an event-driven step framework that shipped 1.0 in June 2025 as its own package. FunctionAgent gives you a tool-calling agent, and AgentWorkflow coordinates several agents that hand control to each other. If your agent mostly answers questions from documents, LlamaIndex gets you to a good baseline fastest. If RAG is only one tool among many, see choosing a RAG framework for how LlamaIndex compares with LangChain and Haystack.
When should you use CrewAI?
Use CrewAI when the work naturally splits into roles. You describe each agent with a role, a goal and tools, and each task with a description and the agent that owns it. A Crew runs the tasks, sequentially or with a manager agent that delegates.
CrewAI now has two layers. Flows hold state and run steps on events, with branches and loops. Crews are the agent teams a Flow calls when a step needs open-ended work. CrewAI’s docs recommend starting any production app with a Flow and adding a Crew inside a step, which keeps the predictable parts in code. Its repository describes it as a standalone Python framework with its own primitives, so it does not pull in LangChain.
What happened to AutoGen?
AutoGen moved to maintenance mode. Its repository says contributions are limited to bug fixes, security patches and documentation, and that “new users should start with Microsoft Agent Framework”. Existing AutoGen code keeps running, and Microsoft publishes a migration guide.
Microsoft Agent Framework is the successor to both AutoGen and Semantic Kernel, built by the same teams. It reached 1.0 on 3 April 2026 for Python and .NET, with Go in preview. It combines AutoGen’s agent abstractions with Semantic Kernel’s session state, middleware and telemetry, and adds graph-based workflows for explicit multi-agent orchestration. Choose it if your team is on .NET or Azure AI Foundry, or if you are migrating AutoGen code.
AutoGen’s original creators also continue a community fork called AG2. If you depend on the AutoGen group chat style, check that project before you pick a migration path.
Can you combine agent frameworks?
Yes, and it is often the right call. Use one framework as the orchestrator and wrap others as tools. A common shape is a LangGraph graph that owns state, branches and human approval, with a LlamaIndex query engine as its document tool and a CrewAI crew as one step that researches and drafts.
Keep the boundary narrow: each wrapped framework is one function with a string in and a string out. That keeps dependency upgrades contained, and you can replace one part without touching the rest. The build a team of AI agents lab builds a multi-agent system this way.
How should you choose your agent framework?
Answer the questions in order. The first “yes” is your starting point.
A support bot over 500 internal documents: LlamaIndex, with a query engine as the agent’s main tool.
An email assistant with urgency checks, calendar lookups and approval before sending: LangGraph, with a checkpointer and an interrupt before the send step.
A content pipeline where one agent researches and another writes: CrewAI, a Flow with a two-agent Crew in one step.
An enterprise team on .NET or migrating AutoGen code: Microsoft Agent Framework.
One model and three tools: no framework yet. A plain loop over your provider’s tool-calling API is a few dozen lines. Add a framework when you need persistence, branching or multiple agents.
What to do next
- Draw your system as steps. Mark which steps are fixed and which need a model to decide.
- Pick the framework from the decision flow above, or none if one tool loop is enough.
- Build the smallest version against five real inputs and trace every model call.
- Add persistence and human approval before anything that sends, pays or deletes.
- Pin framework versions and check tutorial dates. LangGraph 1.0 and the AutoGen change make many 2024 examples stale.
Frequently asked questions
Should I use LangGraph or LlamaIndex for my AI agent?
Use LlamaIndex when the agent mainly answers questions from your documents, because its ingestion and query engines do most of the work. Use LangGraph when the hard part is control flow: branches, loops, retries and human approval. They also combine well. Wrap a LlamaIndex query engine as a tool and call it from a LangGraph node.
Is AutoGen still maintained?
AutoGen is in maintenance mode. Microsoft limits changes to bug fixes, security patches and documentation, and tells new users to start with Microsoft Agent Framework, which reached 1.0 in April 2026. Existing AutoGen code still runs, and Microsoft publishes a migration guide. A community fork called AG2, led by AutoGen’s original creators, continues separately.
What is the difference between CrewAI and LangGraph?
CrewAI gives you role-based agents and tasks, plus Flows for stateful steps, so you describe who does what and CrewAI coordinates them. LangGraph gives you a lower-level graph where you write every node and edge yourself. CrewAI gets a multi-agent pipeline running faster. LangGraph gives more control over state, branching and resuming long runs.
When should I build a multi-agent system instead of a single agent?
Build multiple agents when the work splits into roles that need different instructions, tools or models, such as a researcher and a writer. Keep one agent when a single model with a few tools can do the job, because each extra agent adds model calls, latency and new ways to fail. Start with one agent and split only when traces show it struggling with mixed responsibilities.
Do I need an agent framework at all?
Not for simple cases. One model with a handful of tools runs fine on a plain loop over the provider’s tool-calling API. Frameworks earn their place when you need persistence across restarts, human approval steps, branching workflows, multiple agents or built-in tracing. Start without one, and adopt a framework when you find yourself rebuilding those parts.
Sources
- LangGraph v1 release notes, LangChain, October 2025: stable graph primitives, durable execution and the
create_react_agentdeprecation. - LangGraph quickstart, LangChain, October 2026:
StateGraph,START,ENDand conditional edges. - Announcing Workflows 1.0, LlamaIndex, June 2025: Workflows as a standalone package.
- Multi-agent patterns, LlamaIndex, October 2026:
AgentWorkflow, orchestrator agents and custom planners. - CrewAI introduction, CrewAI, October 2026: Flows, Crews and the recommendation to start with a Flow.
- CrewAI repository, CrewAI, October 2026: a standalone Python framework with its own primitives.
- AutoGen repository, Microsoft, October 2026: maintenance mode and the pointer to Microsoft Agent Framework.
- Microsoft Agent Framework version 1.0, Microsoft, April 2026: 1.0 for Python and .NET.
- Microsoft Agent Framework overview, Microsoft, July 2026: agents vs workflows and the merger of AutoGen and Semantic Kernel.
Build what you just read, with Param, live
You read the guide
- Free Live LabBuild a Second Brain with Claude CodeA second brain over your notes, docs and Linear that answers with sources and serves the same memory to any agent over MCP.Free seat
- ProWatch the video coursesDesign a Software Factory for Your Coding Agents, Build Your First Software Factory Execution Harness and each new course as the sessions are cut. The first lesson of each is free after you sign in.$149 a year
- WorkshopAI Agents in Production for EngineersA multi-agent system deployed with an identity per agent, permissions, guardrails, an LLM gateway, traces and evals, plus a checklist for your own agents.$497
- BuildcampAgentic AI Buildcamp for Engineers & PMsDesign, build and deploy a production agentic AI system in four weeks$997
Or watch the recording: Build a Multi-Agent System with MCP
