π LangGraph
Descriptionβ
< What is it? >β
- Definition: LangGraph is an orchestration framework and runtime for stateful workflows and agents. It combines ordinary program logic with model-driven steps and supports persistence, streaming, and human intervention. It does not require LangChain. See the LangGraph overview.
- Example: a support workflow retrieves evidence, checks whether it is sufficient, and either generates an answer or requests clarification.
Key pointsβ
< State, nodes, and edges >β
- State: the data shared across a workflow, such as messages, retrieved documents, and a selected action.
- Nodes: functions that perform work and return state updates. A node can call an LLM or execute deterministic code.
- Edges: transitions between nodes. Conditional routing selects the next step based on the current state. Branches and loops make it possible to retrieve again, call a tool, or stop.
- Graph construction: the Graph API defines a state schema, registers nodes and edges, and compiles the graph before execution. See the Graph API guide.
< Persistence and human review >β
- Checkpointing: a configured checkpointer saves workflow state so execution can resume. Durable storage is needed when state must survive process restarts.
- Human intervention: an application can pause for review and resume with an approval or corrected information. The developer defines the review points and handling of the response.
- Memory: conversational state and longer-term stored information serve different purposes. The existing agent memory page explains how to wire memory into LangGraph.
Examplesβ
< Route according to retrieved evidence >β
-
Illustrative state transitions: this example uses application-defined rules; it does not require a model to make the routing decision.
State after retrieval Next node Illustrative output Question: βWhat is the headphone return period?β; document D17: β30 daysβGenerate an evidence-based answer βThe return period is 30 days. [D17]β Question: βWhat is the return period?β; no matching product information Ask for clarification βWhich product are you asking about?β -
Component relationship: graph nodes can use LangChain components, while LangSmith records instrumented execution. See the ecosystem diagram and tool comparison.
Related ideasβ
- LangChain provides integrations and higher-level agent construction.
- LangSmith supports debugging and evaluation.
- Agentic AI System explains agent architecture.
- Agent Memory covers persistence and memory wiring.