The Elevator Pitch
LangChain is a toolkit for composing LLM-powered applications from reusable components. LangGraph is a workflow engine built on top of LangChain for building stateful, cyclical AI agent workflows. They complement each other; LangGraph uses LangChain components as its building blocks.
LangChain: What It's Good At
LangChain excels at linear, pipeline-style workflows. Summarization, extraction, RAG (Retrieval Augmented Generation) — these are perfect LangChain use cases. The LCEL syntax is clean and composable for these patterns.
LangGraph: What It Adds
LangGraph adds the ability to define workflows as graphs with explicit state, conditional branching, and loops. The key capability LangChain alone doesn't have is cycles — the ability for an agent to check its own work and retry. LangGraph also provides first-class support for persistence and human-in-the-loop workflows.
The Decision Framework
Use LangChain alone when your workflow is essentially linear: input → processing → output. Add LangGraph when your workflow is iterative or conditional — anything that would require if/else logic or loops in traditional programming.
Practical Tip
Start with LangChain to understand the building blocks. Then learn LangGraph for anything agent-related. This sequence matches how the frameworks were designed to be used.