← all writing
// engineering · 2026 q4Agent SDKsLangGraphArchitecture

Claude Agent SDK vs LangGraph: when each wins.

2026-11-16 · 9 min

In February we rewrote a LangGraph pipeline into roughly three files and a config. The old version was a six-node graph: an intent classifier, a policy lookup, a guardrail evaluator, a router, a human review node, and a retry edge between the router and the reviewer. By the end of the week it was one Claude Agent SDK loop with three MCP servers and a reviewer webhook, and the code was about forty percent shorter. Nothing it did got worse.

Six weeks later we shipped something else that would have been nonsense without a graph. Same team, same stack, different shape of problem. The question isn't which framework is better. It's which one fits the work in front of you — and the answer moved under us this year.

What changed under us

The SDKs grew up. Claude Agent SDK and OpenAI Agents SDK both landed in 2026 with tool-use loops, memory primitives, handoffs between sub-agents, and MCP as a first-class way to attach tools. A lot of what LangGraph was carrying — "give me a reasonable loop around a model, with retries and a replay-safe trace" — is what the SDK does out of the box now. You still write the business logic. You stop writing the plumbing around it.

Rough count from our engagements this year: around seventy percent of the pipelines we used to reach for LangGraph for, we now ship as an SDK loop plus a handful of MCP servers. Shorter code, fewer moving pieces, same semantics. The remaining thirty percent is what the rest of this post is about.

The tree we actually use

Three questions, in order. The first yes decides it.

1. More than one agent, distinct owners?

If there are two agents with different tool scopes, different prompts, different deploy cadences, and different people reviewing changes to them, the SDK's sub-agent pattern blurs the line between parent and peer. You end up modeling what should be a lateral handoff as a nested call. It works. Then the second team asks why their agent's version gets bumped every time the first team ships — and you find out it's because the two live in the same process.

LangGraph makes that handoff an edge with a typed contract and its own observability. Two owners, two release cadences, one topology both can read. That's the thing worth paying for.

2. Is the topology itself the audit artifact?

In regulated flows — FNOL, claims routing, loan underwriting, prior auth — the auditor doesn't want to read the prompt. They want to see which edge fired for claim 29481 and why. LangGraph produces a page they can read. The SDK produces a trace you then explain in a slide. Both can be made correct. Only one of them answers the first question before they ask the second.

3. Cycles with external gates?

Bounded retry loops that cross a human review node are the shape SDK-only code keeps breaking on. The review has to be a node — typed input, typed output, timeout, SLA. An SDK that models the reviewer as a webhook or a callback inevitably loses the input when the ops team asks, six weeks later, what the reviewer actually saw. LangGraph treats the reviewer as a node by default: the input is captured, the timeout is explicit, and the whole thing replays.

What we got wrong

Early in 2026 we tried to port a four-agent LangGraph pipeline onto Agent SDK sub-agents because the SDK had just added handoff support and we wanted to see how far it had come. The primitives weren't quite finished. We ended up re-implementing the router, the retry policy, and the reviewer node as hand-rolled state code sitting on top of the SDK. Three months later the SDK caught up and we ripped our code out.

Net cost: six engineering-weeks, no new capability. The lesson we now bring into every engagement: don't rewrite a graph into an SDK until the SDK has the primitive you're replacing. The gap closes fast — but not in the quarter you were hoping.

The shape of the two now

The honest framing is this isn't SDK versus LangGraph. It's where the graph lives. For single-actor work the graph is implicit in the SDK's loop, and it's fine to leave it implicit — reading the SDK's trace is enough. For multi-actor regulated work you want the graph to be a thing people can point at during a review. Same underlying primitive. Different physics for who reads it and when.

Most new work this year starts on the SDK with MCP for tools. The pipelines that end up on LangGraph are the ones that fail the first question — two or more agents, distinct owners. There are fewer of those than you'd guess going in. There are also always more than zero.

// continue

MCP in production: what it changed, and where it didn't.