LangGraph 1 · Memory and persistence

Add short-term memory

Compile with a checkpointer to save state after every step. Use InMemorySaver for experiments only.

from langgraph.checkpoint.memory import InMemorySaver

graph = builder.compile(checkpointer=InMemorySaver())

Official LangGraph 1 documentation

More memory and persistence commands

All memory and persistence commands · LangGraph 1 cheatsheet

Was this page helpful?