# OpenAI Agents SDK (Python) vs LangGraph

## TL;DR

The OpenAI Agents SDK is a small set of primitives: agents, tools, handoffs, guardrails, sessions and tracing, run by a `Runner` loop. LangGraph is a graph runtime with typed state and checkpoints at every step. The SDK suits handoff-style assistants with little orchestration code; LangGraph suits workflows that need explicit branching and durable, resumable state.

## Facts side by side

|  | [OpenAI Agents SDK (Python)](https://multiagentguide.top/tools/openai-agents-sdk.md) | [LangGraph](https://multiagentguide.top/tools/langgraph.md) |
| --- | --- | --- |
| Type | Framework | Framework |
| Languages / SDKs | Python | Python |
| License | MIT | MIT |
| Pricing model | [Open source, free](https://developers.openai.com/api/docs/pricing) | [Open core](https://www.langchain.com/pricing) |
| Orchestration pattern | Handoff | Graph |
| GitHub stars | 29,784 (as of 2026-09-30) | 42,511 (as of 2026-09-30) |
| GitHub forks | 4,837 | 7,201 |
| Last push | 2026-09-30 | 2026-09-29 |
| Latest release | v0.22.3 | cli==0.4.32.dev0 |
| Repository | [openai/openai-agents-python](https://github.com/openai/openai-agents-python) | [langchain-ai/langgraph](https://github.com/langchain-ai/langgraph) |
| Website | [openai.github.io](https://openai.github.io/openai-agents-python/) | [www.langchain.com](https://www.langchain.com/langgraph) |
| Documentation | [openai.github.io](https://openai.github.io/openai-agents-python/) | [docs.langchain.com](https://docs.langchain.com/oss/python/langgraph/overview) |
| Last verified | 2026-09-30 | 2026-09-30 |
| MCP support | [Yes (checked 2026-09-30)](https://openai.github.io/openai-agents-python/mcp/) | [Yes (checked 2026-09-30)](https://docs.langchain.com/langsmith/server-mcp) |
| A2A support | [No (checked 2026-09-30)](https://github.com/openai/openai-agents-python/issues/472#issuecomment-5192125355) | [Yes (checked 2026-09-30)](https://docs.langchain.com/langsmith/server-a2a) |
| AG-UI support | Unknown (checked 2026-09-30) | [Partial (checked 2026-09-30)](https://docs.langchain.com/oss/python/langchain/frontend/integrations/copilotkit) |
| Install verified | 2026-09-30 | 2026-09-30 |

## Choose OpenAI Agents SDK (Python) if

- Your design is a triage agent handing off to specialists, or a manager calling specialists via `Agent.as_tool()`.
- You want guardrails, sessions and tracing included without choosing extra components.
- You are mostly on OpenAI models and want hosted tools (including hosted MCP) through the Responses API.

## Choose LangGraph if

- You need explicit graphs with conditional edges, parallel branches and per-key state reducers.
- You need checkpoint-based resume, replay and forking (time travel).
- You need an A2A endpoint: the Agents SDK maintainers have said an SDK-owned A2A layer is not planned, while Agent Server exposes LangGraph assistants over A2A.

## Migration notes

SDK to LangGraph: each `Agent` becomes a node (or a subgraph), each handoff becomes a conditional edge or a `Command` that routes to another node, and session history moves into graph state persisted by a checkpointer. Tool approvals (`needs_approval=True`) map to `interrupt()` calls. LangGraph to SDK: graphs with fixed branching have no direct equivalent; the SDK docs suggest orchestrating such flows in plain Python around `Runner.run()` calls. Tracing is on by default in the SDK and sent to OpenAI's traces dashboard unless you configure other processors; LangGraph tracing goes through LangSmith if you enable it. The SDK is still on 0.Y.Z versions where minor releases may break interfaces.

## FAQ

### Does the OpenAI Agents SDK only work with OpenAI models?

No. Its README states support for the Responses and Chat Completions APIs and 100+ other LLMs. Hosted tools and the traces dashboard are OpenAI services.

### Which one handles long-running, resumable work better?

LangGraph checkpoints a thread's state at every step and can resume or fork from any checkpoint. The Agents SDK can serialize and resume paused runs (for approvals) and keeps history in sessions, but it has no step-level checkpoint model.

### Which one supports A2A?

LangGraph: yes, via Agent Server's `/a2a/{assistant_id}` endpoint. OpenAI Agents SDK: no, per a maintainer comment cited on its tool page; you can wire the separate `a2a-sdk` by hand.

---

Data as of 2026-09-30. Not affiliated with listed projects. HTML version: https://multiagentguide.top/compare/openai-agents-sdk-vs-langgraph
