How to add persistence (“memory”) to your graph
Many AI applications need memory to share context across multiple interactions. In LangGraph4j, memory is provided for any StateGraph
through Checkpointers
.
When creating any LangGraph workflow, you can set them up to persist their state by doing using the following:
- A
Checkpointer
, such as theMemorySaver
- Pass your
Checkpointers
in configuration when compiling the graph.