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

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.
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.
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.
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:
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.
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.
All three can call models from more than one vendor, but each is easiest on its home platform.
If your organisation already standardised on one cloud's model access, that usually decides more than any feature table.
The libraries are free, so the bill is model calls, and the number of calls depends on the pattern rather than the brand.
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.
Choose the OpenAI Agents SDK when:
Choose LangGraph when:
Choose Strands Agents when:
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.
Build one realistic agent in each shortlisted framework and measure the same things:
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.
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.
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.
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.
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.
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.
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.
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.
Strands Agents vs LangGraph: model-driven agent loop vs graph-based state machine. Compare code size, checkpointing, approval gates and control trade-offs.
AI EngineeringCrewAI vs LangGraph vs AutoGen for multi-agent orchestration: role crews, state graphs and group chat compared on control, state, HITL and 2026 status.
AI EngineeringAgent orchestration frameworks 2026 compared: LangChain, AgentCore, LangGraph, CrewAI, AutoGen and Strands on coordination, memory, cost and deployment.
AI Agent Development