Agent SDKs Compared: OpenAI, Claude, Google ADK and More
An agent SDK runs the loop for you: call the model, run the tools it picks, feed results back, repeat. Nine are worth a look in October 2026. Below: a quick pick, a side-by-side table, a minimal snippet from each project's own docs, and when not to use each one. Every version and feature links to an official source.
Published Last verified
Quick pick
- OpenAI Agents SDK if you want the simplest multi-agent loop in Python or TypeScript, with handoffs, guardrails and tracing built in.
- Claude Agent SDK if your agent works on files and shells (code review, ops, research reports) and Claude is your model.
- Google ADK if you're on Google Cloud or Gemini, or you need Go, Java or Kotlin.
- Microsoft Agent Framework if you build in .NET or Azure, or you're moving off Semantic Kernel or AutoGen.
- LangGraph if you need durable, resumable workflows with human approval steps.
- CrewAI if you want a role-based team of agents running quickly in Python.
- Vercel AI SDK if you're adding an agent and a streaming chat UI to a Next.js app.
- Mastra if you want agents, workflows, memory and guardrails in one TypeScript framework.
- Pydantic AI if you want typed, validated outputs and testable agents in Python.
Not sure? Start with one agent and a few tools in the SDK that matches your language and model. Move to a graph or workflow framework only when you need saved state or approvals.
Comparison table
Versions are the latest release on each package registry on 19 Oct 2026. Each SDK's section below links the source for every cell.
OpenAI Agents SDK
OpenAI · 0.24.0 · 0.20.0
- Languages
- Python, TypeScript
- Licence
- MIT
- Models
- OpenAI by default; other providers via LiteLLM and Any-LLM adapters
- Multi-agent
- Handoffs and agents as tools
- MCP
- Yes
- Tracing
- Built in, on by default
- State / memory
- Sessions
- Guardrails
- Input/output guardrails, human in the loop
- Hosted option
- Library; OpenAI's Agents API is the managed option
Claude Agent SDK
Anthropic · 0.2.168 · 0.3.303
- Languages
- Python, TypeScript
- Licence
- Python: MIT. TypeScript: Anthropic Commercial Terms
- Models
- Claude only (API, Bedrock, Google Cloud, Foundry)
- Multi-agent
- Subagents
- MCP
- Yes
- Tracing
- OpenTelemetry export
- State / memory
- Sessions (resume, fork)
- Guardrails
- Permissions and hooks
- Hosted option
- Library; Claude Managed Agents is the hosted option
Google Agent Development Kit (ADK)
Google · 2.12.0 · 2.3.0 · v2.6.0 · v1.12.0
- Languages
- Python, TypeScript, Go, Java, Kotlin
- Licence
- Apache-2.0
- Models
- Gemini first; adapters for other providers and local models
- Multi-agent
- Multi-agent and graph workflows (ADK 2.0)
- MCP
- Yes (McpToolset)
- Tracing
- Logging, metrics, traces
- State / memory
- Sessions and memory
- Guardrails
- Safety guide, action confirmations
- Hosted option
- Agent Runtime, Cloud Run or GKE on Google Cloud
Microsoft Agent Framework
Microsoft · 1.22.0 · 1.25.0
- Languages
- Python, .NET (C#); Go in preview
- Licence
- MIT
- Models
- Microsoft Foundry, Azure OpenAI, OpenAI, Anthropic, Ollama and more
- Multi-agent
- Graph-based and functional workflows
- MCP
- Yes (hosted and local)
- Tracing
- OpenTelemetry (GenAI conventions)
- State / memory
- Agent sessions, context providers
- Guardrails
- Middleware, tool approval
- Hosted option
- Not verified
LangGraph
LangChain · 1.2.16 · 1.5.1
- Languages
- Python, JS/TS
- Licence
- MIT
- Models
- Any, via LangChain integrations or your own calls
- Multi-agent
- Graphs and subgraphs
- MCP
- Via LangChain MCP adapter (beta)
- Tracing
- LangSmith
- State / memory
- Checkpoints, short and long-term memory
- Guardrails
- Human-in-the-loop interrupts
- Hosted option
- LangSmith Deployment
CrewAI
CrewAI · 1.15.28
- Languages
- Python
- Licence
- MIT
- Models
- Multiple providers via their native SDKs
- Multi-agent
- Role-based crews inside Flows
- MCP
- Yes (MCP servers as tools)
- Tracing
- CrewAI Tracing
- State / memory
- Flow state, memory
- Guardrails
- Task guardrails
- Hosted option
- CrewAI AMP
Vercel AI SDK
Vercel · 7.0.143
- Languages
- TypeScript
- Licence
- Apache-2.0
- Models
- Many providers behind one API
- Multi-agent
- Subagents
- MCP
- Yes
- Tracing
- OpenTelemetry (@ai-sdk/otel)
- State / memory
- Runtime context; you store history
- Guardrails
- Tool approval (needsApproval)
- Hosted option
- Library; you deploy it
Mastra
Mastra · 1.78.0
- Languages
- TypeScript
- Licence
- Apache-2.0 (ee/ folders excepted)
- Models
- Many providers via provider/model strings
- Multi-agent
- Subagents and workflows
- MCP
- Yes
- Tracing
- Built-in traces
- State / memory
- Memory
- Guardrails
- Processors (PII, prompt injection, moderation)
- Hosted option
- Mastra platform (Server, Observability, Studio)
Pydantic AI
Pydantic · 2.57.0
- Languages
- Python
- Licence
- MIT
- Models
- Virtually any provider, swapped by string
- Multi-agent
- Sub-agents and delegation
- MCP
- Yes
- Tracing
- OpenTelemetry; Logfire
- State / memory
- Durable execution (Temporal, DBOS, Prefect and more)
- Guardrails
- Validated outputs; guardrails in Harness
- Hosted option
- Library; runs on your durable engine
OpenAI Agents SDK
OpenAIPython, TypeScriptMIT
OpenAI's open-source framework for multi-agent workflows. It keeps the set of primitives small: agents with instructions and tools, handoffs, guardrails, sessions and tracing. Newer releases add sandbox agents and realtime voice agents.
Best for: Teams that want a small, readable agent loop in Python or TypeScript, especially if they already use OpenAI models.
Standout features
- Handoffs make triage-to-specialist routing a one-liner.
- Guardrails run alongside the agent and can stop a run early.
- Tracing is on by default and shows every model call, tool call and handoff.
- Sessions store conversation history for you.
Limits
- Traces go to OpenAI's dashboard by default; turn tracing off or export elsewhere if that matters.
- Non-OpenAI models go through adapters, and OpenAI-hosted tools need OpenAI models.
Skip it if you need durable, resumable graph workflows with checkpoints (look at LangGraph) or you want OpenAI to host the whole loop (look at OpenAI's Agents API).
Minimal agent (python)
import asyncio
from agents import Agent, Runner
agent = Agent(
name="History tutor",
instructions="You answer history questions clearly and concisely.",
model="gpt-6-astra",
)
async def main() -> None:
result = await Runner.run(agent, "When did the Roman Empire fall?")
print(result.final_output)
if __name__ == "__main__":
asyncio.run(main())From the official quickstart (pip install openai-agents). Source: OpenAI Agents SDK quickstart (opens in new tab)
Claude Agent SDK
AnthropicPython, TypeScriptPython: MIT. TypeScript: Anthropic Commercial Terms
The agent loop, built-in tools and context management behind Claude Code, packaged as a library. It runs a bundled Claude Code binary, so your agent can read and edit files, run commands and search the web without you writing those tools.
Best for: Agents that work on files and shells: code review in CI, ops bots, research agents that write reports.
Standout features
- Built-in Read, Edit, Bash, Glob, Grep and WebSearch tools.
- Permission modes and allow/deny rules decide what runs without approval.
- Hooks run your code before or after tool calls.
- Loads skills, commands and memory from .claude/, like Claude Code.
Limits
- Claude models only.
- Third-party products can't use claude.ai login; use an API key or a cloud provider.
- The TypeScript SDK is under Anthropic's Commercial Terms, not an open-source licence.
Skip it if you need to switch model vendors, or your agent is a chat feature that never touches files or a shell.
Minimal agent (python)
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions, ResultMessage
async def main():
async for message in query(
prompt="Review utils.py for bugs that would cause crashes. Fix any issues you find.",
options=ClaudeAgentOptions(
allowed_tools=["Read", "Edit", "Glob"], # Auto-approve these tools
permission_mode="acceptEdits", # Auto-approve file edits
),
):
if isinstance(message, ResultMessage):
print(f"Done: {message.subtype}")
asyncio.run(main())Trimmed from the official quickstart (pip install claude-agent-sdk). Source: Claude Agent SDK quickstart (opens in new tab)
Google Agent Development Kit (ADK)
GooglePython, TypeScript, Go, Java, KotlinApache-2.0
Google's open-source framework for building, evaluating and deploying agents. It covers more languages than any other SDK here, and ADK 2.0 added graph-based workflows with explicit execution paths.
Best for: Teams on Google Cloud or Gemini, and mixed-language teams (Go, Java, Kotlin) that want one framework.
Standout features
- Five languages from one project.
- Built-in evaluation, user simulation and a local dev UI (adk web).
- One-command deploy to Google Cloud, with Cloud Trace observability.
- Context management that filters and summarises older turns.
Limits
- The adk web UI is for development only, not production.
- The managed deployment and tracing story is strongest on Google Cloud.
Skip it if you want the smallest possible library, or your stack is Next.js-first (the Vercel AI SDK or Mastra fit better).
Minimal agent (python)
from google.adk.agents.llm_agent import Agent
# Mock tool implementation
def get_current_time(city: str) -> dict:
"""Returns the current time in a specified city."""
return {"status": "success", "city": city, "time": "10:30 AM"}
root_agent = Agent(
model='gemini-flash-latest',
name='root_agent',
description="Tells the current time in a specified city.",
instruction="You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool for this purpose.",
tools=[get_current_time],
)From the official Python quickstart (pip install google-adk; run with adk run my_agent). Source: ADK Python quickstart (opens in new tab)
Microsoft Agent Framework
MicrosoftPython, .NET (C#); Go in previewMIT
Microsoft's agent framework and the direct successor to Semantic Kernel and AutoGen, built by the same teams. It pairs simple agents with graph-based workflows, sessions, middleware and telemetry.
Best for: .NET shops and teams standardised on Azure or Microsoft Foundry, plus anyone migrating from Semantic Kernel or AutoGen.
Standout features
- First-class C# and Python.
- Workflows give explicit control over multi-agent execution order.
- A batteries-included Harness Agent for long, multi-step tasks.
- Official migration guides from Semantic Kernel and AutoGen.
Limits
- Go support is in public preview with missing features.
- The quickstarts assume Azure credentials and a Foundry project.
Skip it if you have no Microsoft or Azure footprint and work in TypeScript.
Minimal agent (python)
import asyncio
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.",
)
async def main():
result = await agent.run("What is the largest city in France?")
print(f"Agent: {result}")
asyncio.run(main())Adapted from the official overview (pip install agent-framework); the two doc snippets are joined in one async main. Source: Agent Framework overview (opens in new tab)
LangGraph
LangChainPython, JS/TSMIT
A low-level orchestration runtime for long-running, stateful agents. You model the work as a graph of nodes and edges, mixing hand-coded steps with LLM-driven ones. It doesn't require LangChain.
Best for: Production agents that must pause for approval, survive failures and resume where they left off.
Standout features
- Durable execution with checkpointed state.
- Interrupts let a human inspect and edit state mid-run.
- Deterministic and agentic steps in the same graph.
- LangSmith tracing with one environment variable.
Limits
- Low-level by design: more code than the other SDKs here.
- LangChain's own docs suggest its higher-level agents if you're just starting.
Skip it if a single agent with a few tools does the job; the graph is overhead you won't use.
Minimal agent (python)
from langgraph.graph import StateGraph, MessagesState, START, END
def mock_llm(state: MessagesState):
return {"messages": [{"role": "ai", "content": "hello world"}]}
graph = StateGraph(MessagesState)
graph.add_node(mock_llm)
graph.add_edge(START, "mock_llm")
graph.add_edge("mock_llm", END)
graph = graph.compile()
graph.invoke({"messages": [{"role": "user", "content": "hi!"}]})Official hello world (pip install -U langgraph); uses a mock LLM node. Source: LangGraph overview (opens in new tab)
CrewAI
CrewAIPythonMIT
A Python framework built around two ideas: Flows, which own state and execution order, and Crews, which are teams of role-playing agents that a Flow hands a task to.
Best for: Research and content pipelines where a researcher, writer and reviewer split the work.
Standout features
- Readable role, goal and backstory agent definitions.
- Flows add event-driven steps, branching and persisted state.
- Task guardrails validate or transform outputs.
- crewai deploy pushes a project to AMP.
Limits
- Python only (3.10 to 3.13 per PyPI).
- Multi-agent crews are easy to over-build; one agent is often enough.
Skip it if your task is a single tool loop, or you need TypeScript.
Minimal agent (python)
from crewai import Agent
from crewai_tools import SerperDevTool
researcher = Agent(
role="AI Technology Researcher",
goal="Research the latest AI developments",
tools=[SerperDevTool()],
verbose=True,
)
# Use kickoff() to interact directly with the agent
result = researcher.kickoff("What are the latest developments in language models?")
print(result.raw)From the official Agents docs (pip install crewai crewai-tools; needs SERPER_API_KEY). Source: CrewAI Agents: kickoff() (opens in new tab)
Vercel AI SDK
VercelTypeScriptApache-2.0
Vercel's TypeScript toolkit for A.I. apps and agents. AI SDK Core gives one API across model providers, ToolLoopAgent runs the tool loop, and AI SDK UI streams results into React, Next.js, Vue or Svelte.
Best for: Product teams adding an agent to a Next.js or Node app with a streaming chat UI.
Standout features
- Swap providers without rewriting code.
- UI hooks stream agent output straight into your frontend.
- HarnessAgent can drive Claude Code, Codex or Pi through the same stream primitives.
- MCP tools and OpenTelemetry built in.
Limits
- TypeScript only.
- Durable state and long-running orchestration are yours to build.
Skip it if your backend is Python, or you need checkpointed, resumable workflows out of the box.
Minimal agent (ts)
import { ToolLoopAgent, tool } from 'ai';
import { z } from 'zod';
const weatherAgent = new ToolLoopAgent({
model: "anthropic/claude-sonnet-5.5",
tools: {
weather: tool({
description: 'Get the weather in a location (in Fahrenheit)',
inputSchema: z.object({
location: z.string().describe('The location to get the weather for'),
}),
execute: async ({ location }) => ({
location,
temperature: 72 + Math.floor(Math.random() * 21) - 10,
}),
}),
},
});
const result = await weatherAgent.generate({
prompt: 'What is the weather in San Francisco?',
});
console.log(result.text);Trimmed from the official Agents overview (npm install ai zod). Source: AI SDK Agents overview (opens in new tab)
Mastra
MastraTypeScriptApache-2.0 (ee/ folders excepted)
A TypeScript framework for agents and A.I. apps: agents with typed tools, workflows, memory, guardrail processors, traces and a local Studio UI, in one package.
Best for: TypeScript teams that want agents, workflows and memory in one framework next to their web app.
Standout features
- npm create mastra@latest scaffolds a working agent harness.
- Built-in guardrail processors for PII, prompt injection and moderation.
- Studio for testing agents and inspecting traces locally.
- Integration guides for Next.js, Vite, Astro, Express, SvelteKit and Hono.
Limits
- TypeScript only; needs Node.js 22.13 or later (or Bun, Deno, Cloudflare).
- Enterprise features in ee/ folders are under a separate licence.
Skip it if you only need a tool loop inside an existing Next.js route (the Vercel AI SDK is lighter), or your team works in Python.
Minimal agent (ts)
import { Agent } from '@mastra/core/agent'
export const weatherAgent = new Agent({
id: 'weather-agent',
name: 'Weather Agent',
instructions: 'You are a helpful weather assistant that provides accurate weather information.',
// Use a string in provider/model format
model: 'openai/gpt-5.6-sol',
})
const response = await weatherAgent.generate('Weather in SF')
console.log(response.text)From the official Get started page (npm install @mastra/core zod); tools omitted. Source: Mastra: Get started (opens in new tab)
Pydantic AI
PydanticPythonMIT
A typed Python agent framework from the Pydantic team. Tools, dependencies and outputs are typed, so every run returns validated data, and agents can run under durable execution engines.
Best for: Python teams that want structured, validated outputs and agents they can unit-test.
Standout features
- output_type guarantees a validated Pydantic model back.
- Typed dependency injection makes tools easy to test.
- Durable execution on Temporal, DBOS, Prefect and others.
- A built-in offline test model, so you can try it without an API key.
Limits
- Python only (3.11+ per PyPI).
- Multi-agent patterns are less opinionated; you compose them yourself.
Skip it if you want a prebuilt role-based multi-agent setup (CrewAI) or you work in TypeScript.
Minimal agent (python)
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)From the official docs home (pip install pydantic-ai). Source: Pydantic AI docs (opens in new tab)
How to choose
- Start with your language. Python only: CrewAI or Pydantic AI. TypeScript only: the Vercel AI SDK or Mastra. Both: the OpenAI Agents SDK, Claude Agent SDK, Google ADK or LangGraph. C#: Microsoft Agent Framework. Go, Java or Kotlin: Google ADK.
- Then your model and cloud. The Claude Agent SDK runs Claude only. Google ADK and Microsoft Agent Framework work with other models but fit best on Google Cloud and Azure. The rest are model-flexible.
- Then how much state you need. A chat feature with a few tools needs a simple loop. Work that runs for hours, waits for approval or must survive a restart needs checkpoints or durable execution: LangGraph, Pydantic AI on a durable engine, or a hosted runtime.
- Pick the simplest pattern that works. One agent with good tools beats a crew of five most of the time. See Building effective agents for the patterns.
- Add tracing from day one. Every SDK here has tracing built in or exports OpenTelemetry. If you want one place for traces across frameworks, see Langfuse.
FAQ
What is an agent SDK?
A library that runs the agent loop for you: it sends your instructions to a model, calls the tools the model picks, feeds the results back and repeats until the task is done. Most also handle multi-agent handoffs, memory or sessions, tracing and safety checks.
Is the OpenAI Agents SDK free and open source?
Yes. The Python and TypeScript SDKs are MIT-licensed on GitHub. You pay only for the model calls you make. It also works with non-OpenAI models through the LiteLLM and Any-LLM adapters.
What's the difference between the OpenAI Agents SDK and the Agents API?
The Agents SDK runs inside your application, so you own deployment, tools, storage and approvals. OpenAI's Agents API runs a managed harness in OpenAI's service, which saves progress for long-running tasks.
OpenAI Agents SDK or Claude Agent SDK?
Pick the OpenAI Agents SDK for a model-flexible, lightweight loop with handoffs and guardrails that you control. Pick the Claude Agent SDK when the agent needs Claude Code's built-in file, shell and web tools, permissions and hooks, and you're happy to use Claude models only.
Which agent SDKs support MCP?
All nine SDKs on this page can use MCP servers as tools. In LangGraph it comes through LangChain's MCP adapter, which is in beta.
Which agent SDK is best for TypeScript?
The Vercel AI SDK if you mainly need a tool loop and a streaming UI in a Next.js or Node app. Mastra if you want agents, workflows, memory and guardrails in one framework. The OpenAI Agents SDK, Claude Agent SDK, Google ADK and LangGraph also ship TypeScript packages.
What replaced Semantic Kernel and AutoGen?
Microsoft Agent Framework. Microsoft describes it as the direct successor to both, built by the same teams, and AutoGen's GitHub README says AutoGen is in maintenance mode.
Do I need an agent SDK at all?
Not always. If one model call with a couple of tools does the job, the provider's normal API is simpler. Use an SDK once you need a loop of tool calls, handoffs between agents, saved state, approvals or traces.
How we checked
Versions and dates come from PyPI, npm, NuGet and GitHub releases. Features, licences and snippets come from each project's own docs and repositories. No benchmarks or prices are claimed. Last verified .
Not yet verified
- Google Agent Development Kit (ADK): The latest Kotlin release number wasn't checked.
- Microsoft Agent Framework: Whether there is a dedicated hosted runtime for Agent Framework agents wasn't confirmed.
- Mastra: The snippet calls the agent directly; the docs register it on a Mastra instance first and fetch it by id.
Newsletter
Practical discoveries, without the noise.
The best new agent workflows and tools we've vetted, with a clear verdict on each. Short, occasional, useful.