AI Agents
AI Agent Frameworks Compared (2026): LangGraph, CrewAI, OpenAI, Claude, ADK and More
By Amjid Ali · · 8 min read

In this article
The main AI agent frameworks in 2026 are LangGraph (explicit, stateful graphs), CrewAI (role-based crews plus event-driven Flows), Microsoft Agent Framework (the successor to AutoGen and Semantic Kernel), the OpenAI Agents SDK and Pydantic AI (lightweight, code-first agents), the Claude Agent SDK (Claude Code's harness as a library), Google ADK (multi-language, Gemini-first but model-agnostic), LlamaIndex (agents over documents) and n8n (no-code workflows with an AI Agent node). Pick by how much control you need over the agent's path, which language you work in and which models you want to use. One change to know first: AutoGen is archived, so do not start new projects on it.
Quick picks
- Production workflows with branching, retries and human checkpoints: LangGraph.
- Simplest code-first agent, any model: OpenAI Agents SDK or Pydantic AI.
- Agent that works on files, shells and codebases: Claude Agent SDK.
- Role-based team of agents, fast to prototype: CrewAI.
- Microsoft and .NET shops: Microsoft Agent Framework.
- Gemini or Java, Go and Kotlin teams: Google ADK.
- Agents over your documents: LlamaIndex.
- No code, business automation: n8n.
The comparison table
All versions, licenses and star counts were checked on each project's GitHub repository on 18 October 2026.
| Framework | Best for | Languages | License | Latest release (Oct 2026) | Status |
|---|---|---|---|---|---|
| LangGraph | Stateful graphs, durable execution, human-in-the-loop | Python, JS/TS | MIT | 1.2.16 | Active; "low-level orchestration framework" from LangChain |
| CrewAI | Role-based multi-agent crews, Flows for control | Python | MIT | 1.15.28 | Active |
| Microsoft Agent Framework | Enterprise agents and graph workflows | Python, .NET, Go (preview) | MIT | Python 1.22.0 | Active; 1.0 released 2 April 2026 |
| AutoGen | (Legacy) multi-agent conversations | Python, .NET | Code MIT, docs CC BY 4.0 | python-v0.7.5 (Sept 2025) | Archived, not maintained |
| OpenAI Agents SDK | Lightweight agents, handoffs, guardrails, tracing | Python, JS/TS | MIT | 0.24.0 | Active; provider-agnostic |
| Claude Agent SDK | Agents with Claude Code's tools, hooks, subagents, skills | Python, TypeScript | Code MIT; use under Anthropic Commercial Terms | Python 0.2.168 | Active; Claude models |
| Google ADK | Multi-agent and graph workflows, deployment | Python, TS, Go, Java, Kotlin | Apache 2.0 (Python) | Python 2.12.0 | Active; model-agnostic |
| LlamaIndex | Agents and workflows over documents | Python | MIT | 0.14.25 | Active |
| Pydantic AI | Typed agents, structured output, durable execution | Python | MIT | 2.57.0 | Active; model-agnostic |
| n8n | Visual workflows with an AI Agent node | Visual, JS/Python code nodes | Sustainable Use License (fair-code) | 2.43.7 | Active; self-hostable |
GitHub stars on 18 October 2026, as a rough signal of community size: n8n about 208k, AutoGen 61k, CrewAI 60k, LlamaIndex 53k, LangGraph 43k, OpenAI Agents SDK 30k, Google ADK (Python) 22k, Pydantic AI 21k, Microsoft Agent Framework 14k, Claude Agent SDK (Python) 8k. Stars measure attention, not quality; AutoGen's count is high and it is archived.
How to choose: four questions
- Who decides the path, you or the model? If the steps are known, you want explicit control (LangGraph graphs, CrewAI Flows, Agent Framework workflows, ADK graph workflows, or n8n). If the path is open-ended, a simple agent loop (OpenAI Agents SDK, Pydantic AI, Claude Agent SDK) is enough.
- One agent or many? Most tasks need one agent with good tools. Multi-agent support matters when parts need different instructions, permissions or models.
- Which models? Every framework here except the Claude Agent SDK is designed to work with several providers. The OpenAI Agents SDK describes itself as "provider-agnostic," ADK works with "almost any generative AI model," and Pydantic AI makes switching models "a string change."
- What does production need? State that survives restarts, human approvals, tracing and evaluation. LangGraph (durable execution, interrupts), Pydantic AI (durable execution on Temporal, DBOS or Prefect), the OpenAI SDK (human-in-the-loop, tracing) and Agent Framework (sessions, middleware, telemetry) all document these.
And a fifth, honest question: do you need an agent at all? Microsoft's own framework docs say: "If you can write a function to handle the task, do that instead of using an AI agent." See what is agentic AI for when deterministic automation is the better choice.
The frameworks one by one
LangGraph
LangGraph describes itself as a "low-level orchestration framework for building, managing, and deploying long-running, stateful agents." You define a graph: nodes are functions (often LLM calls), edges decide what runs next, and a typed state object flows through. Its README lists durable execution ("automatically resuming from exactly where they left off"), human-in-the-loop, short and long-term memory, and debugging with LangSmith.
- Choose it when: you need explicit control flow, checkpoints, approvals mid-run and auditability.
- Trade-off: more code and concepts than a simple agent loop. For a higher-level start, LangChain points to its Deep Agents package, built on LangGraph.
CrewAI
CrewAI offers two layers: Crews, where agents with a role, goal and backstory collaborate on tasks, and Flows, "event-driven workflows" with state, branching and routing. Its quickstart now says "Flows are the recommended way to structure production apps," and defines agents and crews in config files loaded by Python.
- Choose it when: the problem maps naturally to roles (researcher, analyst, writer) and you want a working multi-agent prototype quickly.
- Trade-off: role-play prompts add tokens, and autonomous crews are harder to make predictable; use Flows for the deterministic parts. For a head-to-head, see LangGraph vs CrewAI.
Microsoft Agent Framework (and AutoGen)
Microsoft Agent Framework is "the direct successor" to both Semantic Kernel and AutoGen, "created by the same teams." It combines AutoGen's agent abstractions with Semantic Kernel's enterprise features (session state, type safety, middleware, telemetry) and adds graph-based workflows. It supports Microsoft Foundry, Azure OpenAI, OpenAI, Anthropic, Ollama and more. Python and .NET are generally available; the Go version is in public preview.
AutoGen's repository now carries a caution: "This project has been archived and is no longer actively maintained by Microsoft," with no bug fixes or security fixes, and it advises against production use. Microsoft publishes a migration guide to Agent Framework.
- Choose it when: you build on Azure or .NET, or you are migrating from AutoGen or Semantic Kernel.
OpenAI Agents SDK
A "lightweight yet powerful framework for multi-agent workflows" that is "provider-agnostic, supporting the OpenAI Responses and Chat Completions APIs, as well as 100+ other LLMs." Core concepts: agents, tools (functions, MCP, hosted tools), handoffs and agents-as-tools, guardrails, human-in-the-loop, sessions, tracing, plus sandbox, realtime and voice agents. If an agent sets no model, the SDK's docs say it currently defaults to gpt-5.6-luna.
- Choose it when: you want the shortest path from idea to a working, debuggable agent. Our how to build an AI agent guide uses it for the worked example.
- Note: OpenAI's visual Agent Builder is deprecated and scheduled to shut down on 30 November 2026; the SDK is the code route.
Claude Agent SDK
Anthropic's SDK gives you "the same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript." Built in: file read, write and edit, shell commands, web search, hooks, subagents, MCP, permissions, sessions, and skills loaded from .claude/ folders. Custom tools run as in-process MCP servers.
- Choose it when: the agent works on files, code or a machine (coding agents, ops agents, document pipelines) and you want Claude models.
- Trade-offs: Claude-only. Third-party products must use API keys rather than claude.ai login unless approved, and use is governed by Anthropic's Commercial Terms even though the repository is MIT.
Google ADK (Agent Development Kit)
ADK is "an open-source framework for building, debugging, and deploying AI agents," from simple prompt-and-tool agents to multi-agent orchestration and graph workflows. It is available in Python, TypeScript, Go, Java and Kotlin, and gives easy access to Gemini with adapters for other providers and local models. A minimal agent is Agent(name=..., model=..., instruction=..., tools=[...]).
- Choose it when: you use Gemini or Google Cloud, or your team works in Java, Go or Kotlin.
LlamaIndex
The repository now calls LlamaIndex "the document processing platform for AI." Its agent layer includes FunctionAgent (pass Python functions as tools, an LLM and a system prompt), AgentWorkflow for several agents, and Workflows for building your own agentic flows.
- Choose it when: the agent's main job is reasoning over your documents, and retrieval quality matters most. See RAG vs fine-tuning for the knowledge side.
Pydantic AI
From the team behind Pydantic, it calls itself "the Python AI SDK," with a typed agent loop: structured outputs, typed dependency injection and typed tools, so your IDE and type checker know what an agent returns. It supports MCP, durable execution on Temporal, DBOS and Prefect, and OpenTelemetry instrumentation through Logfire.
- Choose it when: you are a Python team that values type safety and validated outputs, and want to stay close to plain Python.
n8n
n8n is a "fair-code workflow automation platform with native AI capabilities," with 400+ integrations, self-hosted or cloud. Its AI Agent node connects a chat model and tools, and "the agent decides which tools to call." You can require human approval before selected tools run.
- Choose it when: most of the job is deterministic business automation with one or two agentic steps, and the team prefers visual building.
- Note: the Sustainable Use License allows free self-hosting for your own use, but it is not an OSI open-source license.
Framework by use case
| Use case | First choice | Also good |
|---|---|---|
| Customer support agent with approvals | OpenAI Agents SDK | LangGraph, n8n |
| Coding or file-heavy agent | Claude Agent SDK | OpenAI Agents SDK (sandbox agents) |
| Long-running, multi-step business process | LangGraph | Microsoft Agent Framework workflows, CrewAI Flows |
| Research team of agents | CrewAI | LangGraph, Google ADK |
| Q&A and actions over company documents | LlamaIndex | Pydantic AI plus your retriever |
| Typed data extraction with tool calls | Pydantic AI | OpenAI Agents SDK |
| Azure and .NET enterprise | Microsoft Agent Framework | Google ADK (Java, Go, Kotlin teams) |
| No-code automation with an AI step | n8n |
Things every framework still leaves to you
- Tool design. Frameworks call your tools; they do not make them safe or precise.
- Context discipline. Too many tools and instructions in the window make any framework slow and costly; see context engineering and AI agent skills.
- Security. Permissions, sandboxing, secrets and approvals are your design job; see AI agent security.
- Evaluation. You need a test set of real inputs and checks on outcomes, whichever framework you pick.
The bottom line
The frameworks have converged on the same core (model, tools, loop, guardrails, tracing, MCP support), so the choice is about control and fit, not raw capability. For a first agent, start with the lightest option that matches your models and language, such as the OpenAI Agents SDK or Pydantic AI. Move to LangGraph, Agent Framework workflows, ADK graphs or CrewAI Flows when you need explicit control over a long process. Avoid AutoGen for new work, and treat stars and benchmark claims with caution: the best framework is the one whose failures you can see and fix.
Frequently asked questions
Which AI agent framework is best?+
There is no single best one. LangGraph suits explicit, stateful production workflows; the OpenAI Agents SDK and Pydantic AI suit simple, typed single agents; CrewAI suits role-based multi-agent work; the Claude Agent SDK suits agents that need file and shell tools; n8n suits no-code business automation.
Is AutoGen still maintained?+
No. Microsoft's AutoGen repository says the project is archived and no longer maintained, with no bug or security fixes, and points new users to Microsoft Agent Framework, its production successor, which reached 1.0 in April 2026.
Which AI agent frameworks are open source and free?+
LangGraph, CrewAI, Microsoft Agent Framework, the OpenAI Agents SDK, LlamaIndex and Pydantic AI are MIT licensed, and Google ADK for Python is Apache 2.0. The Claude Agent SDK code is MIT but its use is governed by Anthropic's Commercial Terms. n8n is fair-code under its Sustainable Use License.
Do I need a framework to build an AI agent?+
No. An agent is a loop of model calls and tool calls you can write yourself. Frameworks add tool schemas, approvals, state, tracing and multi-agent patterns, which save time once you go beyond a prototype.
What are the 5 types of AI agents?+
The classic textbook list is simple reflex, model-based reflex, goal-based, utility-based and learning agents. Modern LLM agents built with these frameworks are mostly goal-based: they plan steps toward a goal you give them.
Sources
- LangGraph (GitHub), LangChain
- LangGraph quickstart, LangChain
- CrewAI (GitHub), CrewAI
- CrewAI quickstart, CrewAI
- AutoGen (GitHub, archived notice), Microsoft
- Microsoft Agent Framework overview, Microsoft Learn
- Microsoft Agent Framework (GitHub), Microsoft
- OpenAI Agents SDK (GitHub), OpenAI
- Claude Agent SDK overview, Anthropic
- Claude Agent SDK for Python (GitHub), Anthropic
- Agent Development Kit, Google
- ADK for Python (GitHub), Google
- LlamaIndex (GitHub), LlamaIndex
- Building an agent (LlamaIndex docs), LlamaIndex
- Pydantic AI overview, Pydantic
- Pydantic AI (GitHub), Pydantic
- n8n (GitHub, license), n8n
- AI Agent node, n8n Docs
- Agent Builder (deprecation notice), OpenAI
The weekly AI briefing
Get the guides like this one, once a week
Keep reading
AI AgentsLangGraph vs CrewAI vs AutoGen: Which Agent Framework Should You Use?LangGraph vs CrewAI vs AutoGen in 2026: graphs vs role-based crews, AutoGen archived. A comparison table, code for each, and when to pick which (plus n8n). · 9 min read
AI AgentsHow to Build an AI Agent: A Step-by-Step Guide With Python and No-CodeHow to build an AI agent in 7 steps: pick a task, define tools, write instructions, add limits and approvals. Working Python code, a free local option and n8n. · 10 min read
AI AgentsAgentic AI vs Generative AI: The Difference ExplainedGenerative AI creates content when prompted; agentic AI uses the same model to plan and take actions toward a goal. Differences, a table, examples and costs. · 8 min read