What's the difference between the Claude Agent SDK and LangGraph?
The Claude Agent SDK wraps the Claude Code binary as a library and runs only Claude, which decides for itself which built-in tool to call next; LangGraph is a low-level, model-agnostic runtime where you define the nodes, the edges between them, and one shared state object by hand, mixing deterministic steps with LLM-driven ones in the same graph. Delegation looks different as a result: the Claude SDK spawns a subagent for a focused subtask, one level of its own implicit loop, while a LangGraph agent is only as complex as the graph you build, matching Claude’s simple loop only if you chose to draw it that way.
LangGraph’s own distinctive piece is checkpointing: state is persisted after every node, so a run that fails partway through re-invokes from the checkpoint just before the failing node instead of starting over. The Claude Agent SDK has sessions that resume or fork between conversations, but nothing checkpoints progress inside a single run. Tracing splits along a similar line: LangGraph’s native path is LangSmith, while the Claude Agent SDK’s OpenTelemetry spans are still behind a beta flag and use Claude Code’s own names rather than the GenAI ones.
sources
- Claude Docs: Agent SDK overview fetched
- LangGraph documentation: Overview fetched