Contents
- Fast answer
- Quick facts
- What this covers
- Why it matters
- Where to go next
- Outcomes
- Step by step
- Two philosophies: managed loop versus explicit graph
- The Agent Builder shutdown and what it teaches
- Pricing and cost of ownership
- Choose by scenario, not by brand loyalty
- Where both projects stand in mid 2026
- At a glance
- Mistakes to avoid
- FAQ
- Related guides
Fast answer
Choose the OpenAI Agents SDK when you want an OpenAI-native agent app with tools, handoffs, tracing, and a straightforward SDK path, and choose LangGraph when you need explicit graph state, persistence, interrupts, and complex control flow. Both can build useful agents, but they optimize for different control surfaces, so the wrong choice can make a simple workflow too complex or a complex one too opaque. Start with control needs: if the workflow is mostly tools, handoffs, and tracing, the Agents SDK may fit, but if it needs explicit state and pause or resume review, LangGraph may fit. Consider deployment context, since OpenAI-native apps may benefit from AgentKit and SDK tooling while custom platforms may prefer graph-level control. Plan evaluation with traces, examples, and regression checks regardless of framework, and honor human approval requirements. To avoid lock-in, document prompts, tools, review rules, and test cases so the workflow can move if needed.
Facts last verified 2026-07
Quick facts
- OpenAI Agents SDK version
- 0.18.x as of July 2026, pre-1.0, MIT license
- LangGraph version
- 1.2.x as of July 2026, stable API since 1.0, MIT license
- GitHub stars (July 2026)
- Agents SDK about 28k, LangGraph about 37k
- Framework cost
- Both free; you pay for tokens plus optional platform tooling
- Key 2026 event
- OpenAI Agent Builder and Evals shut down November 30, 2026; Agents SDK named the code-first successor
- Best for
- Agents SDK for OpenAI-native tools and handoffs, LangGraph for durable state and approval gates
On this page
What this page covers
A comparison visitor should understand the tradeoff, the best-fit scenario, and the next diagnostic tool to confirm the choice.
- 01Quick verdict
- 02SDK workflow
- 03Graph workflow
- 04Tool use
- 05Human review
- 06Best fit
Why does this matter now?
Both can build useful agents, but they optimize for different control surfaces. The wrong choice can make a simple workflow too complex or a complex workflow too opaque. The OpenAI Agents SDK favors an OpenAI-native path with tools, handoffs, and tracing built in, while LangGraph favors explicit graph state, persistence, and interrupts you control directly. Picking the SDK for a workflow that needs deep state, or LangGraph for a simple tool-calling assistant, adds cost and friction that shows up later in debugging and maintenance.
Internal path
Where to go next from this page
These links are part of the A8gent learning and conversion path. Use them to move from concept, to diagnosis, to workflow build, to course.
What you should be able to do after this
- Choose SDK or graph control
- Compare tracing and state
- Plan human review
- Route to implementation courses
How do you do it, step by step?
1. Map the workflow and its control surface
Write out whether the workflow is mostly tools, handoffs, and tracing or whether it needs explicit state, branching, and controlled pause and resume. The Agents SDK fits the former cleanly, while LangGraph fits the latter. This mapping, done before writing code, prevents both over-engineering and hitting a wall later.
2. Score the state and review needs
Rate how much the workflow depends on persistent state, long-running steps, and explicit approve, edit, or reject checkpoints. LangGraph makes durable state and pause-resume review first-class, while the Agents SDK keeps this lighter and more linear. Heavy state or strict human review points toward LangGraph.
3. Consider your deployment context
Decide whether you are building inside the OpenAI ecosystem or on a custom platform that may use multiple model providers. OpenAI-native apps can benefit from AgentKit and the SDK's built-in tooling, while custom or multi-provider platforms often prefer LangGraph's graph-level control. The surrounding stack frequently decides the choice.
4. Compare integration and tooling fit
Check how each handles the tools, handoffs, and external systems your agent must call. The Agents SDK bakes in handoffs and tracing for OpenAI models, while LangGraph gives you lower-level control to wire anything but asks you to build more. Confirm the specific integrations you need work before committing.
5. Plan evaluation and tracing
Set up traces, representative examples, and regression checks regardless of framework so you can catch quality drops. The Agents SDK ships tracing that is convenient inside the OpenAI stack, while LangGraph's explicit state makes runs easy to log and replay. Do not defer this until problems appear in production.
6. Honor human approval requirements
Identify every action that must be reviewed before it executes, such as writes to real systems or customer-facing output. Make sure the framework you pick can enforce those approval gates reliably, which is more native in LangGraph. Never ship an agent with write access and no review path.
7. Prototype the same workflow in the likely tool
Build one real workflow end to end in the framework you lean toward and run it on real inputs. Watch how hard it is to add a tool, insert a checkpoint, and debug a failure. This hands-on test reveals fit better than documentation.
8. Decide and protect against lock-in
Commit to one framework but document prompts, tools, review rules, and test cases so the workflow can move if needed. Because both evolve quickly and one is tied to a single provider, keep your core logic portable. Revisit the choice once you have production usage data.
Two philosophies: managed loop versus explicit graph
The OpenAI Agents SDK is built around a small set of primitives: agents, handoffs, guardrails, sessions, and tracing. You define an agent with instructions and tools, and the SDK runs the loop for you, including delegating to other agents through handoffs. It is deliberately lightweight, and as of July 2026 it is still on a 0.x release line, version 0.18.x, shipping frequently. The design bet is that most agent applications do not need custom orchestration, they need good defaults with escape hatches.
LangGraph makes the opposite bet. It asks you to draw the control flow yourself as a graph, define the state schema, and decide exactly where the workflow can branch, pause, and resume. That is more code up front, but the payoff is durable checkpointing: a LangGraph run can be interrupted at a node, persisted, and resumed after a human approves, which is the backbone of serious human-in-the-loop systems. LangGraph crossed 1.0 in October 2025 with a public commitment to no breaking changes until 2.0, so its API surface is now a stable target.
A common misreading is that the Agents SDK locks you to OpenAI models. It defaults to OpenAI's Responses API, but the project documents support for other providers through LiteLLM and similar adapters, covering well over a hundred models. The deeper coupling is conceptual: the SDK's tracing, sessions, and tooling are smoothest inside the OpenAI platform, while LangGraph is provider-neutral by construction and equally at home with Claude, GPT, or open-weight models.
The Agent Builder shutdown and what it teaches
The most important 2026 development in this comparison did not happen to either framework directly. OpenAI launched AgentKit at DevDay on October 6, 2025, including Agent Builder, a visual drag-and-drop canvas for composing agent workflows. On June 3, 2026, OpenAI posted a deprecation notice: Agent Builder and the Evals product shut down on November 30, 2026, roughly fourteen months after launch. OpenAI's own migration guidance points code-based workflows to the Agents SDK and natural-language use cases to workspace agents inside ChatGPT.
For teams choosing between the Agents SDK and LangGraph, this cuts two ways. It strengthens the Agents SDK's position, because OpenAI has now explicitly named it the durable, code-first path for agent development on its platform. But it is also a reminder that platform products above the SDK layer can disappear on a vendor's schedule. Anything you build against a hosted visual builder is one roadmap decision away from a forced migration, which is precisely the argument LangGraph users make for owning the orchestration layer as open source code.
The practical takeaway is to treat the SDK itself as the safe unit of investment on the OpenAI side. It is MIT licensed, on GitHub with around 28 thousand stars as of July 2026, and it is now the designated successor for Agent Builder workloads. If you were evaluating Agent Builder, that evaluation is over; the real comparison in July 2026 is exactly the one on this page.
Pricing and cost of ownership
Both frameworks are free, MIT-licensed open source, so direct cost lives in the layers around them. On the OpenAI side, AgentKit-era tooling that survives, including the Agents SDK and ChatKit, is included with standard API model pricing: you pay for tokens and for built-in tools, with no separate platform fee. Tracing in the OpenAI dashboard is bundled, which makes the all-in cost of a small Agents SDK project essentially just your token bill.
On the LangGraph side, the open source framework plus your own infrastructure is also just a token bill. The paid layer is LangSmith, where the free Developer tier includes 5,000 traces a month, the Plus tier runs 39 dollars per seat per month with usage-based charges for hosted deployments, and Enterprise adds self-hosted and hybrid options with custom pricing. A team of five engineers on Plus pays about 195 dollars a month before deployment usage, which is modest relative to what the same team costs in salary during a bad debugging week without tracing.
The hidden cost dimension is operational. The Agents SDK gives you the least to operate if you stay inside OpenAI's platform, because sessions and tracing are managed for you. LangGraph gives you the most control but expects you to run a checkpointer database and either pay for LangSmith deployment or build your own runner. For a two-person team shipping one workflow, that difference is real money and real time; for a platform team running twenty workflows, the control usually pays for itself.
Choose by scenario, not by brand loyalty
Choose the OpenAI Agents SDK when your workflow is tool calls plus handoffs with light state, you are committed to OpenAI models as the primary provider, and you want the shortest path from idea to traced, working agent. Triage bots, research assistants, internal copilots with a handful of tools, and multi-agent handoff patterns like support-to-billing routing all fit this shape well.
Choose LangGraph when the workflow needs durable state, long pauses, or auditable approval gates: financial operations, anything that writes to customer-facing systems, workflows that run for hours or days, or products where you must support multiple model providers for cost, compliance, or resilience reasons. Its explicit graphs are also the better substrate when a compliance team needs to see, on paper, every path the agent can take.
There is also a legitimate both answer. Some teams prototype in the Agents SDK because it is fast, then port the workflows that grow approval gates and persistence requirements into LangGraph. If you expect that path, keep your tool definitions and prompts in framework-neutral modules from day one, because tools written as plain functions port in an afternoon while orchestration never does.
Whichever you pick, do not skip evaluation infrastructure. OpenAI's hosted Evals product is part of the November 2026 shutdown, so on either framework you should own your regression tests: a dataset of real cases, a script that replays them, and a threshold that blocks deploys. That asset outlives every framework decision on this page.
Where both projects stand in mid 2026
The Agents SDK has matured fast since its March 2025 launch, adding sessions as a persistent memory layer, richer guardrails, and a growing multi-provider story, while staying pre-1.0. The version number is honest signaling: the project moves quickly and minor releases still adjust APIs. It gained institutional weight in June 2026 when OpenAI named it the migration target for Agent Builder, which effectively makes it OpenAI's flagship agent framework.
LangGraph spent the same period consolidating. The 1.0 release in October 2025 froze the core API, the 1.2.x line through July 2026 has focused on performance and platform integration, and the repository sits around 37 thousand stars. LangChain has increasingly positioned LangGraph as the runtime under its commercial agent platform, which means the open source core is load-bearing for their business and unlikely to be neglected.
If you are deciding today, weigh stability against gravity. LangGraph offers a stable API and provider neutrality; the Agents SDK offers the gravitational pull of the largest model provider actively consolidating its agent story around it. Both are safe technical choices in July 2026. The unsafe choice is building on hosted abstractions above either one without an exit plan, a lesson Agent Builder users learned on a fourteen-month clock.
At a glance
OpenAI Agents SDK vs LangGraph feature and cost comparison (July 2026)
| Dimension | OpenAI Agents SDK | LangGraph |
|---|---|---|
| Core model | Managed agent loop with handoffs | Explicit graph with typed state |
| Maturity | v0.18.x, fast-moving, pre-1.0 | v1.2.x, no breaking changes until 2.0 |
| Model providers | OpenAI-first, 100+ models via adapters | Provider-neutral by design |
| Human-in-the-loop | Supported, lighter-weight | Native interrupts with durable pause and resume |
| Tracing | Built into OpenAI platform at no extra fee | LangSmith, free tier then $39 per seat monthly |
| Persistence | Sessions for conversational memory | Checkpointing designed for long-running workflows |
| Platform risk | Hosted layers above SDK can be retired, as Agent Builder was | Open source core plus optional paid platform |
| License | MIT | MIT |
What mistakes should you avoid?
- Choosing an SDK before mapping the workflow and its control needs
- Ignoring human approval requirements on actions with write access
- Skipping trace and evaluation planning until failures appear
- Using LangGraph's graph complexity for a simple tool-calling assistant
- Overlooking multi-provider needs by committing to an OpenAI-native path too early
- Failing to document logic, leaving the workflow hard to port later
FAQ
- Can the OpenAI Agents SDK replace LangGraph?
- For many tool-and-handoff workflows, yes, especially inside the OpenAI ecosystem. For explicit graph state, durable persistence, and complex human review, LangGraph may still be the better fit. Match the tool to how much state and control the workflow needs.
- Which is easier for beginners?
- The OpenAI Agents SDK is often easier to start with because tools, handoffs, and tracing are built in. LangGraph asks you to model state explicitly, which is more to learn but more controllable. Beginners should first understand workflow design and risk controls regardless of tool.
- Which is better for multi-provider setups?
- LangGraph is generally the safer choice if you want to use models from more than one provider or avoid tying your stack to OpenAI. The Agents SDK is optimized for the OpenAI ecosystem. If provider flexibility matters, weight toward LangGraph.
- Which handles human-in-the-loop better?
- LangGraph makes pause, approve, edit, and resume first-class through interrupts and persistence. The Agents SDK can support review but keeps orchestration lighter and more linear. For workflows built around approval gates, LangGraph is the more direct fit.
- Can I switch between them later?
- Yes, but you rebuild the orchestration, so the portable assets are your prompts, tools, and documented logic. Capture those as you build to keep the option open. Since both change quickly, plan to revisit the decision.
- Which should a team learn first?
- Learn workflow design and risk controls first, then pick based on state, review, deployment context, and provider needs. Understanding the process makes either framework easier to apply well. The design choices outlast the specific SDK.
Sources & further reading
Done for you
Want this built for your business?
Tell us the workflow. We scope, build, and ship the agent with guardrails and the numbers to prove it worked. The scoping call is free.
Free scoping call. You own the code.
Was this page helpful?

