LangChain vs. LangGraph vs. Deep Agents
Three layers of the same stack — not competing frameworks. Here is when each layer earns its place, what it costs you, and how to migrate down when your requirements outgrow it.
Quick Reference
- →LangGraph = runtime: stateful graphs, checkpointing, streaming — the engine everything else runs on
- →LangChain = framework: unified LLM interface, composable middleware, provider abstraction
- →Deep Agents = harness: batteries-included, auto-compression, virtual filesystem, subagent spawning
- →Every Deep Agent is a LangChain agent; every LangChain agent runs on LangGraph
- →For a simple one-call tool loop, skip all three — raw SDK is zero overhead and full control
- →Migration is always downward: your tools and prompts survive every layer drop
- →Deep Agents auto-compression is silent — it can rewrite your message history without warning
When You Don't Need Any of These
If your agent does one thing — call a tool, get a result, return it — you do not need LangChain, LangGraph, or Deep Agents. The Anthropic SDK handles it in 30 lines. Every framework adds import time, graph compilation overhead (150–200ms cold start), and a new API surface to maintain. Before picking a framework, ask: can you describe your agent loop in a single function you can read top to bottom? If yes, write that function first.
LangGraph's StateGraph.compile() adds ~150ms per process startup. Deep Agents adds ~200ms. For Lambda functions or edge workers handling bursts of short-lived requests, that overhead compounds. Measure before adopting — a warm Docker container amortizes the cost; a cold Lambda does not.