EN

Language

Our editions

Written for each audience, not translated word for word.

Agent SDKs compared: OpenAI Agents SDK, LangGraph and Claude Agent SDK

ComparisonBy Lucas Matías García TorresUpdated Data checked 6 min read

Reviewed on . How we work.

Leer en español

An industrial robotic arm placing small metal cubes connected by glowing orange cables

Short answer

This agent SDK comparison finds three different bets. The OpenAI Agents SDK (MIT, Python and TypeScript) offers a few building blocks, hosted tools on OpenAI models and tracing that is on by default. LangGraph (MIT, Python and JavaScript) is a low-level graph runtime with durable execution that works with any model. The Claude Agent SDK (Python and TypeScript) packages Claude Code's agent with file, shell and web tools, runs only Claude models and is governed by Anthropic's Commercial Terms of Service.

Prices and limits change often: check the vendor's page before you pay. How we make money.

An agent SDK gives you the loop that runs tool calls and feeds the results back to the model, plus the plumbing around it: memory, human approval and tracing. This agent SDK comparison covers three of the most used options, the OpenAI Agents SDK, LangGraph and the Claude Agent SDK, which start from very different ideas. OpenAI's is a small set of building blocks around the model, LangGraph is a low-level graph runtime you design step by step, and Claude's packages the agent that powers Claude Code, with file, shell and web tools already built in. We compared license, languages, models, tools, approvals and tracing in the official documentation and repositories on October 28, 2026.

The short answer

  • OpenAI Agents SDK if you want few concepts to learn, agents that hand work to each other and hosted tools such as web search and file search on OpenAI models, with other providers available through adapters.
  • LangGraph if you need explicit control over every step, long-running workflows that resume after a failure and a free choice of model.
  • Claude Agent SDK if your agent works on files and commands, like a coding or operations agent, and using only Claude models is fine for you.

If you are not sure you need a framework at all, our guide to how to build an agent writes the loop in plain code first, which is often enough.

Side by side

Table: OpenAI Agents SDK, LangGraph and Claude Agent SDK (official documentation and GitHub repositories, checked October 28, 2026)

Item OpenAI Agents SDK LangGraph Claude Agent SDK
License MIT MIT Anthropic's Commercial Terms of Service
Languages Python 3.10 or newer, plus a separate JavaScript and TypeScript SDK Python, plus LangGraph.js for JavaScript and TypeScript Python 3.10 or newer and TypeScript (Node.js 18.14 or newer)
Models OpenAI models through the Responses API by default or Chat Completions; other providers through OpenAI-compatible endpoints or the beta Any-LLM and LiteLLM adapters Any model you can call, usually through LangChain's integrations Claude only, through the Claude API, Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform or Microsoft Foundry
Built-in tools Hosted tools on OpenAI models (web search, file search, code interpreter, hosted MCP, image generation), local shell, computer and patch tools, and any Python function None of its own: tools come from your code or LangChain Reading, writing and editing files, running commands and searching the web
MCP Built in Through LangChain's MCPAdapter, in beta Built in
Several agents Handoffs and agents used as tools Whatever you draw as a graph Subagents
Human approval Human-in-the-loop built in Inspect and change the agent's state at any point Permissions decide which tools run on their own and which need approval; hooks run your code at key points
Memory Sessions, stored in SQLite, SQLAlchemy, Redis and others Persistence, short and long-term memory and durable execution Sessions you can resume or fork
Tracing On by default and sent to OpenAI's Traces dashboard; can be switched off or redirected LangSmith, switched on with LANGSMITH_TRACING=true and an API key OpenTelemetry export to any OTLP backend, off until you enable it; traces are in beta

License: the row that matters for products

The OpenAI Agents SDK, in both its Python and JavaScript versions, and LangGraph are published under the MIT license, so you can use, change and ship the code, including in commercial products, as long as you keep the copyright notice. The Claude Agent SDK works differently. Anthropic says its use is governed by Anthropic's Commercial Terms of Service, including when it powers products you offer to your own customers, except for components that carry a different license in their own LICENSE file. Anthropic also says that, unless previously approved, third-party developers may not offer claude.ai login or its rate limits in their products, so agents built on the SDK should authenticate with an API key. Read those terms before you build a product on it.

Models and lock-in

The OpenAI repository describes the SDK as provider-agnostic, supporting the Responses and Chat Completions APIs and more than 100 other models. The documentation is more careful: for OpenAI models it recommends the built-in path, and it calls the Any-LLM and LiteLLM adapters best-effort and beta, warning that feature support varies by provider. The hosted tools also need OpenAI's Responses API, so an agent that leans on them is tied to OpenAI.

LangGraph has no model of its own. Its documentation uses LangChain components to connect models and tools, but says you do not need LangChain to use LangGraph, which makes it the easiest of the three to move between providers.

The Claude Agent SDK runs only Claude models. It is the agent loop of Claude Code as a library: both SDKs bundle a native Claude Code binary and run it as a child process. You can reach Claude through Anthropic's API or through Amazon, Google Cloud and Microsoft, which helps if your company already buys cloud services from one of them.

Tools and where they run

Where a tool runs decides what it can damage, so check this before you connect anything real.

  • OpenAI: hosted tools run on OpenAI's servers. The computer and patch tools always run in your own environment, and the shell tool can run locally or in a hosted container. Sandbox agents work inside isolated workspaces, such as a local Unix or Docker sandbox.
  • LangGraph: tools are your own functions or LangChain integrations, so they run wherever your code runs. MCP servers connect through LangChain's MCPAdapter, which needs langchain[mcp] 1.4.0 or newer and is still in beta.
  • Claude: the built-in tools act on the machine where the SDK runs: they read and edit files and run commands. Permissions decide which tools run on their own and which wait for approval, and hooks let your code check each step. We would run it in a container or a disposable virtual machine, never on a laptop full of credentials.

How the model asks for a tool in the first place is explained in our guide to function calling, and how MCP servers plug in is covered in what is MCP.

Tracing and privacy

Tracing records what the agent did, which is essential for debugging and also a copy of your data somewhere.

  • OpenAI Agents SDK: tracing is on by default. It records model generations, tool calls, handoffs and guardrails and sends them to OpenAI's backend. You can switch it off with OPENAI_AGENTS_DISABLE_TRACING=1, in code or for a single run, add processors that send traces to another backend, or replace the default ones. The inputs and outputs of model generations and function calls may contain sensitive data, and a run setting leaves them out. Tracing is not available to organisations under OpenAI's Zero Data Retention policy.
  • LangGraph: tracing goes to LangSmith, LangChain's separate service, once you set LANGSMITH_TRACING=true and an API key.
  • Claude Agent SDK: telemetry is off until you set CLAUDE_CODE_ENABLE_TELEMETRY=1 and choose an exporter. It then sends metrics, log events and, in beta, traces over OpenTelemetry to any backend you choose, including a self-hosted collector. Prompt text and tool details are not recorded unless you switch on extra variables.

If your agent handles personal data, the default matters: with OpenAI's SDK, switch tracing off or redirect it before the first real run.

How to choose

  1. Will it be part of a product you sell? Read the license row first.
  2. Might you change model provider later? LangGraph, or OpenAI's SDK with adapters if you accept beta support.
  3. Does the agent edit files and run commands? The Claude Agent SDK gives you that on day one, along with the duty to sandbox it.
  4. Does a workflow run for hours and need to survive a crash? LangGraph's persistence and durable execution are built for it.
  5. Where may your traces go? Decide before the first run with real data.

If you only need to connect apps without writing code, our comparison of n8n, Zapier and Make is a better starting point.

How we checked

On October 28, 2026 we read the OpenAI Agents SDK documentation (overview, models, tools and tracing) and its Python and JavaScript repositories on GitHub; LangGraph's overview, LangChain's MCP page and the LangGraph repository on GitHub; and the Claude Agent SDK overview, quickstart and observability pages. We did not build the same agent with all three, so this guide compares documented features, not speed or quality.

What we checked

  • The OpenAI Agents SDK has a small set of primitives (agents, agents as tools and handoffs, guardrails) and offers sandbox agents, realtime and voice agents, function tools, MCP server tool calling, sessions (SQLite, SQLAlchemy, Redis, MongoDB and Dapr backends), human-in-the-loop and built-in tracing; it uses the Responses API by default for OpenAI models. (OpenAI, )
  • openai/openai-agents-python is MIT-licensed, needs Python 3.10 or newer and is described as provider-agnostic, supporting the OpenAI Responses and Chat Completions APIs and 100+ other LLMs. (OpenAI (GitHub), )
  • openai/openai-agents-js is the JavaScript and TypeScript version of the Agents SDK, MIT-licensed and provider-agnostic. (OpenAI (GitHub), )
  • For OpenAI-only apps the SDK recommends the built-in OpenAIResponsesModel path; Any-LLM and LiteLLM are included as best-effort, beta adapters, and feature support and request semantics can vary by provider. (OpenAI, )
  • Hosted tools (web search, file search, code interpreter, hosted MCP, image generation, tool search) run on OpenAI servers with the OpenAIResponsesModel; ComputerTool and ApplyPatchTool always run in your environment and ShellTool locally or in a hosted container; any Python function can be wrapped as a tool. (OpenAI, )
  • Tracing is on by default and records generations, tool calls, handoffs, guardrails and custom events for the Traces dashboard; it can be disabled with OPENAI_AGENTS_DISABLE_TRACING=1, in code or per run; it is unavailable under Zero Data Retention; extra processors can send traces to other backends or replace the default export to OpenAI; trace_include_sensitive_data controls whether generation and function inputs and outputs are captured. (OpenAI, )
  • LangGraph is a low-level orchestration framework and runtime for long-running, stateful agents, with durable execution, streaming, human-in-the-loop, persistence and short and long-term memory; LangChain is not required; tracing goes to LangSmith with LANGSMITH_TRACING=true and an API key. (LangChain, )
  • langchain-ai/langgraph is MIT-licensed; LangGraph.js is the equivalent JavaScript and TypeScript library. (LangChain (GitHub), )
  • LangChain agents call tools on MCP servers through MCPAdapter; the langchain.mcp namespace requires langchain[mcp] 1.4.0 or newer and is in beta. (LangChain, )
  • The Claude Agent SDK gives the tools, agent loop and context management of Claude Code in Python and TypeScript, with built-in tools, hooks, subagents, MCP, permissions and sessions that can be resumed or forked; its use is governed by Anthropic's Commercial Terms of Service except components with their own license; unless previously approved, third-party developers may not offer claude.ai login or rate limits. (Anthropic (Claude Code docs), )
  • The Agent SDK needs Node.js 18.14 or newer or Python 3.10 or newer, bundles a native Claude Code binary, reads ANTHROPIC_API_KEY and also supports Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform and Microsoft Foundry. (Anthropic (Claude Code docs), )
  • The Agent SDK runs the Claude Code CLI as a child process, which exports OpenTelemetry metrics, log events and traces (beta) to any OTLP backend; telemetry is off until CLAUDE_CODE_ENABLE_TELEMETRY=1 and an exporter are set; prompt text and tool details are only added through opt-in variables. (Anthropic (Claude Code docs), )

What may change

  • All three SDKs release new versions often, and features marked beta, such as LangChain's MCP adapter, Claude's OpenTelemetry traces and OpenAI's third-party adapters, can change. This page is reviewed every quarter.

Frequently asked questions

What is the difference between the OpenAI Agents SDK and LangGraph?

The OpenAI Agents SDK gives you a few ready building blocks, agents, handoffs, guardrails and sessions, around a built-in loop. LangGraph is a lower-level runtime where you draw each step as a graph, with durable execution and persistence, and it works with any model.

Is the Claude Agent SDK open source?

Not in the MIT sense. Anthropic says use of the Claude Agent SDK is governed by its Commercial Terms of Service, including in products for your own customers, except components whose own LICENSE file says otherwise. The OpenAI Agents SDK and LangGraph are MIT-licensed.

Can I use the OpenAI Agents SDK with other models?

Yes, with limits. It supports OpenAI-compatible endpoints and includes Any-LLM and LiteLLM adapters, which OpenAI's documentation calls best-effort and beta, with feature support that varies by provider. Hosted tools such as web search need OpenAI's Responses API.

Which agent SDK is best for beginners?

The OpenAI Agents SDK has the fewest concepts to learn and runs a working agent in a few lines of Python. Even so, writing the tool loop yourself first, as our guide to building an agent shows, teaches what any SDK does underneath.

Sources

  1. OpenAI Agents SDK documentation: primitives, main features and when to use it instead of the Responses API, OpenAI. Accessed October 28, 2026.
  2. openai/openai-agents-python on GitHub: MIT license, Python 3.10 or newer and provider support, OpenAI (GitHub). Accessed October 28, 2026.
  3. openai/openai-agents-js on GitHub: the JavaScript and TypeScript Agents SDK, MIT license, OpenAI (GitHub). Accessed October 28, 2026.
  4. Models (OpenAI Agents SDK): Responses and Chat Completions, non-OpenAI models and the beta Any-LLM and LiteLLM adapters, OpenAI. Accessed October 28, 2026.
  5. Tools (OpenAI Agents SDK): hosted tools, local runtime tools, function tools and agents as tools, OpenAI. Accessed October 28, 2026.
  6. Tracing (OpenAI Agents SDK): default tracing, how to disable it, custom processors and sensitive data, OpenAI. Accessed October 28, 2026.
  7. LangGraph overview: low-level orchestration, durable execution, human-in-the-loop, memory and LangSmith tracing, LangChain. Accessed October 28, 2026.
  8. langchain-ai/langgraph on GitHub: MIT license and the LangGraph.js equivalent, LangChain (GitHub). Accessed October 28, 2026.
  9. Model Context Protocol (MCP) in LangChain: MCPAdapter, requirements and beta status, LangChain. Accessed October 28, 2026.
  10. Agent SDK overview: capabilities, comparison with other Claude tools, login rules and license terms, Anthropic (Claude Code docs). Accessed October 28, 2026.
  11. Agent SDK quickstart: prerequisites, bundled Claude Code binary, API key and third-party providers, Anthropic (Claude Code docs). Accessed October 28, 2026.
  12. Observability with OpenTelemetry (Agent SDK): exported signals, how to enable export and opt-in content, Anthropic (Claude Code docs). Accessed October 28, 2026.

Spotted an error or an outdated price? Tell us and we will fix it.

Change history

  • : First published. Checked against the documentation and GitHub repositories of the OpenAI Agents SDK, LangGraph and the Claude Agent SDK on October 28, 2026.

Next review: .

Part of our Agents & Automation guide.

Other topics