langgraph-persistence
Durable graph execution with thread-scoped checkpoints, state history, and cross-thread long-term memory.
- Three checkpointer options:
InMemorySaverfor testing,SqliteSaverfor local development,PostgresSaverfor production; always passthread_idin config to enable persistence - Browse and replay from past checkpoints using
get_state_history(), fork execution by updating state at a past point, or manually modify state before resuming - Store API provides cross-thread memory for user preferences and facts; access via
runtime.storein graph nodes, separate from thread-scoped checkpoint history - Subgraph checkpointer modes:
False(no persistence),None(interrupts only, default), orTrue(multi-turn memory); stateful subgraphs cannot be called multiple times in parallel within a single node due to namespace conflicts
- Checkpointer: Saves/loads graph state at every super-step
- Thread ID: Identifies separate checkpoint sequences (conversations)
- Store: Cross-thread memory for user preferences, facts
Two memory types:
- Short-term (checkpointer): Thread-scoped conversation history
- Long-term (store): Cross-thread user preferences, facts
| Checkpointer | Use Case | Production Ready |
|---|---|---|
InMemorySaver |
Testing, development | No |
SqliteSaver |
Local development | Partial |
PostgresSaver |
Production | Yes |
More from langchain-ai/langchain-skills
deep-agents-memory
INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access. Covers StateBackend (ephemeral), StoreBackend (persistent), FilesystemMiddleware, and CompositeBackend for routing.
7.7Klanggraph-fundamentals
INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.
7.1Klangchain-fundamentals
Create LangChain agents with create_agent, define tools, and use middleware for human-in-the-loop and error handling.
6.7Klangchain-rag
INVOKE THIS SKILL when building ANY retrieval-augmented generation (RAG) system. Covers document loaders, RecursiveCharacterTextSplitter, embeddings (OpenAI), and vector stores (Chroma, FAISS, Pinecone).
6.6Klanggraph-human-in-the-loop
INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval/validation workflows, and the 4-tier error handling strategy.
6.4Kdeep-agents-orchestration
INVOKE THIS SKILL when using subagents, task planning, or human approval in Deep Agents. Covers SubAgentMiddleware, TodoList for planning, and HITL interrupts.
6.3K