AI Engineering••19 min read

OpenAI Agents SDK vs LangGraph vs Strands Compared

OpenAI Agents SDK vs LangGraph vs Strands Agents: handoffs, state graphs and model-driven loops compared on approvals, state, models and fit.

OpenAI Agents SDK vs LangGraph vs Strands Compared

TL;DR: The OpenAI Agents SDK, LangGraph and Strands Agents are open-source frameworks for building tool-calling LLM agents. The OpenAI Agents SDK coordinates agents through handoffs and guardrails. LangGraph runs agents as an explicit, checkpointed state graph. Strands Agents, from AWS, lets the model drive a minimal agent loop. Pick the OpenAI Agents SDK for OpenAI-centric products, LangGraph for durable and auditable workflows, and Strands for AWS and Bedrock deployments.

Already narrowed it down to two? The Strands vs LangGraph comparison covers that pair in depth, and the CrewAI vs LangGraph vs AutoGen guide covers the role-based and conversational frameworks. This page is about the three SDKs teams most often shortlist for a production agent in late 2026.

Key Takeaways

  • The three frameworks put control in different places. In the OpenAI Agents SDK the model decides when to call tools or hand off to another agent. In LangGraph your graph's edges decide what can happen next. In Strands the model runs the loop and you shape it with hooks.
  • All three now support human approval of a tool call that survives a pause: `needs_approval=True` plus `RunState` in the OpenAI Agents SDK, `interrupt()` plus a checkpointer in LangGraph, and `event.interrupt()` in a Strands hook.
  • LangGraph has the strongest durability model: a checkpoint after every step, keyed by `thread_id`, gives resume after a crash, replay and forking. The other two persist conversation history through sessions rather than full step-level execution state.
  • None of them locks you to one model vendor, but each has a home ground. The OpenAI Agents SDK is tuned for the OpenAI Responses API, Strands defaults to Amazon Bedrock, and LangGraph is neutral through LangChain's model integrations.
  • For multi-agent work, the OpenAI Agents SDK offers handoffs and agents-as-tools, Strands offers agents-as-tools plus `Graph` and `Swarm`, and LangGraph treats every multi-agent pattern as a graph you build.
  • The framework is free in every case. Cost comes from model calls, and the number of calls depends on how much routing you delegate to the model.

What are the OpenAI Agents SDK, LangGraph and Strands Agents?

All three frameworks answer the same question: how do you write the loop in which a language model reads a request, calls tools, reads the results and decides what to do next? They differ in who owns that loop and how much structure sits around it.

The OpenAI Agents SDK is OpenAI's MIT-licensed framework for Python (openai-agents, version 0.25 on PyPI in November 2026) and TypeScript (@openai/agents, version 0.22 on npm). It is the production successor to OpenAI's experimental Swarm project. Its vocabulary is small: an Agent is instructions plus tools, a Runner executes the agent loop, handoffs let one agent transfer the conversation to another, guardrails validate input, output and tool calls, sessions store conversation history, and tracing records every model call, tool call and handoff. It works best with the OpenAI Responses API, and it can call other providers through OpenAI-compatible endpoints or the LiteLLM integration.

LangGraph is the LangChain team's MIT-licensed orchestration library for Python (langgraph, version 1.2 on PyPI) and JavaScript/TypeScript (@langchain/langgraph). It is lower-level than the other two. You define a typed state, add nodes that read and update it, and connect them with edges, including conditional edges that route on the current state. A checkpointer saves state after every step, and that one mechanism provides memory, interrupt()-based human-in-the-loop, crash recovery and time-travel debugging. LangChain's create_agent and the prebuilt ToolNode cover the common tool-calling loop, so you write a custom graph only when you need custom control flow.

Strands Agents is AWS's Apache-2.0-licensed, model-driven SDK for Python (strands-agents, version 1.65 on PyPI) and TypeScript (@strands-agents/sdk). You give an Agent a system prompt and a list of @tool functions, and the model drives the loop until the task is done. The framework keeps out of the way, and you customise behaviour through hooks (for example, before every tool call), interrupts, session managers and conversation managers. Strands defaults to Amazon Bedrock, supports Anthropic, OpenAI, Ollama, LiteLLM and other providers, and includes Graph and Swarm for multi-agent systems. It is the framework AWS uses in its own agent samples and pairs naturally with Amazon Bedrock AgentCore for hosting.

How do the OpenAI Agents SDK, LangGraph and Strands compare at a glance?

How does each framework decide what the agent does next?

This is the choice that shapes everything else, so it is worth understanding before looking at code.

The OpenAI Agents SDK delegates decisions to the model, inside a fixed vocabulary. On each turn the Runner calls the current agent's model. If the model returns tool calls, the runner executes them and loops. If it calls a handoff, the conversation moves to the target agent, which now owns the loop with its own instructions and tools. If it returns a final output, the run ends. You control behaviour by deciding which tools and handoffs each agent can see, by setting max_turns, and by attaching guardrails. You do not draw the flow; you limit the moves available.

LangGraph makes you draw the flow. The model still decides inside a node (which tool to call, what to write), but the set of possible next steps is fixed by the edges you wrote. A validation failure can only loop back to the writer if you drew that edge, and a compliance step cannot be skipped if no edge goes around it. That is the property auditors and reviewers care about: you can show the possible paths from the code and see the path a run took in its checkpoint history.

Strands trusts the model to run the loop and gives you hooks to intervene. The design bet is that frontier models are good at planning, so the framework should stay thin and let better models produce better agents without framework changes. When you need control, you attach callbacks to lifecycle events. A BeforeToolCallEvent hook can inspect a tool call, cancel it, replace the tool, or interrupt the run for a human. Structure is added where you need it rather than declared up front.

A short way to remember them: the OpenAI Agents SDK is a relay team that passes the baton between specialists, LangGraph is a state machine you design, and Strands is a capable worker with a supervisor who can step in.

How much code does a support agent with an approval gate take in each?

The same task shows the difference in style: a support agent that can look up an order and issue a refund, where the refund must wait for human approval. Each example is the complete agent definition plus the approval loop. We checked that every example imports and builds against the current release of its library (openai-agents 0.25.0, langgraph 1.2.22, strands-agents 1.65.0). We did not run them against a live model, so no latency or quality comparison comes from them.

OpenAI Agents SDK: a triage agent hands billing questions to a billing agent, and the refund tool is marked needs_approval=True.

LangGraph: an explicit agent-and-tools loop, with interrupt() inside the refund tool and a checkpointer so the paused run can be resumed, including from another process once you use a SQLite or Postgres checkpointer.

Strands Agents: one agent with both tools, and a hook that interrupts before any refund runs.

What the three versions show:

  • The OpenAI Agents SDK expresses the most structure in the fewest concepts. The handoff, the approval flag and the session are each one argument.
  • LangGraph is the longest because the loop itself is visible: you can see the `agent → tools → agent` cycle, and you could add a validation node or a second approval step just by adding nodes and edges.
  • Strands keeps the agent definition shortest and puts the policy in a hook, separate from the tool. One hook can guard many tools, which suits teams that want a central approval policy rather than a flag on each tool.

How do they handle state, memory and long-running work?

LangGraph treats execution state as the main asset. Every step writes a checkpoint keyed by thread_id, so a run that waits three days for an approval, or dies halfway through, resumes from the exact node where it stopped. You can list a thread's checkpoint history, replay from an earlier one or fork a run to test a different path. A separate store holds long-term memory shared across threads. For workflows measured in hours or days, this is the most complete model of the three.

The OpenAI Agents SDK separates conversation memory from run state. A session (SQLiteSession, plus Redis, SQLAlchemy, MongoDB, Dapr, encrypted and OpenAI Conversations-backed variants) stores conversation items so the next Runner.run sees the history automatically. A paused run is captured separately as a RunState, which you can serialise, store and resume later when a person approves a tool call. What you do not get is a step-by-step checkpoint history to replay from; for crash-proof execution you pair it with a durable-execution engine such as Temporal, which ships an OpenAI Agents SDK integration.

Strands persists the agent through session managers. FileSessionManager and S3SessionManager store conversation and agent state, and the newer SnapshotSessionManager takes immutable snapshots that an agent can be restored from. Interrupt state is kept by the session manager between the pause and the human's reply. Multi-agent Graph and Swarm runs have their own session support. Durability is solid for conversations and approvals, but like the OpenAI SDK it is not a per-step execution log.

How do they handle multi-agent systems?

OpenAI Agents SDK. Two patterns. A handoff transfers control: the triage agent hands the user to the billing agent, which then talks to the user directly. Agents-as-tools keep control with a manager: billing.as_tool(...) lets the manager call billing like a function and use its answer. Handoffs suit customer-facing routing; agents-as-tools suit an orchestrator that combines specialist results.

LangGraph. Every pattern is a graph you build: a supervisor node that routes to specialist agents, handoffs that return a Command(goto=...) to jump to another agent node, or subgraphs that embed one compiled graph inside another. This costs more code, but each agent boundary is a checkpointed node, so multi-agent runs get the same resume, approval and replay behaviour as single-agent ones.

Strands. Three patterns. Agents-as-tools wraps one agent as a tool of another. GraphBuilder builds a deterministic DAG or cyclic graph of agents with conditional edges, execution limits and timeouts. Swarm lets a group of agents hand work to each other autonomously, sharing context, with limits on handoffs and iterations. This gives Strands both a model-driven option (Swarm) and an explicit one (Graph) without leaving the SDK.

Which framework works best with which models and clouds?

All three can call models from more than one vendor, but each is easiest on its home platform.

  • OpenAI Agents SDK: first-class support for the OpenAI Responses API, hosted tools (web search, file search, code interpreter, hosted MCP) and realtime voice agents. Other providers work through OpenAI-compatible endpoints or the LiteLLM extension, but hosted tools and some features only exist on OpenAI. Tracing goes to the OpenAI dashboard by default; you can add your own trace processors or turn it off, which matters for data-residency reviews.
  • LangGraph: model-neutral by design. Any LangChain chat model works, so moving between OpenAI, Anthropic, Bedrock, Gemini or a local model is a one-line change. Deployment options include self-hosting and the commercial LangSmith deployment platform.
  • Strands: defaults to Amazon Bedrock, so IAM, VPC endpoints, Bedrock Guardrails and CloudWatch fit without extra work, and agents package directly for Amazon Bedrock AgentCore Runtime. Anthropic, OpenAI, Ollama, LiteLLM and other providers are supported through model provider classes.

If your organisation already standardised on one cloud's model access, that usually decides more than any feature table.

Which framework is cheapest and fastest to run?

The libraries are free, so the bill is model calls, and the number of calls depends on the pattern rather than the brand.

  • A single agent with tools costs about the same in all three: one model call per turn plus tool execution. Framework overhead is small next to model latency.
  • Handoffs and model-driven routing add calls. In the OpenAI SDK the triage agent spends a turn choosing to hand off, and in a Strands Swarm each agent decides whether to pass work on. A LangGraph router that uses a plain Python function instead of a model call costs nothing extra.
  • Guardrails can add calls. An OpenAI SDK input guardrail that runs a classifier agent is another model call per run, though it can run in parallel with the main agent.
  • Context size grows with history. All three pass conversation history to the model; use LangGraph's state design, Strands' conversation managers or the OpenAI SDK's session settings and compaction to keep prompts small.

Set max_turns (OpenAI SDK), a recursion limit (LangGraph) or execution limits (Strands) on every agent, and measure tokens per run on your own workload over several runs before choosing on cost.

When should you choose the OpenAI Agents SDK, LangGraph or Strands?

Choose the OpenAI Agents SDK when:

  • Your product runs mainly on OpenAI models and you want hosted tools, realtime voice and built-in tracing with little setup.
  • The workflow is customer-facing routing between specialists, which handoffs model directly.
  • You want guardrails as a first-class concept and approvals expressed as a flag on a tool.

Choose LangGraph when:

  • The workflow has branches, loops, retries, parallel steps or several approval points.
  • Runs must survive restarts, wait days for a human, or be replayed for debugging and audit.
  • You need to prove which paths an agent can take, or you want to switch model vendors freely.

Choose Strands Agents when:

  • You deploy on AWS, use Bedrock models, or plan to host on Bedrock AgentCore.
  • You want the shortest path to a working agent and prefer to add control through hooks rather than graphs.
  • You want both model-driven (Swarm) and explicit (Graph) multi-agent patterns in one SDK.

These are not exclusive. A common production shape is a LangGraph graph as the durable outer workflow, with an OpenAI Agents SDK or Strands agent called inside one node for the open-ended part. Keep tools as plain functions and business rules out of prompts, so changing frameworks means rewriting orchestration, not the work itself.

How should you evaluate these frameworks before committing?

Build one realistic agent in each shortlisted framework and measure the same things:

  1. Task success over at least ten runs, because model-driven loops vary from run to run.
  2. Tokens and latency per run, including handoff, routing and guardrail calls.
  3. Pause and resume: approve a tool call an hour later from a different process, and confirm the run continues correctly.
  4. Crash behaviour: kill the process mid-run and see what can be recovered.
  5. Observability: check you can see every model call, tool call and handoff in the tracing tool you already use, and confirm where trace data is sent.
  6. Model portability: swap the model once and note what breaks.

Start with a single agent and good tools. Add a second agent only when one agent measurably fails, because each extra agent adds coordination calls and new failure modes.

Frequently Asked Questions

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

The OpenAI Agents SDK is a lightweight framework where the model drives the loop and agents coordinate through handoffs, with guardrails, sessions and tracing built in. LangGraph is a lower-level orchestration library where you define the workflow as a state graph with a checkpoint after every step. The OpenAI SDK is faster to start with; LangGraph gives more control and stronger durability.

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

Both are model-driven SDKs where the LLM decides which tools to call. The OpenAI Agents SDK is built around handoffs and guardrails and is tuned for OpenAI models and hosted tools. Strands Agents, from AWS, defaults to Amazon Bedrock, customises behaviour through hooks, and adds Graph and Swarm for multi-agent systems.

Can the OpenAI Agents SDK use non-OpenAI models?

Yes. The SDK can call any OpenAI-compatible endpoint and other providers through its LiteLLM integration. Some features, such as OpenAI hosted tools and the default tracing destination, are specific to the OpenAI platform, so test the features you rely on with your chosen model before committing.

Which framework is best for human-in-the-loop approvals?

All three can pause a tool call for human approval and resume later. LangGraph is the easiest to verify for long waits because the pause is saved in a checkpoint and the gate is part of the graph structure. The OpenAI Agents SDK uses needs_approval with a serialisable RunState, and Strands uses interrupts raised from hooks.

Is Strands Agents only for AWS?

No. Strands is open source under Apache-2.0 and supports Anthropic, OpenAI, Ollama, LiteLLM and other model providers. It defaults to Amazon Bedrock and integrates most smoothly with AWS services such as Bedrock Guardrails and Bedrock AgentCore, which is why it is most popular with AWS-based teams.

Can you combine LangGraph with the OpenAI Agents SDK or Strands?

Yes. A LangGraph node is ordinary code, so it can run an OpenAI Agents SDK agent or a Strands agent and write the result back into graph state. This gives you LangGraph's checkpoints and approval gates around a model-driven agent. Share tools as plain functions so both layers can use them.

Sources

📬 Get this weekly →

Subscribe to the newsletter

By subscribing, you agree to our Terms of Service and Privacy Policy.

About the Author

Aaron is an engineering leader, software architect, and founder with 18 years building distributed systems and cloud infrastructure. Now focused on LLM-powered platforms, agent orchestration, and production AI. He shares hands-on technical guides and framework comparisons at fp8.co.

Cite this Article

Aaron. "OpenAI Agents SDK vs LangGraph vs Strands Compared." fp8.co, November 18, 2026. https://fp8.co/articles/openai-agents-sdk-vs-langgraph-vs-strands-agents

Related Articles

Strands vs LangGraph: 2026 Agent SDK Comparison

Strands Agents vs LangGraph: model-driven agent loop vs graph-based state machine. Compare code size, checkpointing, approval gates and control trade-offs.

AI Engineering

CrewAI vs LangGraph vs AutoGen: Multi-Agent Compared

CrewAI vs LangGraph vs AutoGen for multi-agent orchestration: role crews, state graphs and group chat compared on control, state, HITL and 2026 status.

AI Engineering

Agent Orchestration Frameworks 2026: 6 Best Compared

Agent orchestration frameworks 2026 compared: LangChain, AgentCore, LangGraph, CrewAI, AutoGen and Strands on coordination, memory, cost and deployment.

AI Agent Development