Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Comparison

Agent frameworks compared: Claude Agent SDK, OpenAI Agents SDK, LangGraph, Pydantic AI, Mastra, Google ADK

Six agent frameworks on one fixed table: language, durable execution, tracing, MCP support and lock-in, with notes on which kind of project each one fits.

By 6 min read
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

There are dozens of agent frameworks. Six cover most of what we see teams choose in late 2026: Anthropic’s Claude Agent SDK, OpenAI’s Agents SDK, LangGraph, Pydantic AI, Mastra and Google’s Agent Development Kit (ADK). They overlap a lot. Every one can run a model in a loop with tools. They differ in what they assume about your models, your language, how long your agents run and how much structure you want.

The short answer: there is no single best agent framework. Fix your language first, which narrows six to two or three. For agents that run seconds to a minute, any framework will do, or none. For long runs with approvals and retries, look at LangGraph, Pydantic AI with a durable engine, or Mastra workflows.

This page compares them on five fixed questions, using each project’s documentation and repository as of 20 November 2026. It is not a ranking. The right choice depends on the job.

Before you pick one

Two questions decide more than the framework does:

  1. Do you need an agent at all? Many features are better as a fixed workflow of LLM calls. Workflows vs agents covers how to tell.
  2. Could you write the loop yourself? A basic agent loop is about forty lines with any provider’s SDK, as our first agent tutorials show. A framework earns its place when you need what it adds: durability, multi-agent orchestration, tracing, deployment, a UI.

The table

Claude Agent SDK OpenAI Agents SDK LangGraph Pydantic AI Mastra Google ADK
Languages Python, TypeScript Python (JS/TS port available) Python, JavaScript/TypeScript Python TypeScript Python, Java, Go, TypeScript
Model support Claude only (Anthropic API, Bedrock, Google Cloud, Microsoft Foundry) OpenAI by default; other providers through adapters (LiteLLM, Any-LLM) Any, through LangChain integrations Many providers, model swap by string, fallbacks Many providers via provider/model strings Optimised for Gemini; model-agnostic
Durable execution Sessions you can resume or fork; no workflow engine Sessions for conversation memory; no built-in durable engine Built in: checkpointing, resume after failure, human-in-the-loop interrupts Through integrations: Temporal, DBOS, Prefect and others Workflows with suspend and resume, backed by storage Session and state services; deploy to managed runtimes
Tracing OpenTelemetry metrics and events as in Claude Code, plus hooks; bring your own trace backend Built-in tracing, viewable in OpenAI’s dashboard LangSmith (deepest integration) OpenTelemetry instrumentation; Logfire or any OTel backend Built-in tracing (observability module) Built-in dev UI traces, telemetry integrations
MCP Native, same as Claude Code Built-in MCP tool integration Through adapters MCP client support MCP client and server MCP tools supported
Licence Python: MIT; TypeScript: Anthropic Commercial Terms MIT MIT MIT Apache-2.0 (enterprise folders separate) Apache-2.0
Lock-in High (model vendor) Medium (defaults favour OpenAI) Medium (graph model, LangSmith pull) Low Low to medium Medium (Google Cloud deployment path)

The frameworks, briefly

Claude Agent SDK

The SDK is Claude Code as a library: the same agent loop, built-in tools (read, edit, run commands, web search), permissions, hooks, subagents, skills, MCP and sessions, driven from Python or TypeScript. It is the fastest route to an agent that works on files and runs commands, because you inherit a harness that has been used heavily for coding.

The trade-off is that it runs Claude models only, and the TypeScript package is under Anthropic’s commercial terms rather than an open-source licence. Choose it for coding, document and operations agents where you are happy on Claude and want a capable harness rather than a toolkit. Anthropic also offers Managed Agents, which host the same kind of loop for you.

OpenAI Agents SDK

A small, Python-first framework built around a few primitives: agents, handoffs between agents, guardrails that run alongside the agent, and sessions for memory. Tracing is built in and shows up in OpenAI’s platform. MCP servers plug in as tools. Non-OpenAI models work through adapters.

Choose it for a straightforward multi-agent design (a triage agent handing off to specialists, say) when you want very little framework and are mainly on OpenAI models. Our Python agent tutorial uses it.

LangGraph

LangGraph models an agent as a graph of steps with explicit state. That is more upfront design than the others, and it pays off for long-running, multi-step processes: checkpointing means a run can stop, survive a crash or wait for a human approval, and resume exactly where it left off. It has Python and JavaScript versions, integrates with everything in the LangChain ecosystem, and pairs with LangSmith for tracing and deployment.

Choose it when control flow matters: approvals, retries, branching, agents that run for hours, or several agents with defined responsibilities.

Pydantic AI

From the Pydantic team: a typed agent loop where tool arguments and outputs are validated Pydantic models, any supported model is a string swap away, and instrumentation is plain OpenTelemetry. Durable execution comes through integrations (Temporal, DBOS, Prefect and more), so you pick the engine.

Choose it for Python services where type safety and testability matter, and when you want to stay provider-neutral. It is the least opinionated of the six about the rest of your stack.

Mastra

A TypeScript framework with agents, graph-style workflows that can suspend and resume, memory, RAG helpers, evals, tracing and a local studio UI. It can act as both an MCP client and an MCP server, and it has guides for common web frameworks (Next.js, Astro, Hono and others).

Choose it when your team and product are TypeScript and you want batteries included without moving to Python. The core is Apache-2.0; some enterprise features live in separately licensed folders.

Google ADK

Google’s Agent Development Kit has the broadest language support here (Python, Java, Go and TypeScript), multi-agent composition, evaluation tooling and a dev UI. It is tuned for Gemini but works with other models, and has a direct path to deployment on Google Cloud.

Choose it if you are on Google Cloud, need Java or Go, or want Google’s managed agent runtime. Its documentation moved to adk.dev in 2026.

How to choose, in practice

  1. Fix the language. That alone narrows six to two or three.
  2. Decide how long agents run. Seconds to a minute: any framework, or none. Minutes to days with approvals and retries: LangGraph, Pydantic AI with a durable engine, or Mastra workflows.
  3. Decide how committed you are to one model vendor. Fully committed: the vendor’s SDK gives you the most out of the box. Hedging: Pydantic AI, Mastra or LangGraph.
  4. Check tracing fits your stack. If you already run an OpenTelemetry backend, prefer frameworks that emit OTel natively. LLM observability platforms compared covers the backends.
  5. Build the same small agent in your top two. A day each. Look at how easy it is to test, to see what happened in a failed run, and to change one step without rewriting the rest.

What we would avoid

  • Choosing on GitHub stars or launch-week excitement. Maintenance, documentation and how failures look in your traces matter more.
  • Adopting a multi-agent framework for a single-agent problem.
  • Mixing two frameworks in one service. Pick one per service and use MCP or plain HTTP between services.

Next steps

Covers

Back to top