Head to head
OpenAI Agents SDK (Python) vs LangChain (2026)
Want the fastest path from spec to a working, straightforward agent (support triage, a tool-using assistant, linear handoffs) with minimal abstractions to learn and are fine writing your own code once you outgrow four primitives → OpenAI Agents SDK.
OpenAI Agents SDK is a minimal, four-primitive framework (agents, handoffs, guardrails, sessions) built to get a straightforward agent to production in days, with linear handoffs and manual RunState snapshots for durability, while LangChain (via LangGraph) is a much larger ecosystem built for stateful, branching, checkpointed multi-agent control, backed by a $1.25B Series B, so the real choice is start-minimal-and-own-the-gaps versus start-comprehensive-and-accept-the-learning-curve.
2 with a free plan · prices checked 18 September–20 September 2026
Reviewed by The Agents Index editorial team.
How OpenAI Agents SDK (Python) and LangChain compare
| Question | ||
|---|---|---|
| The basics | ||
| Price | OpenAI Agents SDK (Python): free | LangChain: free, then $39/seat/month |
| API | OpenAI Agents SDK (Python): YesThe SDK itself is a library; the agent loop calls the OpenAI Responses and Chat Completions APIs under the hood and supports 100+ other LLMs through LiteLLM and any-llm. | LangChain: Yes |
| Category | OpenAI Agents SDK (Python): Agent frameworks | LangChain: Agent frameworks, Agent platforms |
| Pricing model | OpenAI Agents SDK (Python): free | LangChain: freemium |
| Model / LLM | OpenAI Agents SDK (Python): OpenAI-first (100+ via LiteLLM, any-llm) | LangChain: Model-agnostic (any LLM) |
| Bring your own model | OpenAI Agents SDK (Python): Yes | LangChain: Not stated |
| Interface | OpenAI Agents SDK (Python): Library | LangChain: Library |
| Deployment | OpenAI Agents SDK (Python): Self-host | LangChain: Self-host |
| Limitations | OpenAI Agents SDK (Python): Minimalist by design: durable state is limited to `RunState`, a snapshot you capture manually after a run pauses for human-in-the-loop approval, not automatic step-by-step checkpointing, and handoffs are linear chains, not a graph, so complex branching or crash-safe mid-run resume become your own code. Teams sometimes outgrow it and move to LangGraph. The project is young and fast-moving (v0.x on both Python and JS), so the API, defaults and supported capabilities can shift between releases. | LangChain: The abstractions have churned across versions; a learning curve and some API instability. Powerful but heavier than minimal frameworks for simple agents. |
| Tags | OpenAI Agents SDK (Python): API, Autonomous, Free tier, GPT, Multi-agent, Open source, Self-hosted | LangChain: API, Autonomous, Claude, Free tier, GPT, Multi-agent, Open models, Open source, Self-hosted |
| What it does | ||
| Writes code | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: Yeslangchain.com |
| Debugs and fixes | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: PartlyPlus plan and updocs.langchain.com |
| Writes tests | OpenAI Agents SDK (Python): PartlySandbox agents (beta)openai.github.io | LangChain: PartlyPlus plan and updocs.langchain.com |
| Reviews code | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: Not stated |
| Whole-codebase work | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: PartlyPlus plan and updocs.langchain.com |
| Ships it | OpenAI Agents SDK (Python): Not stated | LangChain: Yesdocs.langchain.com |
| Done-for-you service | OpenAI Agents SDK (Python): Nogithub.com | LangChain: PartlyEnterprise plan and uplangchain.com |
| How much it does unattended | ||
| Runs autonomously | OpenAI Agents SDK (Python): Yesopenai.github.io | LangChain: Yeslangchain.com |
| Multi-agent | OpenAI Agents SDK (Python): Yesopenai.github.io | LangChain: Yeslangchain.com |
| Agent permissions | OpenAI Agents SDK (Python): Yesopenai.github.io | LangChain: Yeslangchain.com |
| Which models it runs on | ||
| Claude | OpenAI Agents SDK (Python): Partlygithub.com | LangChain: Yesdocs.langchain.com |
| GPT | OpenAI Agents SDK (Python): Yesopenai.github.io | LangChain: Yesdocs.langchain.com |
| Open models | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: Yesdocs.langchain.com |
| Model choice | OpenAI Agents SDK (Python): Yesgithub.com | LangChain: Yesdocs.langchain.com |
| Where you use it | ||
| On the command line | OpenAI Agents SDK (Python): Yesopenai.github.io | LangChain: Yesdocs.langchain.com |
| In your pipeline | OpenAI Agents SDK (Python): Not stated | LangChain: Yesdocs.langchain.com |
| In a browser | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: Yesdocs.langchain.com |
| Whose machine it runs on | ||
| Self-hosted | OpenAI Agents SDK (Python): Yesopenai.github.io | LangChain: PartlyEnterprise plan and uplangchain.com |
| Open source | OpenAI Agents SDK (Python): Yesraw.githubusercontent.com | LangChain: PartlyLangChain, LangGraph and dcodelangchain.com |
| What it costs to run | ||
| How it meters | OpenAI Agents SDK (Python): Partlyraw.githubusercontent.com | LangChain: Yeslangchain.com |
| Price per vCPU-hour | OpenAI Agents SDK (Python): Not stated | LangChain: Yes$0.0576 a vCPU-hour on Developer.langchain.com |
| Price per 1,000 requests | OpenAI Agents SDK (Python): Not stated | LangChain: Yeslangchain.com |
| Free credit | OpenAI Agents SDK (Python): Not stated | LangChain: Yeslangchain.com |
| Free tier | OpenAI Agents SDK (Python): Yesraw.githubusercontent.com | LangChain: Yeslangchain.com |
| API access | OpenAI Agents SDK (Python): Yesopenai.github.io | LangChain: Yeslangchain.com |
| MCP server | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: Yeslangchain.com |
| Bring your own key | OpenAI Agents SDK (Python): Yesopenai.github.io | LangChain: PartlyCurrently limiteddocs.langchain.com |
| Buying it for a team | ||
| Admin controls | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: Yesdocs.langchain.com |
| Audit log | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: PartlyEnterprise plan and updocs.langchain.com |
| What happens to your code | ||
| Data residency | OpenAI Agents SDK (Python): Not stated | LangChain: Yesdocs.langchain.com |
| Getting out | OpenAI Agents SDK (Python): Partlyopenai.github.io | LangChain: PartlyEnterprise plan and updocs.langchain.com |
| Certifications | OpenAI Agents SDK (Python): Not stated | LangChain: Yesdocs.langchain.com |
Both are open-source, free-to-self-host frameworks for building LLM agents, but they start from opposite design philosophies. OpenAI Agents SDK is deliberately minimal: four primitives: agents (an LLM with instructions and tools), handoffs (one agent delegating to another), guardrails (input/output validation) and sessions (conversation memory), plus built-in tracing, in both Python and TypeScript. It is the production-ready successor to OpenAI's experimental Swarm project, and despite the branding it is provider-agnostic, running 100-plus models via LiteLLM. LangChain is a much broader ecosystem: model, retrieval and tool abstractions plus a large integration catalogue, with LangGraph as its lower-level library for stateful, graph-based control (loops, branching, human-in-the-loop, multi-agent coordination) and LangSmith as a separate paid observability layer.
The gap shows up directly in how each handles state and complexity. OpenAI Agents SDK's durability is deliberately manual: `RunState` only snapshots at a human-in-the-loop approval pause, not automatic step-by-step checkpointing, and handoffs are linear delegation chains rather than a graph. Anything beyond agents-plus-tools-plus-handoffs becomes code you write yourself. LangGraph was built specifically to solve that: genuine stateful control with branching, loops and crash-safe checkpointing as first-class features. OpenAI Agents SDK's own documented tradeoff names this exact graduation path: teams that outgrow its linear-handoff model move to LangGraph when they need a real graph engine.
Pricing and backing tell the rest of the story. Both frameworks themselves are free and open-source (MIT-licensed); you pay only for the model API calls you make. LangChain's optional paid layer is LangSmith, its observability/eval product: free for up to 5,000 traces/month on 1 seat, $39/seat/month (Plus) for up to 10,000 traces/month with unlimited seats, and custom Enterprise above that. OpenAI Agents SDK has no paid tier or observability product of its own, leaning on OpenAI's own tracing dashboard instead. LangChain is also the better-capitalized, more established project: a $125 million Series B in October 2025 at a $1.25 billion valuation, versus OpenAI Agents SDK's young, fast-moving v0.x release line (latest tag v0.18.3, published 17 July 2026) where APIs can still shift between releases. Community scale reflects the same maturity gap: langchain-ai/langchain carries 142,424 GitHub stars and 23,705 forks against openai/openai-agents-python's 28,119 stars and 4,366 forks (both checked live 2026-07-23). LangChain's ecosystem is roughly 5x larger by that measure, though OpenAI Agents SDK is growing from a much more recent launch.
Who each one is for
OpenAI Agents SDK (Python)
Developers who want the fastest, lightest way to ship a straightforward agent (support triage, a tool-using assistant or a sandboxed coding agent) with tracing and guardrails included.
From Free
Watch for: No automatic step-by-step checkpointing, `RunState` only snapshots at human-in-the-loop approval pauses, so you manage durable state yourself outside of that.
LangChain
Engineering teams building a bespoke, production-grade agent who want the largest integration ecosystem plus real stateful control.
From Free
Watch for: Fast-moving: core abstractions have changed across major versions, so older tutorials can mislead.
Verdict: OpenAI Agents SDK (Python) or LangChain?
Want the fastest path from spec to a working, straightforward agent (support triage, a tool-using assistant, linear handoffs) with minimal abstractions to learn and are fine writing your own code once you outgrow four primitives → OpenAI Agents SDK. Building something bespoke and complex that needs genuine stateful control (branching, loops, human-in-the-loop, multiple coordinated agents, automatic crash-safe checkpointing) or want the largest integration ecosystem and a funded, established project → LangChain with LangGraph. Want production tracing and evals as a first-class paid product rather than leaning on a single vendor's dashboard → LangChain (LangSmith). Genuinely undecided and starting small → OpenAI Agents SDK is the lower-commitment starting point precisely because migrating to LangGraph later is the documented, well-trodden path, not a dead end.
The digest
Which agents actually ship. New agents and articles, by email, at most once a week.
Frequently asked questions
- Which is easier to learn, OpenAI Agents SDK or LangChain?
- OpenAI Agents SDK: it deliberately ships only four primitives (agents, handoffs, guardrails, sessions), so there is less to learn before you have a working agent. LangChain's abstractions cover far more ground (models, retrieval, memory, tools, plus LangGraph for stateful control), which is more powerful but has a real learning curve, and the core abstractions have changed across major versions.
- Can OpenAI Agents SDK do the stateful, branching control that LangGraph does?
- Not natively. OpenAI Agents SDK's durable state is limited to a manually-captured RunState snapshot at human-in-the-loop pauses, and handoffs are linear delegation chains, not a graph. LangGraph was purpose-built for genuine stateful, branching, checkpointed multi-agent control. It is the framework OpenAI Agents SDK's own documentation points teams toward when they outgrow the linear-handoff model.
- Is either framework free?
- Both frameworks themselves are free, open-source and MIT-licensed, and you self-host them for the cost of the model API calls they make. LangChain's optional paid add-on is LangSmith (observability/evals): free up to 5,000 traces/month on 1 seat, then $39/seat/month for up to 10,000 traces/month with unlimited seats. OpenAI Agents SDK has no paid tier of its own.
- Which project is more established?
- LangChain, by a wide margin on every public measure: a $125 million Series B in October 2025 at a $1.25 billion valuation, and 142,424 GitHub stars versus OpenAI Agents SDK's 28,119 (both checked live 2026-07-23). OpenAI Agents SDK is newer and still on a v0.x release line (latest tag v0.18.3), so expect more API churn between releases.
- Do both support models other than their namesake vendor's?
- Yes, both are provider-agnostic in practice. LangChain integrates with essentially any LLM provider natively. OpenAI Agents SDK is optimised for OpenAI's models and its tracing leans on OpenAI's dashboard, but it works with 100-plus other models through LiteLLM and the Chat Completions API.
Sources and method
Every price here was read on the maker's own pricing page.
- OpenAI Agents SDK (Python): raw.githubusercontent.com/openai/openai-agents-python/main/LICENSE, checked 20 September 2026
- LangChain: langchain.com/pricing, checked 18 September 2026
The digestFree
Which agents actually ship.
New agents and articles, by email, at most once a week.
Last issue · No. 1 · 13 October 2026Devin vs Claude Code: Which Should You Pick?
One-click unsubscribe
At a glance
OpenAI Agents SDK is a minimal, four-primitive framework (agents, handoffs, guardrails, sessions) built to get a straightforward agent to production in days, with linear handoffs and manual RunState snapshots for durability, while LangChain (via LangGraph) is a much larger ecosystem built for stateful, branching, checkpointed multi-agent control, backed by a $1.25B Series B, so the real choice is start-minimal-and-own-the-gaps versus start-comprehensive-and-accept-the-learning-curve.
The Agents Index digest
The agents we added, the prices they changed and what we wrote about them, by email.
Last issue: Devin vs Claude Code: Which Should You Pick? · 13 October 2026