Why LangGraph exists
Plain LangChain chains are linear: input flows through a sequence of steps, each producing the next input. That works for simple RAG, but breaks for anything with branches, loops, or human intervention.
LangGraph is LangChain's answer: a small graph library where nodes are functions (often LLM calls or tools) and edges are routing rules between them. You define the graph; LangGraph runs it. It handles state, checkpointing, branching, cycles, and human-in-the-loop interruptions out of the box.
If LangChain is "chain together LLM calls", LangGraph is "build a state machine where the transitions are decided by LLMs".
