LangGraph.js
A framework for building agents as a graph of steps with shared, saved state.
Last updated
Analogy
XState or a Redux reducer, but each state transition might call an LLM.
In an agent
Reach for it when your agent needs branches, approvals, memory or recovery after a crash.
Practice
Flashcards
- Interview: what does LangGraph add to LangChain?Explicit graphs with state, checkpoints, interrupts and routing, so complex agents are easier to control.
Interview questions
- Why LangChain / LangGraph, and why not?
- LangChain saves boilerplate for RAG: loaders, splitters, retrievers.
- LangGraph gives state, checkpoints, interrupts and routing for complex agents.
- For simple cases, skip them and use the SDK directly to avoid needless abstraction.
Questions people ask
What is LangGraph.js?
LangGraph.js is a framework for building agents as a graph of steps that share saved state. Nodes are functions, edges decide what runs next, and a checkpointer stores the state after each step. It suits agents that need branches, human approvals, memory across sessions or recovery after a crash.
What is the difference between LangChain and LangGraph?
LangChain gives you building blocks: model wrappers, loaders, splitters, retrievers and tools. LangGraph is for orchestration: it runs those blocks as a graph with shared state, branching, checkpoints and interrupts. Many projects use LangChain parts inside LangGraph nodes. A simple RAG pipeline may need only LangChain.