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
- Continue a conversation on a thread
- Read the saved state
- Browse state history
- Persist to SQLite
- Persist to PostgreSQL
- Add long-term memory
All memory and persistence commands · LangGraph 1 cheatsheet