LangGraph 1 · Memory and persistence
Add long-term memory
A store keeps data across threads, such as facts about a user.
from langgraph.store.memory import InMemoryStore
graph = builder.compile(checkpointer=InMemorySaver(), store=InMemoryStore())
Official LangGraph 1 documentation
More memory and persistence commands
- Add short-term memory
- Continue a conversation on a thread
- Read the saved state
- Browse state history
- Persist to SQLite
- Persist to PostgreSQL
All memory and persistence commands · LangGraph 1 cheatsheet