How-to guides¶
Welcome to the LangGraph.js how-to Guides! These guides provide practical, step-by-step instructions for accomplishing key tasks in LangGraph.js.
Installation¶
Controllability¶
LangGraph.js is known for being a highly controllable agent framework. These how-to guides show how to achieve that controllability.
- How to define graph state
- How to create subgraphs
- How to create branches for parallel execution
- How to create map-reduce branches for parallel execution
Persistence¶
LangGraph.js makes it easy to persist state across graph runs. The guides below shows how to add persistence to your graph.
- How to add thread-level persistence to your graph
- How to add thread-level persistence to subgraphs
- How to add cross-thread persistence
- How to use a Postgres checkpointer for persistence
- How to manage conversation history
- How to view and update past graph state
- How to delete messages
- How to add summary of the conversation history
Human-in-the-loop¶
One of LangGraph.js's main benefits is that it makes human-in-the-loop workflows easy. These guides cover common examples of that.
- How to add breakpoints
- How to add dynamic breakpoints
- How to wait for user input
- How to edit graph state
- How to review tool calls
Streaming¶
LangGraph is built to be streaming first. These guides show how to use different streaming modes.
- How to stream full state of your graph
- How to stream state updates of your graph
- How to configure multiple streaming modes
- How to stream LLM tokens
- How to stream LLM tokens without LangChain models
- How to stream events from within a tool
- How to stream from the final node
Tool calling¶
- How to call tools using ToolNode
- How to force an agent to call a tool
- How to handle tool calling errors
- How to pass runtime values to tools
Subgraphs¶
- How to add and use subgraphs
- How to view and update state in subgraphs
- How to transform inputs and outputs of a subgraph
State management¶
Prebuilt ReAct Agent¶
- How to create a ReAct agent
- How to add memory to a ReAct agent
- How to add a system prompt to a ReAct agent
- How to add Human-in-the-loop to a ReAct agent
Prebuilt ReAct Agent¶
- How to create a ReAct agent
- How to add memory to a ReAct agent
- How to add a system prompt to a ReAct agent
- How to add Human-in-the-loop to a ReAct agent
Other¶
- How to add runtime configuration to your graph
- How to let agent return tool results directly
- How to have agent respond in structured format
- How to manage agent steps
- How to add node retry policies