Comparison

Best AI Agent Frameworks in 2026

Twelve code frameworks for building agents, compared on language, live GitHub stars and releases, multi-agent support, durability, MCP and A2A, observability and license. Fetched Nov 12, 2026.

Logos of LangGraph, OpenAI Agents SDK, Claude Agent SDK, Google ADK, CrewAI, Microsoft Agent Framework, Pydantic AI, Mastra, LlamaIndex, Vercel AI SDK, Agno and smolagents, the tools compared in this guide
Pick the framework for your language, model provider and failure model, not for its star count.

Get the latest on AI, LLMs & developer tools

New MCP servers, model updates, and guides like this one — delivered weekly.

The Short Answer

For most teams the choice comes down to language and failure model. Choose LangGraph when an agent must survive crashes and wait for human approval, the OpenAI Agents SDK or Claude Agent SDK when you are committed to one model vendor and want the shortest path, Google ADK or Microsoft Agent Framework when your cloud or language (Go, Java, .NET) decides for you, and Pydantic AI or Mastra when type safety in Python or TypeScript matters most.

You face a crowded field: twelve serious open-source options, each with a different idea of what an “agent” is. This guide compares them on the same axes, uses GitHub numbers fetched on Nov 12, 2026, and says plainly where a claim could not be verified from the vendor's own pages. Frameworks are only the code layer; where the agent runs and how you trace it are covered in our agent hosting platforms and LLM observability and eval tools comparisons.

A third-party video walkthrough comparing OpenAI Agents SDK, CrewAI, LangGraph and AutoGen. It is not from the vendors, and its details may lag the releases below.

Quick Picks

CategoryPickWhy
Best overall for stateful production agentsLangGraphExplicit graph state, checkpoints and human-in-the-loop, with a large community (44.8k stars).
Best for a fast start on OpenAI modelsOpenAI Agents SDKFew primitives (agents, handoffs, guardrails, sessions, tracing) and a four-line hello world.
Best for coding and computer-use agentsClaude Agent SDKGives you Claude Code's tools, hooks, subagents and sessions as a library.
Best for the Google Cloud and multi-language stacksGoogle ADKPython, TypeScript, Go, Java and Kotlin, with A2A and MCP documented.
Best for .NET and Azure teamsMicrosoft Agent FrameworkSuccessor to Semantic Kernel and AutoGen, with .NET, Python and a preview Go SDK.
Best for type-safe PythonPydantic AITyped outputs, OpenTelemetry-native tracing, many durable-execution integrations.
Best for TypeScript teamsMastraAgents, graph workflows, memory, evals and suspend/resume in one TypeScript framework.
Best for role-based team prototypesCrewAICrews plus event-driven Flows; the most-starred repo here at 60.8k.
Best open-source code-first agentssmolagentsAgents write Python as their actions; Apache-2.0 and sandbox options.

“Best budget” is not a meaningful axis here. Every framework in this list is free to install, and the costs that matter are model tokens, hosting and any paid control plane. No price pages are quoted in this article, so check each vendor for the paid layers (LangSmith, CrewAI AMP, Agno AgentOS, Logfire) as of the day you buy.

Master Comparison Table

Stars and releases come from the GitHub API on Nov 12, 2026. For monorepos with several packages, the release shown is the main package. “Not stated” means the vendor page I fetched did not mention it, which is not the same as “unsupported”.

FrameworkLanguageGitHub starsLatest releaseLicense
LangGraphPython44,8381.2.20 (Nov 5, 2026)MIT
OpenAI Agents SDKPython, TypeScript30,632 (Python); 4,009 (JS)v0.24.0 (Oct 15, 2026); JS 0.21.0 (Oct 20, 2026)MIT
Claude Agent SDKPython, TypeScript8,528 (Python); 1,875 (TS)v0.2.180 (Nov 9, 2026); TS v0.3.322 (Nov 10, 2026)Anthropic Commercial Terms (GitHub field shows MIT for the Python repo)
Google ADKPython, TypeScript, Go, Java, Kotlin22,187 (Python)v2.14.0 (Nov 7, 2026)Apache-2.0
CrewAIPython60,8031.15.40 (Nov 11, 2026)MIT
Microsoft Agent FrameworkPython, .NET, Go (preview)14,643python-1.25.0 (Nov 7, 2026); dotnet-1.28.0 (Nov 6, 2026)MIT
Pydantic AIPython21,160v2.68.0 (Nov 12, 2026)MIT
MastraTypeScript29,480@mastra/core 1.82.0 (Nov 4, 2026)Apache-2.0 core; ee/ directories under Mastra Enterprise License
LlamaIndexPython52,882v0.14.25 (Sep 21, 2026)MIT
Vercel AI SDKTypeScript27,882[email protected] (Nov 11, 2026)Apache-2.0 (LICENSE text)
AgnoPython43,166v3.1.12 (Oct 29, 2026)Apache-2.0
smolagentsPython30,327v1.26.0 (May 29, 2026)Apache-2.0
FrameworkMulti-agentDurability and stateMCP / A2AObservability
LangGraphBuild with graphs of nodes and edges; multi-agent not covered on the overview pageDurable execution, checkpoints, human-in-the-loopNot stated on the overview pageLangSmith tracing and evals
OpenAI Agents SDKHandoffs and agents as toolsSessions; resumable sandbox sessions; no workflow engine namedMCP tools yes; A2A not statedBuilt-in tracing
Claude Agent SDKSubagentsSessions you can resume or fork; permissionsMCP yes; A2A not statedHooks; no tracing backend named
Google ADKHierarchies; sequential, loop and parallel workflowsSessions, state, memoryMCP and A2A both documentedLogging, metrics, traces; Cloud Trace on Google Cloud
CrewAICrews of role-based agentsFlows with state; checkpointing listedREADME lists MCP/A2A supportControl plane in paid CrewAI AMP; anonymous OSS telemetry
Microsoft Agent FrameworkGraph workflows: sequential, concurrent, handoff, groupCheckpointing, sessions, human-in-the-loopMCP clients; A2A in hosting samplesOpenTelemetry
Pydantic AIHarness SubAgents; Pydantic GraphTemporal, DBOS, Prefect, Restate and moreMCP yes; A2A not stated in the docs I fetchedOpenTelemetry; Logfire
MastraGraph workflows (.then, .branch, .parallel)Suspend/resume with storage; memoryMCP server authoring; A2A not statedBuilt-in observability and evals
LlamaIndexAgentWorkflow manages multiple agentsWorkflows state guides exist; not verified in detailMCP guides exist; A2A not statedObservability guides exist
Vercel AI SDKToolLoopAgent and workflow patternsPoints to eve for durable agentsNot stated on the agents overviewNot verified
AgnoTeams and workflowsAgentOS durable execution, scheduling, approvalsAgentOS has a built-in MCP server; A2A not statedTracing of runs
smolagentsMulti-agent hierarchiesNot statedMCP tools yes; A2A not statedNot mentioned in the README

To install any of them, the commands below come straight from each project's README or docs.

# Install commands from each project's README or docs (as of Nov 12, 2026)
pip install -U langgraph                 # LangGraph
pip install openai-agents                # OpenAI Agents SDK (Python 3.10+)
pip install claude-agent-sdk             # Claude Agent SDK (Python 3.10+)
pip install google-adk                   # Google ADK (Python 3.11+)
uv tool install crewai                   # CrewAI CLI (Python >=3.10, <3.14)
pip install agent-framework              # Microsoft Agent Framework (Python)
uv add pydantic-ai                       # Pydantic AI
npm create mastra@latest                 # Mastra
pip install llama-index-core             # LlamaIndex core
pip install "smolagents[toolkit]"        # smolagents

How the Pieces Differ

Three design choices separate these frameworks more than any feature checklist. The first is who owns the loop. In the OpenAI Agents SDK, Claude Agent SDK, Pydantic AI and the Vercel AI SDK's ToolLoopAgent, the library runs a model-and-tools loop for you and you tune it with instructions, tools and guardrails. In LangGraph and the workflow layers of Microsoft Agent Framework and Mastra, you draw the control flow yourself and the model fills in steps. CrewAI and Google ADK sit between the two, offering role-based or hierarchical agents plus explicit workflow types.

The second is where state lives. A pure in-memory loop loses everything when the process dies. LangGraph checkpoints, Pydantic AI hands the run to Temporal or DBOS, Mastra suspends and resumes from storage, and Agno's AgentOS wraps agents as services with scheduling and approvals. If your agent runs for minutes and calls paid tools, pick a framework with a stated persistence story and test it by killing the process.

The third is protocol support. MCP (Model Context Protocol) lets an agent use external tools through a standard interface, and most frameworks here support it. A2A (agent-to-agent) is thinner: Google ADK documents it with quickstarts, and Microsoft Agent Framework lists it in hosting samples. If you plan to expose MCP servers to your agents, our guides to top MCP servers and best MCP servers for Claude Code (EN) list good starting points.

Maintainer type is a fourth, quieter factor. Four of the twelve come from model vendors (OpenAI, Anthropic, Google, Microsoft), and their roadmaps follow those vendors' models and clouds: expect the best support for their own models first, with other providers listed as supported. Three come from infrastructure or developer-tool companies (LangChain, Pydantic, Vercel), whose commercial products (LangSmith, Logfire, the AI Gateway) sit next to the open-source code. The rest are independent startups or communities (CrewAI, Mastra, Agno, LlamaIndex) or a research-oriented lab (Hugging Face for smolagents). None of this makes one group better. It tells you where the paid upsell is likely to appear and whose model gets the first-class integration.

It also helps to separate a framework from a harness. Several of the newer docs use the word. Microsoft Agent Framework includes a Harness Agent with planning and todo tracking, context compaction and tool approval; Pydantic AI has a Harness with SubAgents; the Claude Agent SDK is described as Claude Code packaged as a library, and Mastra's scaffold creates a harness with a local workspace, shell tools, memory and scheduled tasks. A harness is an opinionated agent you configure, while a framework gives you parts to assemble. If your goal is a coding or research agent that works on long tasks, a harness saves weeks. If your goal is a bespoke business process with fixed steps, a graph or workflow layer is the better fit.

CrewAI diagram contrasting a Crew of agents with tools, memory and tasks against a Flow that mixes code and crews with shared state
CrewAI's own diagram of the “who owns the loop” split: a Crew gives agents more autonomy, a Flow gives finer control. Source: crewAIInc/crewAI README.

LangGraph

LangGraph describes itself as a low-level orchestration framework and runtime for long-running, stateful agents. You model a workflow as a graph of shared state, nodes and edges, and you can mix deterministic steps with LLM-driven ones in the same graph. It does not prescribe prompts or an agent architecture. The docs place LangChain as the higher-level agent framework, with LangGraph as the runtime underneath and Deep Agents as a harness built on top.

Stars / release / license44,838 stars; 1.2.20 (Nov 5, 2026); MIT
PricingThe framework is free. LangSmith (tracing, evals, deployment) is a separate product; check its pricing page.
Best forLong-running agents that need checkpoints, human review and explicit control flow

Strengths. Durable execution is a headline capability: state is saved at checkpoints so a run can resume after a failure or a pause. You can inspect and edit state mid-run, stream tokens and state updates, and keep both short-term thread memory and longer-term memory across sessions. LangSmith adds tracing, evaluation and managed deployment around it.

Weaknesses. A graph is more code than a prebuilt loop, and you decide the architecture. The overview page does not cover multi-agent patterns or MCP, so confirm those in the linked docs. Reaching for LangGraph on a single-tool chatbot is overkill.

# Excerpt from the LangGraph overview docs (a minimal graph)
graph = StateGraph(MessagesState)
graph.add_node(mock_llm)
graph.add_edge(START, "mock_llm")

If you are weighing the observability side of the LangChain ecosystem, our LangSmith BYOC on AWS guide (EN) covers self-hosted tracing.

OpenAI Agents SDK

The OpenAI Agents SDK keeps its surface small: agents (an LLM with instructions and tools), handoffs and agents-as-tools for delegation, guardrails that run in parallel with the agent, sessions for conversation history, human-in-the-loop hooks and built-in tracing. Newer additions include sandbox agents that work inside an isolated container with resumable sessions, plus realtime and voice agents. It uses the Responses API by default for OpenAI models.

Stars / release / license30,632 stars (Python), v0.24.0 on Oct 15, 2026; JS repo 4,009 stars, @openai/agents 0.21.0 on Oct 20, 2026; MIT
PricingFree SDK. You pay for model usage; the docs do not quote prices.
Best forTeams on OpenAI models who want handoffs, guardrails and tracing with little code

Strengths. The four-line hello world below is the shortest in this comparison. Function tools get automatic schema generation with Pydantic validation, remote MCP tools sit alongside them, and tracing is built in with links to OpenAI's evaluation and fine-tuning tools.

Weaknesses. The docs page I fetched does not describe a workflow-engine style of durable execution; sessions and resumable sandbox state are the closest features. Provider neutrality is only briefly mentioned, so a multi-vendor model strategy needs testing. For a deeper walkthrough of sandboxes and memory, see our OpenAI Agents SDK sandbox, memory and coding guide (EN).

from agents import Agent, Runner

agent = Agent(name="Assistant", instructions="You are a helpful assistant")

result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)

Claude Agent SDK

The Claude Agent SDK packages the agent loop, tools and context management that power Claude Code as a library for Python and TypeScript. Anthropic's docs list built-in tools (read, write and edit files, run commands, search the web), hooks, subagents, MCP, permissions, sessions you can resume or fork, skills and plugins. The Python package bundles the Claude Code CLI, so there is no separate install.

Stars / releasePython 8,528 stars, v0.2.180 (Nov 9, 2026); TypeScript 1,875 stars, v0.3.322 (Nov 10, 2026)
License / termsDocs: governed by Anthropic's Commercial Terms of Service. GitHub shows MIT on the Python repo and no license field on the TypeScript repo, so read both before shipping.
Best forCoding, file and terminal agents that should behave like Claude Code

Strengths. You get a production-tested toolset and a permission model out of the box, so a code-fixing agent needs very little glue. Custom tools can be exposed as in-process MCP servers, and hooks let you block an action such as a risky Bash command before it runs.

Weaknesses. It is built around Claude, and Anthropic states it does not allow third-party developers to offer claude.ai login or rate limits for their products unless previously approved; use API key authentication. The docs I fetched do not name a tracing backend or durable workflow engine. For where it fits among coding tools, see best AI coding agents 2026 (EN).

import anyio
from claude_agent_sdk import query

async def main():
    async for message in query(prompt="What is 2 + 2?"):
        print(message)

anyio.run(main)

Google ADK

Agent Development Kit is Google's open-source framework. Its docs list Python, TypeScript, Go, Java and Kotlin, which is the widest language range in this comparison. Multi-agent systems are composed as hierarchies, and workflow agents come as sequential, loop and parallel templates. The docs cover sessions, state, memory, an A2A section with quickstarts for exposing and consuming agents, and MCP tools, including exposing an agent as an MCP server.

Stars / release / license22,187 stars (Python); v2.14.0 (Nov 7, 2026); Apache-2.0
Deploymentadk deploy docker, adk deploy cloud_run, GKE, Agent Runtime, or self-hosted containers
Best forGoogle Cloud shops and teams that need Go, Java or Kotlin agents

Strengths. Documented A2A and MCP, built-in evaluation through adk eval, Cloud Trace integration on Google Cloud, and a model list that includes Gemini, Gemma, Claude, OpenAI, Ollama, vLLM and LiteLLM. Weaknesses. The deepest tooling assumes Google Cloud, and non-Python SDKs have separate repositories with their own release cadence (the JS repo had 1,477 stars on Nov 12, 2026).

from google.adk import Agent

root_agent = Agent(
    name="greeting_agent",
    model="gemini-3.5-flash",
    instruction="You are a helpful assistant. Greet the user warmly.",
)

CrewAI

CrewAI organizes work around Crews, teams of role-based agents that delegate to each other, and Flows, event-driven workflows with state, conditional branching and decorators such as @start(), @listen() and @router(). The README presents Crews running as steps inside Flows as the framework's main strength. It is the most-starred repository in this comparison at 60,803.

Release / license1.15.40 (Nov 11, 2026); MIT; Python >=3.10 and <3.14
Paid layerCrewAI AMP Suite (managed deployment, observability, governance, on-prem or cloud); pricing not captured here, check the vendor
Best forRole-based multi-agent prototypes that later need Flow-style control

Strengths. The Crew, Agent and Task vocabulary is quick to read, the CLI scaffolds a project (crewai create crew <name>), and the README lists MCP/A2A support alongside memory, knowledge and checkpointing. Weaknesses. Observability beyond logs sits in the paid control plane; the open-source framework sends anonymous telemetry that you can disable with OTEL_SDK_DISABLED=true. The README gives no detail on how MCP or A2A are configured, so verify against the docs.

Microsoft Agent Framework

Microsoft Agent Framework is described by Microsoft as the direct successor to 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. The overview lists agents, a harness agent for long multi-step tasks, workflows and integrations, with model providers including Microsoft Foundry, Anthropic, Azure OpenAI, OpenAI and Ollama.

Stars / release / license14,643 stars; python-1.25.0 (Nov 7, 2026) and dotnet-1.28.0 (Nov 6, 2026); MIT
Languages.NET, Python, and Go (public preview, Go 1.26+)
Best for.NET and Azure teams, and anyone migrating from Semantic Kernel or AutoGen

Strengths. Sequential, concurrent, handoff and group orchestration; checkpointing, streaming, human-in-the-loop and time-travel; built-in OpenTelemetry; MCP clients; A2A in hosting samples; and migration guides from both predecessors. Weaknesses. The Go SDK is a preview that does not implement declarative agents, CodeAct or functional workflows, and the snippets assume a Foundry project. Microsoft also warns that third-party systems you connect are used at your own risk. See our Microsoft Agent Framework and GitHub Copilot guide (EN) for a hands-on build.

from agent_framework import Agent
from agent_framework.foundry import FoundryChatClient
from azure.identity import AzureCliCredential

agent = Agent(
    client=FoundryChatClient(
        project_endpoint="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project",
        model="gpt-5.4-mini",
        credential=AzureCliCredential(),
    ),
    name="HelloAgent",
    instructions="You are a friendly assistant. Keep your answers brief.",
)

result = await agent.run("What is the largest city in France?")
print(f"Agent: {result}")

Pydantic AI

Pydantic AI brings the Pydantic validation model to agents: you declare an output_type and the framework validates the model's answer against it, with tools registered by decorator. Its docs describe MCP as a built-in capability, human-in-the-loop tool approval, Pydantic Evals for grading outputs and tool-call trajectories, and Pydantic Graph for typed graph control flow when one agent loop is not enough.

Stars / release / license21,160 stars; v2.68.0 (Nov 12, 2026); MIT
Durable executionTemporal, DBOS, Prefect, Restate, AWS Lambda, Airflow and others per the docs
ObservabilityOpenTelemetry-native; Logfire has a free tier per the docs (pricing not captured)

Strengths. The widest list of durable-execution integrations here, typed outputs, a Harness with SubAgents, and instrumentation that works with any OTLP backend. Weaknesses. Python only, and the docs pages I fetched do not mention A2A. The example below uses the model string exactly as the README shows it.

from typing import Literal

from pydantic import BaseModel, Field

from pydantic_ai import Agent, RunContext


class Sentiment(BaseModel):
    label: Literal['positive', 'negative', 'neutral']
    score: float = Field(ge=-1, le=1)


agent = Agent('openai:gpt-6.1-sol', output_type=Sentiment)


@agent.tool
def recent_reviews(ctx: RunContext, product: str) -> list[str]:
    """Fetch recent review snippets for a product."""
    return ['The new release fixed everything I complained about!']


result = agent.run_sync('How are people feeling about the Extract app?')
print(result.output)
Pydantic docs card describing Pydantic Validation, Pydantic AI and Pydantic Logfire
The Pydantic stack: validation, agents and Logfire monitoring. Source: Pydantic docs.

Mastra

Mastra is a TypeScript framework for agents and apps. Agents are defined with an id, instructions and a provider/model string, tools use createTool() with zod schemas, and a Mastra instance registers everything. The README lists graph workflows (.then(), .branch(), .parallel()), memory including Observational Memory, MCP server authoring, evals, built-in observability and suspend/resume with state kept in storage.

Stars / release29,480 stars; @mastra/core 1.82.0 (Nov 4, 2026)
LicenseApache-2.0 for the core; code in ee/ directories falls under the Mastra Enterprise License (free for development and testing, license required for production)
Best forTypeScript teams shipping agents inside Next.js, Hono, Express or SvelteKit apps

Strengths. One package covers agents, workflows, memory and evals, plus a Studio UI and framework guides. Weaknesses. The dual license needs a read before you use anything under ee/; the docs pages I fetched do not mention A2A.

// From the Mastra quickstart: call a registered agent
const agent = mastra.getAgentById('weather-agent')
const response = await agent.generate('Weather in SF')
console.log(response.text)

LlamaIndex Workflows and Agents

LlamaIndex began as a data and retrieval framework and now describes itself as an open-source framework for agentic applications. Prebuilt agents such as FunctionAgent take plain Python functions as tools, using their names, docstrings and type hints, and the docs describe AgentWorkflow as an agent that manages multiple agents. Document-focused products (LlamaParse, Extract, Index) live on a separate platform.

Stars / release / license52,882 stars; v0.14.25 (Sep 21, 2026); MIT
Best forDocument-heavy agents where parsing and retrieval are the hard part

Strengths. Deep retrieval and integration coverage, with separate guides for MCP tools, state and observability. Weaknesses. The release cadence is slower than its peers (last release Sep 21, 2026 as of the fetch), and the pages I fetched did not detail multi-agent patterns, durable state or MCP, so check the linked guides. For the retrieval layer itself, see best vector databases for AI agents.

# Abridged from the LlamaIndex agents tutorial
llm = OpenAI(model="gpt-4o-mini")

workflow = FunctionAgent(
    tools=[multiply, add],
    llm=llm,
    system_prompt="You are an agent that can perform basic mathematical operations using tools.",
)

response = await workflow.run(user_msg="What is 20+(2*4)?")
print(response)

Vercel AI SDK

The AI SDK is a TypeScript toolkit whose agent entry point is ToolLoopAgent, which manages the loop, message context and stopping conditions. Models are addressed by a provider/model string. For durable, long-running agents the docs point to eve, an open-source framework built on the AI SDK that runs on Vercel or self-hosted.

Stars / release / license27,882 stars; [email protected] (Nov 11, 2026); Apache-2.0 (GitHub shows 'Other' but the LICENSE text is Apache 2.0)
Best forWeb teams adding streaming, tool-calling agents to a TypeScript or Next.js app

Strengths. It is the lightest TypeScript option and sits close to UI streaming. Weaknesses. It is a toolkit, so state, durability and multi-agent orchestration are things you assemble or take from eve. The agents overview I fetched does not describe MCP support, so verify it in the MCP docs. If you route model traffic through Vercel, see our Vercel AI Gateway guide (EN).

// Excerpt from the AI SDK agents overview
const weatherAgent = new ToolLoopAgent({
  model: "anthropic/claude-sonnet-5.5",
  // ...tools and instructions
});

const result = await weatherAgent.generate({
  prompt: 'What is the weather in San Francisco in celsius?',
});

Agno

Agno pairs an agent library (agents, teams, workflows, memory, knowledge) with AgentOS, a runtime that serves agents as durable services with an API, authentication, role-based access, human approvals and scheduling. The README says AgentOS includes a built-in MCP server so agents can be used from Claude and ChatGPT.

Stars / release / license43,166 stars; v3.1.12 (Oct 29, 2026); Apache-2.0
PricingNot mentioned on the README; check Agno for AgentOS pricing
Best forTeams that want a ready-made agent runtime rather than only a library

Strengths. Teams that delegate, workflows with routing, loops and parallel steps, and tracing of runs and tool calls. Weaknesses. The README shows no hello-world snippet and I found no A2A mention, so I do not include code here rather than invent it.

smolagents

Hugging Face's smolagents is deliberately small. Its CodeAgent writes its actions as Python code, so a tool call becomes a function call. Tools can come from any MCP server, agents can form hierarchies, and tools and agents can be shared through the Hugging Face Hub. Code can run in sandboxes such as E2B, Blaxel, Modal or Docker; the README says the built-in LocalPythonExecutor is not a security sandbox.

Stars / release / license30,327 stars; v1.26.0 (May 29, 2026); Apache-2.0
Best forResearch, prototypes and code-writing agents you will sandbox

Strengths. Minimal abstractions and a readable codebase. Weaknesses. The latest release is about five months old as of Nov 12, 2026, the README does not mention tracing, and it does not state a durability story. Executing model-written code demands a real sandbox; our best AI agent sandboxes comparison covers the options.

from smolagents import CodeAgent, WebSearchTool, InferenceClientModel

model = InferenceClientModel()
agent = CodeAgent(tools=[WebSearchTool()], model=model, stream_outputs=True)

agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")

Production Checklist

The frameworks differ in syntax, but the failures that hurt in production are the same across all of them. This checklist is our own engineering advice, not a vendor claim, and each item maps to a feature the vendors document so you can check it before you commit.

Question to answer before launchWhat to look forWhere the documented answers are
What happens if the process dies mid-run?Checkpoints or a workflow engine, and a resume path you have testedLangGraph checkpoints; Pydantic AI with Temporal, DBOS or Prefect; Mastra suspend/resume; Microsoft Agent Framework checkpointing; Agno AgentOS
Can a human approve a risky action?Built-in approval or pause points, not a custom queueLangGraph human-in-the-loop; OpenAI Agents SDK human-in-the-loop; Claude Agent SDK permissions and hooks; Pydantic AI tool approval; Agno approvals
Can you see every model call and tool call?OpenTelemetry export or a vendor tracerPydantic AI (OpenTelemetry, Logfire); Microsoft Agent Framework (OpenTelemetry); OpenAI Agents SDK tracing; LangSmith; Google Cloud Trace for ADK
Is model-written code or shell access isolated?A real sandbox with limited credentialsOpenAI Agents SDK sandbox agents; smolagents with E2B, Blaxel, Modal or Docker; Claude Agent SDK permissions
Can you swap the model provider?A provider-neutral model layerGoogle ADK, Pydantic AI and Microsoft Agent Framework list many providers; the Claude Agent SDK is built around Claude
Which license and terms apply to what you ship?OSS license plus any service termsMIT, Apache-2.0, Mastra ee/ license, Anthropic Commercial Terms for the Claude Agent SDK

Two habits pay off across every framework. First, keep the number of tools small and their descriptions precise, because every framework here (LlamaIndex says so explicitly) relies on tool names, docstrings and type hints for the model to pick the right one. Second, write an evaluation set before you tune prompts. Pydantic Evals, adk eval and LangSmith evals all exist for this, and our observability and eval comparison goes deeper on the tooling.

Security deserves its own line. An agent with shell, file or browser tools is a remote-code-execution surface driven by text. Run it with the least privilege that works, keep secrets out of the model's context, and use the permission systems the frameworks provide rather than a prompt that says “do not delete files”. If the agent executes generated code, follow the sandbox guidance in our sandboxes comparison.

Switching and Migration Notes

Frameworks in this space move fast, so plan for the possibility that you will change. A few facts make that cheaper. Microsoft's overview names Agent Framework as the direct successor to both Semantic Kernel and AutoGen and links migration guides for each, so teams on either should read those guides rather than start from scratch. LangChain's docs describe LangGraph as the runtime beneath LangChain agents and Deep Agents, which means moving from a high-level LangChain agent down to LangGraph is a change of abstraction level, not of ecosystem.

Google ADK states it works with almost any generative AI model, and Pydantic AI lets you swap models with a string, so the model layer is the easiest part to change in both. The hard part to move is anything stateful: checkpoints, sessions and memory stores are framework-specific, and a migration usually means replaying or abandoning in-flight runs. Keep your tools behind plain functions or MCP servers, since MCP is supported by most of the frameworks above, and your tool code survives a framework change with little edit.

Finally, pick a unit of change. If you are unsure between two frameworks, build one agent in each and keep the evaluation set the same. If the deciding factor is the language your team already writes, take that as a tie-breaker: Mastra and the Vercel AI SDK for TypeScript, Microsoft Agent Framework for .NET, Google ADK for Go, Java or Kotlin, and the Python-first group (LangGraph, Pydantic AI, CrewAI, LlamaIndex, Agno, smolagents) for everyone else. Choosing a framework your team can read at 2 a.m. matters more than a marginal feature difference.

Benchmarks and Independent Data

There is no neutral, widely accepted benchmark that ranks agent frameworks. Public leaderboards such as SWE-bench or GAIA measure a model plus its scaffold, so a framework result mixes model quality, prompts and tool design. I found no head-to-head benchmark from a neutral party that holds the model constant, and I did not run one. Treat any article that declares a framework “fastest” or “most accurate” without a reproducible harness as opinion.

The one independent signal I can offer is adoption data, which is public and dated. As of Nov 12, 2026 the GitHub star order is CrewAI (60,803), LlamaIndex (52,882), LangGraph (44,838), Agno (43,166), OpenAI Agents SDK Python (30,632), smolagents (30,327), Mastra (29,480), Vercel AI SDK (27,882), Google ADK Python (22,187), Pydantic AI (21,160), Microsoft Agent Framework (14,643) and Claude Agent SDK Python (8,528). Stars measure attention, not quality, and repositories of different ages are not comparable. Release recency is a better health signal: most repositories shipped within the last four weeks, while LlamaIndex (Sep 21) and smolagents (May 29) are quieter.

How to Choose

If you needChooseReason
You want explicit control over state, retries and human approvalLangGraphYou write the graph, so every transition is visible and resumable.
You are on OpenAI models and want the shortest path to handoffs and guardrailsOpenAI Agents SDKSmall API surface; tracing included.
You are building a coding, file or terminal agentClaude Agent SDKBuilt-in Read, Write, Edit and Bash tools plus permissions.
You deploy on Google Cloud or need Go, Java or KotlinGoogle ADKThe widest language list in this comparison.
Your company runs on .NET or AzureMicrosoft Agent FrameworkFirst-party .NET SDK and Foundry integration.
You want validated, typed outputs and runs that survive restartsPydantic AIStructured outputs plus durable-execution engines.
Your team writes TypeScript end to endMastra or Vercel AI SDKMastra for full framework; AI SDK for a lighter toolkit.
You need a quick role-based multi-agent demoCrewAICrew and task abstractions are quick to read.
Your agent is mostly RAG over documentsLlamaIndexIts core strength is data and retrieval.
You want agents to act through generated PythonsmolagentsCodeAgent writes actions as code.
You want a runtime and API for agents, not just a libraryAgnoAgentOS packages serving, auth and scheduling.

A practical way to decide is to build the same small task in your top two candidates: one tool call, one structured output, one forced crash mid-run. The framework whose recovery story you understand after an afternoon is usually the right one. Then choose where it runs from our agent hosting platforms guide, and decide how the agent remembers things with the agent memory tools comparison.

Common mistakes when picking a framework

The first mistake is choosing by star count. CrewAI leads this list with 60,803 stars, yet a stateful approval workflow may fit LangGraph or Microsoft Agent Framework better, and Claude Agent SDK (8,528) and Microsoft Agent Framework (14,643) have far fewer stars but are actively released. The second is treating a hello-world snippet as a proof of fit. Every snippet above runs a single model call; none of them demonstrates recovery, approvals or tracing, which are where the frameworks actually differ.

The third is ignoring terms and licenses. Most projects here are MIT or Apache-2.0, but Mastra's ee/ directories need a production license, and the Claude Agent SDK is governed by Anthropic's Commercial Terms of Service. The fourth is expecting one framework to do everything. A common, sensible stack uses one framework for the agent loop, a separate vector store or memory layer, an MCP server for tools, and an observability backend, each swappable. Keeping those seams clean is what makes a later migration survivable.

How We Evaluated

Stars, licenses and releases come from the GitHub API on Nov 12, 2026. Feature claims come from each project's README and official documentation, fetched the same day. Where a page did not mention a feature, the table says “not stated” instead of guessing. I did not run each framework in production, so strengths and weaknesses reflect documented capabilities, not load testing. Code snippets are taken or abridged from official pages, and the install commands appear exactly as published. There is no paid placement and no affiliate link in this ranking. Everything here is dated to Nov 12, 2026 and will drift; versions in particular change weekly.

FAQ

What is the best AI agent framework in 2026?

There is no single winner, because the frameworks optimize for different things. LangGraph is the usual choice when you need explicit state, durable execution and human approval. The OpenAI Agents SDK is the quickest path on OpenAI models, the Claude Agent SDK suits coding and file-system agents, Google ADK covers the most languages, and Microsoft Agent Framework fits .NET and Azure teams. Pick by your language, your model provider and how much control you need over the loop.

LangGraph vs CrewAI: which should I use?

LangGraph is a low-level runtime where you define state, nodes and edges, which gives you control over retries, checkpoints and human-in-the-loop steps. CrewAI starts from role-based agents grouped into Crews, with event-driven Flows for precise control. CrewAI is faster to read and prototype; LangGraph asks for more design up front and pays that back in production debugging. Both are MIT licensed as of Nov 12, 2026.

Do I need a framework at all, or can I call the model API directly?

Microsoft's own docs say it plainly: if you can write a function to handle the task, do that instead of using an AI agent. A framework earns its place when you need tool loops, structured outputs, state persistence across restarts, tracing, or multi-agent handoffs. For a single model call with one or two tools, the provider's client SDK is usually enough.

Which frameworks support MCP and A2A?

MCP support is documented for the OpenAI Agents SDK, Claude Agent SDK, Google ADK, Pydantic AI, Mastra (server authoring), Microsoft Agent Framework (MCP clients), Agno (AgentOS MCP server) and smolagents. A2A is documented for Google ADK and appears in Microsoft Agent Framework hosting samples, and CrewAI's README lists MCP/A2A support. For the rest, A2A is not stated in the pages I fetched, so check the current docs before you depend on it.

Which framework is best for TypeScript?

Mastra and the Vercel AI SDK are TypeScript-first. Mastra is a full framework with agents, graph workflows, memory, evals and suspend/resume. The AI SDK offers ToolLoopAgent plus provider-agnostic model calls and points to eve for durable agents. The OpenAI Agents SDK, Claude Agent SDK and Google ADK also ship TypeScript versions.

Which frameworks are fully open source?

LangGraph, CrewAI, Microsoft Agent Framework, Pydantic AI, LlamaIndex and the OpenAI Agents SDK are MIT. Google ADK, Agno, smolagents and the Vercel AI SDK use Apache 2.0. Mastra's core is Apache 2.0 but code under ee/ directories needs a Mastra Enterprise License for production. The Claude Agent SDK is governed by Anthropic's Commercial Terms of Service, even though GitHub lists MIT on the Python repo. Hosted layers such as LangSmith, CrewAI AMP and Agno AgentOS are separate products.

Can I use these frameworks with models from other providers?

Mostly yes. Google ADK's docs list Gemini, Gemma, Claude, OpenAI, Ollama, vLLM and LiteLLM. Pydantic AI says it supports virtually every major provider. Microsoft Agent Framework supports Foundry, Anthropic, Azure OpenAI, OpenAI and Ollama. The OpenAI Agents SDK defaults to the Responses API for OpenAI models, and its docs mention non-OpenAI providers without detail. The Claude Agent SDK is built around Claude.

How do I add durability so an agent survives a crash?

Use a framework with checkpointing or a workflow engine. LangGraph persists state at checkpoints and resumes after failure. Pydantic AI integrates Temporal, DBOS, Prefect, Restate and others. Microsoft Agent Framework and Mastra provide checkpointing and suspend/resume, and Agno's AgentOS lists durable execution. Test it by killing the process mid-run and resuming from stored state.

Where do I host and observe the agent after I build it?

A framework is only the code layer. For deployment options see our guide to AI agent hosting platforms, and for tracing and evals see the observability and eval tools comparison, both linked in this article. Several frameworks ship their own path: LangSmith Deployment for LangGraph, Google Cloud Run or Agent Runtime for ADK, and AgentOS for Agno.

Sources

All fetched on Nov 12, 2026.