Pick by language and model first, then by how much the framework should decide for you. LangGraph for durable, stateful Python (or JS) agents with human approval steps and any model. Mastra for TypeScript teams that want agents, workflows, memory and evals in one package. OpenAI Agents SDK for the lightest path to a working agent in Python or TypeScript, strongest on OpenAI models. Claude Agent SDK when the agent needs Claude Code's own tools (files, shell, web) and permission model. Google ADK for Google Cloud, or for Java, Go and Kotlin teams. CrewAI for role-based crews of agents with the least code.
A framework is the code around the model: the loop that calls it, runs the tools it asks for, keeps state, and decides when to stop. These six are the ones people compare most in late 2026. Everything below comes from each project's documentation and GitHub repository, opened on November 1, 2026. We compared docs; we didn't run a benchmark, and star counts are a popularity signal, not a quality score.
Before you choose one, check that you need an agent at all. On our build ladder, an agent is the second-most expensive rung: most internal jobs people want an agent for are a skill plus a connector that a person starts. Frameworks are for the cases where something has to run by itself, across several steps and systems.
The short version
| Framework | Maker | Languages | Licence | Models | Best at |
|---|---|---|---|---|---|
| OpenAI Agents SDK | OpenAI | Python, TypeScript | MIT | OpenAI by default; "100+ other LLMs" via adapters | Light, readable agents with handoffs, guardrails and tracing |
| Claude Agent SDK | Anthropic | Python, TypeScript | MIT repo; use under Anthropic's Commercial Terms | Claude only | Agents that read, edit and run things, using Claude Code's tools |
| LangGraph | LangChain | Python, JS (LangGraph.js) | MIT | Any, through your own code or LangChain | Durable, stateful, long-running agents with human-in-the-loop |
| CrewAI | CrewAI | Python | MIT | Many; OpenAI by default, local models via Ollama or LM Studio | Role-based crews inside event-driven flows |
| Mastra | Mastra | TypeScript | Apache 2.0 core; ee/ folders under an enterprise licence |
40+ providers through one interface | Full TypeScript stack: agents, workflows, memory, evals |
| Google ADK | Python, TypeScript, Go, Java, Kotlin | Apache 2.0 | "Optimized for Gemini" (per its README), model-agnostic | Multi-agent and graph workflows, Google Cloud deployment |
Licences and claims from each project's docs and GitHub README, checked November 1, 2026. GitHub stars that day: CrewAI 60.2k, LangGraph 44.0k, OpenAI Agents SDK (Python) 30.4k, Mastra 27.1k, ADK (Python) 22.0k, Claude Agent SDK (Python) 8.4k.
What decides it
Language. It narrows the field fastest. TypeScript teams: Mastra, the OpenAI Agents SDK (JS/TS), the Claude Agent SDK (TypeScript), LangGraph.js or ADK's TypeScript package. Java, Go or Kotlin: ADK is the only one of the six with official support.
Model lock-in. The Claude Agent SDK runs Claude only. The OpenAI Agents SDK defaults to OpenAI's Responses API and reaches other models through LiteLLM and any-llm adapters. ADK's README calls it "optimized for Gemini" but model-agnostic. LangGraph, CrewAI and Mastra are designed to be provider-neutral, and Mastra's model strings (provider/model) make switching a one-line change.
How much the framework decides. LangGraph is deliberately low-level: you draw the graph and decide where the model chooses and where code does. CrewAI and the Claude Agent SDK are opinionated: roles and tasks in one, Claude Code's whole loop and toolset in the other. The OpenAI Agents SDK and Mastra sit between.
State and durability. If an agent runs for hours, waits for a person, or must survive a crash, you want durable execution. LangGraph lists it as a core capability ("agents persist through failures and can run for extended periods"); ADK 2.0 added graph workflows; CrewAI's Flows manage state and events; the OpenAI SDK has sessions and resumable sandbox sessions; the Claude Agent SDK can resume or fork sessions.
Each one in brief
OpenAI Agents SDK
A small set of primitives: agents with instructions and tools, handoffs and agents-as-tools for delegation, guardrails on inputs and outputs, sessions for memory, and built-in tracing. Recent additions are sandbox agents that work in isolated workspaces (local or Docker) and realtime voice agents. MCP servers plug in as tools alongside function tools. Pick it for a readable Python or TypeScript agent that you can ship this week, especially on OpenAI models; its tracing ties into OpenAI's evaluation and fine-tuning tools.
Claude Agent SDK
Claude Code as a library. You get the same agent loop, built-in tools (read, write and edit files, run commands, search the web), permissions, hooks, subagents, sessions, skills and plugins, in Python or TypeScript; the package bundles the Claude Code binary. That makes it the fastest way to build an agent that works on files and runs commands, such as a code-review bot, a data-cleaning agent or an internal ops agent. Two constraints from Anthropic's docs: it uses Claude models only, and third-party products must use API keys, not claude.ai logins or rate limits. Anthropic also offers Managed Agents if you'd rather it host the loop.
LangGraph
An orchestration framework and runtime for "long-running, stateful agents". You build a graph that mixes fixed steps with model-driven ones, and get durable execution, streaming, human-in-the-loop edits to agent state, and short and long-term memory. LangChain's higher-level create_agent runs on top of it, as does Deep Agents. MCP comes through LangChain's langchain.mcp namespace, which LangChain marks as beta. LangSmith adds tracing and a paid deployment platform. Pick it when control and reliability matter more than speed of setup; its README names Klarna, Replit and Elastic as users.
CrewAI
A standalone Python framework with its own primitives (it doesn't sit on LangChain), built around Crews (teams of role-playing agents that collaborate on tasks) and Flows (the event-driven, stateful process that directs them). CrewAI's own advice is to start any production app with a Flow. It lists MCP and A2A support, and CrewAI AMP is its commercial layer for deployment, observability and governance. Pick it when the problem maps naturally to roles ("researcher", "writer", "reviewer") and you want little orchestration code.
Mastra
A TypeScript framework covering agents, workflows, memory, storage, evals, tracing and a local Studio UI, with model routing to 40+ providers through one interface. It can author MCP servers as well as use them, exposing agents and tools to other clients. The core is Apache 2.0; code in ee/ folders is source-available under Mastra's enterprise licence and needs a licence for production use. Mastra Platform is the managed hosting. Pick it if your product is already TypeScript and you want one framework rather than five libraries.
Google ADK
Google's Agent Development Kit, in Python, TypeScript, Go, Java and Kotlin, which makes it the only choice here for JVM and Go shops. It supports multi-agent orchestration, sequential, loop and parallel workflow agents, and, new in ADK 2.0, graph workflows that "weave deterministic code with adaptive AI reasoning". It speaks MCP and Google's A2A protocol, and deploys to Cloud Run, GKE or Vertex AI Agent Engine, or anywhere you run containers. Pick it on Google Cloud or for Gemini-first teams.
Which to pick
| Your situation | Pick |
|---|---|
| Python, any model, must survive restarts and wait for approvals | LangGraph |
| TypeScript product team | Mastra (or the OpenAI or Claude SDK's TypeScript package for a single agent) |
| First agent, Python, mostly OpenAI models | OpenAI Agents SDK |
| Agent that edits files, runs commands, behaves like a coding agent | Claude Agent SDK |
| Java, Go or Kotlin, or deploying on Google Cloud | Google ADK |
| A team of role-based agents with minimal code | CrewAI |
| A coding task for one developer | None: use Claude Code or Cursor directly |
Whichever you choose, the agent will reach other systems through tools, and more and more of those tools are MCP servers. Read how to vet an MCP server before you install it before you wire one in: an agent with a write-capable tool can do damage at the speed of a loop.
Questions people ask
What is the best AI agent framework?
It depends on two choices you've usually already made, language and model. For Python with any model and long-running, stateful work, LangGraph. For TypeScript, Mastra. For a quick, light Python agent on OpenAI models, the OpenAI Agents SDK. For an agent that works on files and runs commands like a coding agent, the Claude Agent SDK. For Google Cloud or Java and Go teams, ADK. For role-based teams of agents with little code, CrewAI.
Is the Claude Agent SDK open source?
The repositories are MIT-licensed, but Anthropic's docs say use of the SDK is governed by its Commercial Terms of Service, including when you build products on it. It runs the Claude Code engine, which the package bundles, and works with Claude models only.
Do I need a framework to build an agent?
Often not. A loop that calls a model, runs the tool it asks for and feeds the result back is a few dozen lines with any model API. Frameworks earn their place when you need durable state, human approval steps, tracing, many tools or several agents working together.
Which agent frameworks support MCP?
All six do in some form. The OpenAI Agents SDK, Claude Agent SDK and Google ADK connect to MCP servers as tools; CrewAI lists MCP and A2A support; Mastra can both use and author MCP servers; LangGraph agents get MCP through LangChain's MCP namespace, which LangChain marks as beta.