Which agent framework should you use? 14 SDKs and the hosted agent APIs compared on lock-in, durability and price
OpenAI Agents SDK, Claude Agent SDK, Pydantic AI, Google ADK, LangGraph, Mastra, the Vercel AI SDK and seven more, next to the hosted agent APIs from OpenAI, Anthropic, AWS, Google and Microsoft. What each is for, where the lock-in hides, what the hosted ones cost per hour and per tool call, and rules for picking one.
Building an agent starts with a choice that’s hard to undo: write the loop yourself on a model API, pick an open-source framework, or rent a loop the vendor runs for you. Each lab now sells all three. OpenAI has the Responses API, the open-source Agents SDK and, since September, a hosted Agents API. Anthropic has the Messages API, the Claude Agent SDK and Claude Managed Agents. AWS, Google and Microsoft each sell a framework, a runtime to host it and a managed loop.
The framework decides more than syntax. It decides which models you can switch to, where your traces go, whether a crashed run resumes, and how much a move to another cloud would cost. The ground is moving, too: OpenAI’s Agent Builder shuts down on 30 November, AutoGen’s README now says it is “archived and no longer maintained”, and AWS closed Bedrock Agents to new customers in July.
This guide compares 14 code frameworks you run yourself, then the hosted agent APIs and platforms, separately and like with like. Everything was read from each project’s docs, changelog, registry entry and pricing page on 16 October 2026. We didn’t run or benchmark any of them.
The short answer
- Python team that wants type safety: Pydantic AI. It validates tool arguments and output against Pydantic models, sends validation errors back to the model to retry, swaps providers with a string, and runs durably on Temporal, DBOS, Prefect and six other engines. MIT, stable V2 since June.
- TypeScript app: the Vercel AI SDK (
ToolLoopAgent) for an agent inside a web app; Mastra for workflows, memory, evals and an MCP server in one package. - Durable, long-running work: LangGraph, with first-party Postgres and SQLite checkpointers, or Pydantic AI, the OpenAI Agents SDK, Google ADK or the AI SDK on Temporal, DBOS or Restate. On Cloudflare, the Agents SDK builds on Durable Objects.
- Multi-agent systems: LangGraph or Google ADK 2.0 graphs; on .NET, Microsoft Agent Framework. No independent evidence shows one multi-agent design beating another on current models.
- Switching models freely: Pydantic AI, LangChain/LangGraph, Mastra, the AI SDK or Strands. The Claude Agent SDK runs only Claude, and the OpenAI SDK calls its other-provider adapters “best-effort, beta”.
- No infrastructure: a managed loop. Claude Managed Agents costs $0.08 per running session-hour plus tokens, sandbox included. OpenAI’s Agents API has no platform fee, but its default hosted sandbox costs about $0.36 an hour at container rates. The AgentCore harness has no harness fee, works with Bedrock, OpenAI, Gemini or any LiteLLM-compatible model, and bills AgentCore Runtime underneath (up to about $0.22 an hour at 2 vCPU / 4 GB with the CPU fully busy). Neither OpenAI’s nor Anthropic’s managed loop is eligible for zero data retention.
Three kinds of product: a library, a managed loop, or a runtime for your code
The products fall into three groups, and comparing across them is how comparisons go wrong.
- Code frameworks (SDKs). A library in your process. You host it and pay for tokens and your own compute: the OpenAI Agents SDK, Pydantic AI, LangGraph and the rest.
- Managed agent loops. You send configuration and messages, and the vendor runs the loop, tools, sandbox and session state: OpenAI’s Agents API, Claude Managed Agents, the AWS AgentCore harness, Microsoft Foundry’s prompt agents, Google’s managed agents (preview). Billed per session-hour, per tool call or not at all on top of tokens.
- Runtimes for your own agent code. You deploy framework code and the cloud runs it in isolated sessions: AWS AgentCore Runtime, Google’s Agent Runtime (formerly Vertex AI Agent Engine), Microsoft Foundry hosted agents, LangSmith Deployment, the Mastra platform. Billed per vCPU-hour and GB-hour, like the agent sandboxes we compared.
How do the agent frameworks compare?
The basics first. “Models” says whether a framework is built for one vendor’s models or treats providers equally. Versions and licences are from PyPI, npm and each repository on 16 October 2026.
| Framework | Languages | Models | Latest version (date) | Licence | Multi-agent style |
|---|---|---|---|---|---|
| OpenAI Agents SDK | Python, TypeScript | OpenAI first; any OpenAI-compatible endpoint, or LiteLLM and Any-LLM adapters (“best-effort, beta”) | 0.24.0 (15 Oct) | MIT | Handoffs, agents as tools |
| Claude Agent SDK | Python, TypeScript | Claude only (Anthropic API, Bedrock, Google Cloud, Foundry) | Python 0.2.168 (15 Oct) | Python wrapper MIT; TypeScript package and bundled CLI under Anthropic’s Commercial Terms | Subagents the model calls |
| Pydantic AI | Python | Any (dozens of providers by string) | 2.57.0 (16 Oct) | MIT | Delegation, hand-off, graphs |
| Google ADK | Python, TypeScript, Go, Java, Kotlin | Gemini first; others via LiteLLM (Python) or native wrappers | Python 2.12.0 (13 Oct) | Apache 2.0 | Graphs, sequential/parallel/loop agents, sub-agents, A2A |
| LangGraph and LangChain | Python, TypeScript | Any | LangGraph 1.2.16, LangChain 1.4.6 | MIT | Graphs; subagents, handoffs, router |
| Microsoft Agent Framework | Python, .NET (Go in preview) | Any (Foundry, Azure OpenAI, OpenAI, Anthropic, Bedrock, Gemini, Ollama) | Python 1.22.0, .NET 1.25.0 | MIT | Graph workflows: sequential, concurrent, handoff, group chat, Magentic-One |
| CrewAI | Python | Any (native for six providers, the rest via LiteLLM) | 1.15.28 (14 Oct) | MIT | Role-based crews, hierarchical manager, Flows |
| LlamaIndex Workflows | Python (TypeScript package last updated December 2025) | Any | Workflows 2.26.0; core 0.14.25 | MIT | Event-driven steps; agent handoff |
| smolagents | Python | Any | 1.26.0 (29 May) | Apache 2.0 | Manager agent with managed agents |
| Strands Agents | Python, TypeScript | Any; Bedrock is the default | Python 1.61.1 (15 Oct) | Apache 2.0 | Agents as tools, swarm, graph, workflow, A2A |
| Mastra | TypeScript | Any (model router) | 1.78.0 (15 Oct) | Apache 2.0 core; ee/ features source-available |
Subagents, workflows |
| Vercel AI SDK | TypeScript | Any; Vercel AI Gateway is the default provider for string model IDs | 7.0.143 (16 Oct) | Apache 2.0 | Subagents as tools |
| Cloudflare Agents SDK | TypeScript (Workers only) | Any | 0.28.1 (13 Oct) | MIT | Sub-agent RPC (Project Think harness) |
| Agno | Python | Any (30+ providers) | 3.1.4 (16 Oct) | Apache 2.0 | Teams, workflows |
The highlighted row is our pick for a typed Python agent, explained below. Not in the table: DSPy, which centres on optimising prompts and weights, with agent loops as one use, and Google’s Genkit, whose Agents API is in beta.
Then the parts that decide whether an agent survives production. “Durable execution” means a run resumes after the process dies. In the MCP column, “client” means the agent can use MCP servers’ tools and “server” means you can expose the agent as an MCP server.
| Framework | Structured output, and what happens when it doesn’t validate | Durable execution | Human approval | MCP | Tracing (where it goes) |
|---|---|---|---|---|---|
| OpenAI Agents SDK | output_type; raises an error, no retry (a fallback handler is optional) |
Temporal, DBOS, Restate, Dapr | needs_approval on tools |
Client | On by default, sent to OpenAI; unavailable under zero data retention |
| Claude Agent SDK | output_format; re-prompts on mismatch |
Session resume; Dapr via Diagrid (third-party); no Temporal or DBOS integration found | canUseTool callback, hooks |
Client | Opt-in OpenTelemetry (traces in beta) |
| Pydantic AI | output_type; retries with the validation error |
Nine engines, incl. Temporal, DBOS, Prefect | Deferred tools | Client | Opt-in OpenTelemetry |
| Google ADK | output_schema; with tools, reliable only on models that support both |
Built-in resume; Temporal, DBOS, Restate | Tool confirmation (experimental), graph input nodes | Client and server | OpenTelemetry |
| LangGraph / LangChain | response_format; retries with error feedback |
First-party checkpointers (Postgres, SQLite, MongoDB); Temporal plugin (preview) | interrupt(), middleware |
Client (beta); server via LangSmith Deployment | LangSmith; OpenTelemetry supported |
| Microsoft Agent Framework | response_format / RunAsync<T> |
Workflow checkpoints; Azure Durable Functions (preview) | Approvals in workflows | Client; server in Python | OpenTelemetry |
| CrewAI | output_pydantic per task; guardrails, if defined, retry 3 times by default |
Checkpoints (best-effort writes) | Decorator; webhooks Enterprise-only | Client; server via its platform | Opt-in, to CrewAI’s platform |
| LlamaIndex Workflows | output_cls (Pydantic) |
Manual snapshots; DBOS add-on | Input-required events | Client and server | OpenTelemetry package |
| smolagents | No typed output parameter found | None found | Callbacks only | Client | OpenTelemetry via OpenInference |
| Strands Agents | structured_output_model; retries with the error |
Temporal plugin (preview); experimental checkpoints | Interrupts | Client | OpenTelemetry |
| Mastra | structuredOutput (Zod and others) |
Durable agents; suspendable workflows | Tool suspension | Client and server | Own tracing, OpenTelemetry exporters |
| Vercel AI SDK | Output.object (Zod); throws NoObjectGeneratedError, no retry |
WorkflowAgent (Workflow DevKit, on Vercel or self-hosted); DBOS, Restate, Temporal (preview) |
toolApproval |
Client | OpenTelemetry (@ai-sdk/otel) |
| Cloudflare Agents SDK | From the harness you use (AI SDK, Think) | Durable Objects, fibers, Workflows | Workflow approvals | Client and server | Workers traces |
| Agno | output_schema; docs’ example checks the type itself |
Durable queue, off by default | requires_confirmation |
Client and server | OpenTelemetry, stored in your database |
Of these, only the OpenAI Agents SDK traces by default; the others send traces once you switch tracing on. “None found” means we searched the project’s docs and didn’t find the feature on 16 October 2026, not that it’s impossible to build.
How mature and popular is each framework?
Downloads count installs, including CI and dependencies of other packages, so treat them as a rough sign of how many people hit the same bugs, not as user counts. We list the package each project’s docs tell you to install. Release counts are stable releases since 16 July 2026, excluding pre-releases and dev builds.
| Framework | PyPI downloads, last month | npm downloads, last month | Stable releases in 3 months | Stability promise |
|---|---|---|---|---|
| LangChain | 170.5M (langchain) |
13.5M (langchain) |
12 / 14 | 1.x; no breaking minors |
| Vercel AI SDK | — | 126.5M (ai) |
243 across the v5–v7 lines (106 on v7) | A major about every six months (v7 June 2026) |
| Claude Agent SDK | 29.8M | 51.9M | 48 / 79 | 0.x; Python marked alpha |
| LangGraph | 44.8M | 16.2M | 7 / 16 | 1.x since October 2025 |
| Strands Agents | 37.1M | 2.4M | 20 / 14 | Semantic versioning |
| OpenAI Agents SDK | 12.4M | 9.1M | 15 / 14 | 0.x; minor versions may break |
| Google ADK | 10.1M | 1.3M | 19 / 8 | 2.0 since May 2026 |
| Mastra | — | 8.5M | 30 | 1.x since January 2026 |
| Cloudflare Agents SDK | — | 8.5M (agents) |
13 | 0.x; minor versions may break |
| Pydantic AI | 5.4M (pydantic-ai; 23.9M for pydantic-ai-slim, which it installs) |
— | 59 | V2 since June 2026; no breaking minors |
| LlamaIndex Workflows | 4.8M (llama-index-workflows) |
0.6M (llamaindex) |
8 (PyPI) | Workflows 2.x; core still 0.x |
| CrewAI | 2.4M | — | 26, plus near-daily dev builds | 1.x; no published version policy found |
| Agno | 1.8M | — | 27 | Three major versions in 19 months |
| Microsoft Agent Framework | 0.19M (agent-framework; 1.0M for agent-framework-core) |
— (.NET is on NuGet) | 12 (PyPI) | 1.0 since April 2026 |
| smolagents | 0.4M | — | 0 | No release since 29 May 2026 |
Where a row has two release counts, the first is PyPI and the second npm. A dash means the project publishes no package on that registry. Downloads are from pypistats.org and api.npmjs.org for the 30 days to 12–16 October 2026. We left out GitHub stars: the GitHub API was blocked from our environment and the third-party counts we found were months old.
Two projects are winding down. AutoGen has carried a maintenance-mode banner since April, and its README, changed on 16 October, now says it is being archived and that Microsoft “is not providing bug fixes, security fixes, new features, or support”; Microsoft’s 1.0 announcement told AutoGen and Semantic Kernel users “Now is the time to migrate”. Semantic Kernel calls that framework its “successor”; Microsoft promised critical fixes for at least a year after its April 2026 GA.
Framework profiles: who each is for, and the catch
OpenAI Agents SDK. A thin, Python-first library (agents, tools, handoffs, guardrails, sessions, sandbox agents) with Temporal, DBOS, Restate and Dapr integrations. For teams on OpenAI models who want little abstraction. The catch: traces go to OpenAI by default and tracing is “unavailable” under zero data retention, so swap the processor if that matters. It’s still 0.x with breaking minor releases, and some features (hosted tool search, programmatic tool calling) work only on the Responses API.
Claude Agent SDK. Claude Code’s loop as a library: file and shell tools, permissions, hooks, skills, subagents and compaction. For agents that work on a filesystem, such as coding, research or operations. The catch: each session “spawns and supervises a claude CLI subprocess” with files on local disk, and the docs call 1 GiB of RAM per agent “a floor”. Claude models only, and the bundled Claude Code CLI (in both packages) and the TypeScript package fall under Anthropic’s commercial terms. Lock down the default tools for non-coding agents.
Pydantic AI. A typed loop where tool arguments and outputs are validated Pydantic objects, model-agnostic by design (“No flagship feature is locked to one vendor”), with plain OpenTelemetry and the widest durable-execution support here. For Python teams who already use Pydantic and FastAPI. The catch: Python only, 59 releases in three months, and the docs’ easiest paths lead to Pydantic’s own paid products, Logfire (free to 10 million records a month, Team $49/month) and a Gateway with a 3–5% markup on built-in providers (none if you bring your own keys). Neither is required.
Google ADK. The broadest kit: five languages, graph workflows, built-in evals, an MCP server mode, A2A and deploy commands for Google Cloud. For teams on Gemini or Google Cloud. The catch: voice agents need the Gemini Live API, built-in tools such as Google Search are Gemini-only, many features are Python-only, and tool confirmation doesn’t work with the database or Vertex session services.
LangGraph and LangChain. LangGraph is a graph runtime with persistence for human-in-the-loop, time travel and fault tolerance; LangChain’s create_agent is a configurable loop on top. For complex, stateful workflows. The catch: three layered frameworks to choose between (with Deep Agents), MCP in beta, and a commercial tracing and hosting product, LangSmith: Developer is free for one seat with 5,000 traces a month, Plus is $39 per seat with 10,000. Self-hosting its control plane needs Enterprise.
Microsoft Agent Framework. The successor to Semantic Kernel and AutoGen, 1.0 since April for .NET and Python: graph workflows with checkpoints, pause/resume and approvals, OpenTelemetry and many model connectors. The default for .NET and Azure shops. The catch: DevUI, Foundry hosting and evals, the Harness agent and Skills were still preview at the April 1.0 release, and quickstarts assume Foundry and az login.
CrewAI. Agents with roles and goals that collaborate in crews, inside deterministic Flows. For teams that think in roles and want quick prototypes. The catch: its built-in tracing goes to CrewAI’s platform, anonymous telemetry is on by default, production webhook approvals are Enterprise-only, and it publishes dev builds almost daily on top of 26 stable releases in three months.
LlamaIndex Workflows and smolagents. LlamaIndex’s event-driven, type-checked steps suit document-heavy agents next to LlamaParse, but durability needs snapshots or a DBOS add-on and the core is still 0.x. Hugging Face’s smolagents is a small library whose CodeAgent writes actions as Python, good for learning; by default it “runs LLM-generated code in your environment”, and it hasn’t released since May.
Strands Agents. AWS’s open-source SDK, “Production/Stable” on Python, with swarms, graphs, interrupts, OpenTelemetry and an evals SDK; it powers the AgentCore harness. For AWS teams who want model choice. The catch: the defaults assume Bedrock (Claude Sonnet 4.6 in us-west-2), durability is only through Temporal’s preview plugin or experimental checkpoints, and several features are Python-only.
Mastra. A full TypeScript framework: agents, suspendable workflows, durable agents, memory, evals, a local Studio, and MCP client and server. The catch: code under ee/ (auth, agent builder, editor) is source-available and needs a licence key in production, and the hosted platform’s Teams plan is $250/month.
Vercel AI SDK. The most-downloaded npm package in this comparison. ToolLoopAgent has typed tools, structured output, approvals and subagents, and WorkflowAgent adds durability. For agents inside a Next.js or Node app. The catch: v7 is ESM-only on Node 22, majors arrive about every six months with long rename lists, and durable runs need WorkflowAgent with the Workflow DevKit (self-hostable) or a DBOS, Restate or Temporal integration.
Cloudflare Agents SDK. Each agent is a Durable Object with its own SQLite storage, scheduling, WebSockets and hibernation, plus web search and fetch tools and a persistent browser added this month. For many small, long-lived agents that sleep cheaply. The catch: Workers only, 30 seconds of CPU per request, 0.x with breaking minor releases, and no loop of its own: you bring the AI SDK or Cloudflare’s Think harness.
Agno. A Python SDK plus AgentOS, a runtime with REST and MCP endpoints and a control-plane UI. The catch: three major versions in 19 months with some irreversible database migrations, a durable queue that is off by default and reruns every tool call on retry, and a $150/month control plane for live deployments.
What do the hosted agent platforms run, and what do they cost?
Hosted agent products differ most in who runs the loop. The first table covers managed loops: you send configuration and messages, and the vendor runs the agent. Prices are on top of model tokens, read on 16 October 2026.
| Managed loop | Status | What it runs | Models | Price on top of tokens | Zero data retention |
|---|---|---|---|---|---|
| OpenAI Agents API | Public beta since 10 Sep 2026 | Codex harness: sessions, compaction, recovery, subagents, MCP; hosted, self-hosted or no sandbox; computer use | OpenAI | No platform fee; hosted sandbox billed separately at container rates (default 2 vCPU / 4 GB: $0.36 an hour) | No; US data residency only |
| Claude Managed Agents | Beta | Harness with Bash, files, web search and fetch, MCP; cloud sandbox (up to 8 GB RAM) or self-hosted; memory stores | Claude 4.5 and later | $0.08 per session-hour while running, sandbox included; idle time free | No (also no HIPAA BAA) |
| AWS AgentCore harness | GA | Config-defined loop powered by Strands, microVM per session with filesystem and shell | Bedrock, OpenAI, Gemini or any LiteLLM-compatible model | No harness fee; AgentCore Runtime (see next table) and tool rates apply | Not documented for the harness |
| Bedrock Managed Agents, powered by OpenAI | Preview, 3 US regions | OpenAI’s Agents API adapted for AWS; tools run on your host or AgentCore Runtime | OpenAI models on Bedrock | No additional charge in preview | Not documented |
| Gemini API managed agents | Preview | Antigravity agent and Deep Research in a Linux sandbox (4 cores, 16 GB) | Gemini | Sandbox compute not billed during preview | Not covered on the Gemini API’s zero-data-retention page; interactions kept 55 days by default (paid tier) |
| Microsoft Foundry prompt agents | Available; voice prompt agents in preview | Instructions, model and tools; Foundry runs the agent | Foundry model catalogue | No charge beyond tokens and tools | Not documented |
| Mistral Agents API | Beta SDK namespace; connectors in public preview | Conversations with built-in web search, code interpreter, image generation, document library | Mistral | Tool calls priced per call; rates not on the pricing pages we could read | Not documented; history stored unless store=False |
Prices sit on different bases: Anthropic’s session-hour includes the sandbox, while OpenAI and AWS bill the sandbox or runtime separately. “Not documented” means we found no statement in the vendor’s docs on 16 October 2026; ask before you rely on it. Google also previews a Managed Agents API on Agent Platform, not for production use, and AWS’s older Bedrock Agents is closed to new customers.
Runtimes that host your own framework code are billed like compute, so the next table shows list rates and one active hour of a 2 vCPU, 4 GB session (our arithmetic).
| Runtime for your code | Per vCPU-hour | Per GB-hour | One hour, 2 vCPU / 4 GB, CPU fully busy | What isn’t billed | Frameworks |
|---|---|---|---|---|---|
| AWS AgentCore Runtime (v1) | $0.0895 | $0.00945 | $0.217 | CPU during I/O wait, such as waiting for the model | Any |
| Google Agent Runtime | $0.085 | $0.009 per GiB | $0.206 | Idle time between turns; first 50 vCPU-hours and 100 GiB-hours a month | ADK, LangGraph, LangChain, LlamaIndex, AG2, any container |
| Microsoft Foundry hosted agents (East US) | $0.0994 | $0.0118 per GiB | $0.246 | Sessions after the idle timeout (default 15 minutes) | Agent Framework, LangGraph, OpenAI and Claude Agent SDKs, your own |
| LangSmith Deployment (Plus) | $0.0675 | $0.009 per GiB | $0.171, plus database | Serverless deployments scale to zero when idle | LangGraph-compatible apps |
| DigitalOcean Harness Runtime | $0.044 (CPU used) | $0.0095 (allocated) | $0.126 | CPU while it waits; paused sessions | Claude Code, Codex CLI, OpenCode, LangGraph, custom images |
A highlighted value is the lowest vCPU-hour rate and the cheapest hour. Our sums treat 4 GB as 4 GiB where a vendor prices per GiB (under 2% difference). AgentCore Runtime v2 costs more per unit ($0.1276 per vCPU-hour, $0.0169 per GB-hour) but reclaims idle memory after 120 seconds. LangSmith’s figure excludes its separately metered database, and DigitalOcean’s runtime is in public preview.
Managed loops price differently. Claude Managed Agents charges $0.08 per running hour, sandbox included; Anthropic’s worked example of a one-hour Opus 5.5 session totals $0.58, of which $0.50 is tokens. OpenAI bills its default 4 GB hosted sandbox at $0.12 per 20 minutes, per minute with a 5-minute minimum: $0.36 an hour (our arithmetic). Tokens are often the bigger number; see our models table.
What do hosted tools cost per call?
Hosted tools such as web search and code execution are billed per call or per session on top of tokens, whichever framework calls them.
| Tool | OpenAI | Anthropic | Microsoft Foundry | AWS AgentCore | xAI (SpaceXSI) | |
|---|---|---|---|---|---|---|
| Web search, per 1,000 | $10 | $10 | $14 after 5,000 free a month (Gemini API grounding) | $14 | $7 | $5 |
| Code execution | $0.03 (1 GB) to $1.92 (64 GB) per 20-minute container session, billed per minute | $0.05 per container-hour after 1,550 free hours a month; free with web search or fetch | Gemini API: free (tokens only); Agent Platform sandbox: $0.085 per vCPU-hour + $0.009 per GiB-hour | $0.033 per session | $0.0895 per vCPU-hour + $0.00945 per GB-hour | $5 per 1,000 calls |
| File search | $2.50 per 1,000 calls + $0.10 per GB-day stored (1 GB free) | No hosted file search; Files API storage | Gemini API File Search: storage and queries free; $0.15 per million embedding tokens | $0.11 per GB-day stored (1 GB free) | Bedrock Managed Knowledge Base, at Bedrock rates | $2.50 per 1,000 calls (collections search) + $0.10 per GiB-day stored |
The highlighted value is the cheapest web search. Billing units differ across the code execution row. Search results also add tokens on most of these. Memory is priced separately: AgentCore’s short-term memory costs $1.00 per GB ingested, $0.20 per GB retrieved and $0.10 per GB-month. Google’s Sessions and Memory Bank cost $0.30 per GiB-month stored, $0.085 per million writes and $0.085 per 3 million reads, plus model tokens for generating memories.
All prices are list prices from each vendor’s pricing page on 16 October 2026, in US dollars, before taxes, credits or discounts, and on top of model tokens. We didn’t run any workload; hourly figures are arithmetic from list rates, and your bill depends on how long sessions live and how busy they are. Confirm with the vendor. Dbggr isn’t affiliated with any of them.
Hosted platform profiles: who each is for, and the catch
OpenAI Agents API. OpenAI runs its Codex harness, sessions and sandbox, with computer use, for teams on OpenAI models who don’t want to run a loop. The catch: public beta, US data residency only, no zero data retention, and its code doesn’t run on the open-source Agents SDK.
Claude Managed Agents. Anthropic’s hosted harness with a sandbox, memory stores and scheduled runs, for Claude agents that need a computer. The catch: beta, Claude only, not eligible for zero data retention or HIPAA, and sold on the Claude API and Claude Platform on AWS, not Bedrock or Vertex.
AWS AgentCore. The harness runs a config-defined agent on any of several model providers; Runtime hosts any framework’s code in a microVM per session, with memory, gateway, browser and code-interpreter services priced separately. For AWS shops. The catch: many separately metered parts, an 8-hour default session limit, and a prompt-to-credentials issue that researchers say is now fully mitigated and AWS calls documented behaviour needing developer error.
Bedrock Managed Agents. OpenAI’s agent harness inside AWS, with IAM and CloudTrail. The catch: preview in three US regions, no subagents or long-term memory, and no published model list.
Google Agent Runtime and managed agents. Agent Runtime (formerly Vertex AI Agent Engine) hosts ADK, LangGraph or any container with a free monthly allowance; the Gemini API’s managed agents are a preview harness. The catch: no published maximum session length, and the managed agents are preview-only.
Microsoft Foundry Agent Service. Prompt agents at no charge beyond tokens and tools, plus hosted agents for your own code in per-session sandboxes (in 31 regions). For Azure shops. The catch: hosted sandboxes top out at 2 vCPU, and code interpreter sessions in a hosted agent’s toolbox are shared across a project’s users.
Mistral Agents API. Conversations with built-in search, code, image and document tools on Mistral models. The catch: connectors are in preview, and per-call tool prices weren’t on the pricing pages we could read.
Where does lock-in hide?
Rarely in the loop itself, which is a few hundred lines in any framework. Watch four places instead:
- Model adapters. “Supports other models” can mean less well: the OpenAI Agents SDK warns other providers may lack the Responses API (“You may see 404s”) or structured outputs, and the Claude Agent SDK has no non-Claude path.
- Traces. Where traces go is where your debugging history lives. Frameworks that emit standard OpenTelemetry let you change backends without touching agent code.
- Hosted state. Managed loops keep sessions in proprietary APIs. OpenAI’s docs say the Agents SDK “runs in your application” while the Agents API runs a harness in OpenAI’s service, so code for one doesn’t run on the other, and we found no bulk export format for OpenAI’s or Anthropic’s session state.
- The runtime. Cloudflare’s SDK runs only on Workers. AgentCore, Google Agent Runtime and Foundry hosted agents run containers from any framework, so they’re easier to leave.
Tools are the most portable part: every framework here can use MCP servers, so tools built as MCP servers move with you.
Is any framework measurably better?
We found no independent benchmark comparing these frameworks on agent quality with current models; most published comparisons are feature lists or opinion. The best third-party test, AIMultiple’s (updated July 2026), covers four frameworks on a previous-generation model, measures latency and tokens, and contradicts itself on which was fastest. An arXiv paper from February 2026 measured how well coding assistants write code for ten frameworks (Agno best at 0.55, DSPy worst at 0.07), which is about your coding agent, not your agent. Vendor benchmarks are marketing. For answer quality the model matters more than the framework, which decides overhead, failure handling and how easily you switch models, so test your own task on two candidates.
Which agent framework should you use?
- Start from your language and cloud. .NET: Microsoft Agent Framework. TypeScript in a web app: the Vercel AI SDK; a standalone TypeScript service: Mastra. Cloudflare Workers: the Agents SDK.
- Python with typed output and model freedom: Pydantic AI.
- Runs that last hours and must survive crashes: LangGraph for first-party checkpoints, or Pydantic AI, the OpenAI Agents SDK, ADK or the AI SDK on Temporal, DBOS or Restate if you already run one.
- Committed to one vendor: its own pairing (OpenAI Agents SDK, ADK on Agent Runtime, Strands on AgentCore). Choose the Claude Agent SDK when the agent needs Claude Code’s file and shell tools and you can afford a process per session.
- Nothing to run: Claude Managed Agents for Claude at $0.08 per running hour with the sandbox included, or the AgentCore harness for Bedrock, OpenAI, Gemini or LiteLLM-compatible models inside AWS. Check data-retention and residency limits before sending customer data to any managed loop.
- Hosting without a vendor loop: AgentCore Runtime, Google Agent Runtime or Foundry hosted agents, within about 20% of each other for a busy session. Choose by your cloud and by what each leaves unbilled while the agent waits.
- Avoid for new work: AutoGen (being archived, per its README), Bedrock Agents Classic (closed to new customers) and OpenAI’s Agent Builder (shuts down 30 November 2026). smolagents hasn’t released since May, though development continues on its main branch.
Whichever you choose, emit OpenTelemetry, build tools as MCP servers and keep instructions in files you own; those habits keep switching cheap. See our guides on writing instructions for agents, agent skills and skill libraries, and our comparisons of sandboxes and databases per agent.
FAQ
Is the OpenAI Agents SDK only for OpenAI models? No, but it’s built for them. It uses the Responses API by default and works with any OpenAI-compatible endpoint, or through LiteLLM and Any-LLM adapters that its docs call “best-effort, beta”, so test structured output and tool calling on the exact provider you’ll deploy.
What is the difference between the Claude Agent SDK and Claude Managed Agents? The Claude Agent SDK is a library that runs Claude Code’s loop as a subprocess on your machines; you pay for tokens and your own hosting. Claude Managed Agents is Anthropic’s hosted version, which runs the loop, sandbox and session state for $0.08 per running session-hour plus tokens; it’s in beta and not eligible for zero data retention.
Pydantic AI or LangGraph? Pydantic AI is the simpler choice for typed Python agents: validated output, any model, and durable execution on engines such as Temporal or DBOS. LangGraph suits long, branching workflows where you want explicit control of every step and checkpoints built in.
What happened to AutoGen and Semantic Kernel? Microsoft replaced both with Microsoft Agent Framework, 1.0 for .NET and Python since April 2026. AutoGen’s README now says it is being archived, with no bug or security fixes from Microsoft; Semantic Kernel still gets critical fixes, but new features go to Agent Framework, and Microsoft publishes migration guides for both.
