The query that keeps showing up in my logs is "claude agent sdk vs langgraph," and it is the wrong shape. People type it expecting a bake-off, two products lined up so one can win. What they actually have is a category error wearing a comparison's clothes. These tools do not compete at the same layer, and figuring out which layer you are standing on is most of the decision.
So let me try to make you smarter about the layer before you pick the tool.
What each one actually is
The Claude Agent SDK is the harness that runs Claude Code, extracted into a library. Anthropic renamed it from the Claude Code SDK in the 0.1.0 release, which is also where ClaudeCodeOptions became ClaudeAgentOptions and the Claude Code system prompt stopped being injected by default. The rename was honest: the thing that drives a coding agent turns out to drive a lot of agents. It ships in Python (pip install claude-agent-sdk, 3.10+) and TypeScript (@anthropic-ai/claude-agent-sdk), with built-in Read, Write, Edit, Bash, Grep, Glob, WebSearch and WebFetch tools, plus hooks, subagents, sessions, MCP support and a permission system. Per Anthropic's own framing, the agent runs a loop: gather context, take action, verify the work, repeat.
The key thing the docs say out loud: with the lower-level Anthropic Client SDK you write the tool loop, the while response.stop_reason == "tool_use" dance. With the Agent SDK, "Claude handles tools autonomously." That sentence is the whole product.
LangGraph is a different animal. It calls itself "a low-level orchestration framework for building, managing, and deploying long-running, stateful agents," and it means low-level. You model your application as a graph: nodes do work, edges decide what runs next, and a shared state object threads through it. LangGraph gives you durable execution that resumes after failure, human-in-the-loop interrupts, short- and long-term memory, and streaming. It hit 1.0.0 on October 17, 2025, sits at 1.2.6 as of mid-June 2026, and is model-agnostic by design, OpenAI, Gemini, Claude, whatever you wire in.
The one distinction that matters
Here is the insight I want you to keep. The real choice is not Anthropic versus LangChain. It is inherit a loop or own the graph.
The Agent SDK hands you Anthropic's production agent loop with the tools, the context compaction, the subagent spawning and the permission gates already wired up. You inherit decisions a team made while shipping Claude Code to millions of sessions. You did not make those decisions; you cannot easily unmake them. The price of that leverage is coupling: the loop is Claude's loop, and while the SDK authenticates through Bedrock, Vertex and Azure, it runs Claude models. This is a harness, and a harness has opinions.
LangGraph hands you almost nothing pre-decided, and that is the point. There is no built-in agent loop because you are going to write it as a graph. Want a node that calls a model, an edge that routes to a tool node, a checkpoint that lets a human approve before the irreversible step? You build it. You own the control flow, the model choice, the state schema. The price is that you own all of it, including the parts the Agent SDK would have handled while you slept.
Inheriting a loop is leverage you didn't earn and can't fully audit. Owning the graph is control you have to pay for in code, every line.
Neither price is wrong. They are just different debts.
Use the Claude Agent SDK when
- Your problem is shaped like the one it was built for: a coding agent, a filesystem agent, anything that reads files, runs commands and edits things. The toolset is the problem domain, pre-assembled.
- You want to ship this week. The loop, tools and permissions exist; you are configuring, not constructing.
- You are happy on Claude, or actively want to be. Coupling is a feature when you have chosen the thing you are coupled to.
- You want subagents and MCP without orchestrating them yourself. Define an
AgentDefinition, gate it behind theAgenttool, done.
Use LangGraph when
- You need explicit control flow: deterministic steps interleaved with agentic ones, cyclic graphs, branching that you can point to on a diagram and defend in review.
- You are multi-model, or refuse to be single-model. Routing cheap requests to a small model and hard ones to a frontier model is a graph edge, not a fight with a harness.
- Durable execution and human-in-the-loop are requirements, not nice-to-haves: long jobs that survive a crash and resume, approval gates before money moves. That is what companies like Klarna, Uber and Replit are leaning on it for.
- The agent's behavior is the product and you need to inspect, replay and modify state at every step.
The honest middle
You can also use both, because they are not the same layer. LangGraph as the durable, model-agnostic orchestrator; a Claude Agent SDK call inside a node when one step really is "go fix this codebase." Nothing stops you, and for a system with one genuinely agentic sub-task buried in an otherwise deterministic pipeline, it is the obvious move.
What you should not do is treat the search query as a real fork in the road. "Which is better" has no answer because better is doing different jobs. The answer that survives contact with production is the boring one: name the layer you are working at. If you are building the loop, you want a graph. If you are renting a loop, you want a harness. Pick the debt you would rather carry, and stop reading comparison posts, this one included.



