LangGraph extends LangChain with a graph-based execution model where nodes represent agent actions and edges represent transitions. Unlike linear chains, LangGraph supports cycles - enabling agents to loop back to tool calls, re-plan, or reflect iteratively. State is a typed object that persists and evolves across every node execution. Conditional edges route execution based on the current state value, enabling patterns like ReAct (agent-tools loop), Plan-Execute (planner-executor-replanner), and Reflection (generate-reflect cycle).
LangGraph nodes are Python functions that read and write a shared typed state object
Conditional edges enable branching: agent_node routes to tools_node if tool_call exists, else to END
The ReAct loop cycles between agent and tool nodes until the agent decides the task is complete
Human-in-the-loop checkpoints pause graph execution at designated nodes for human approval
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.