langchain-ai/skills-benchmarks/langgraph-persistence
Claude Code and agent skill by langchain-ai/skills-benchmarks
- community
Checking that the SKILL.md file is still in the repository.
INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, thread_id, time travel, Store, and subgraph persistence modes.
Install
npx vskill@latest install langchain-ai/skills-benchmarks/langgraph-persistenceSKILL.md
The same SKILL.md was published earlier as langchain-ai/skills-benchmarks/langgraph-persistence.
<overview> LangGraph's persistence layer enables durable execution by checkpointing graph state:
- 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
</overview>
<checkpointer-selection>
| Checkpointer | Use Case | Production Ready | |
|---|---|---|---|
InMemorySaver | Testing, development | No | |
SqliteSaver | Local development | Partial | |
PostgresSaver | Production | Yes |
</checkpointer-selection>
Checkpointer Setup
<ex-basic-persistence> <python> Set up a basic graph with in-memory checkpointing and thread-based state persistence.
</python> <typescript> Set up a basic graph with in-memory checkpointing and thread-based state persistence.
</typescript> </ex-basic-persistence>
<ex-production-postgres> <python> Configure PostgreSQL-backed checkpointing for production deployments.
</python> <typescript> Configure PostgreSQL-backed checkpointing for production deployments.
</typescript> </ex-production-postgres>
Thread Management
<ex-separate-threads> <python> Demonstrate isolated state between different thread IDs.
</python> <typescript> Demonstrate isolated state between different thread IDs.
</typescript> </ex-separate-threads>
State History & Time Travel
<ex-resume-from-checkpoint> <python> Time travel: browse checkpoint history and replay or fork from a past state.
</python> <typescript> Time travel: browse checkpoint history and replay or fork from a past state.
</typescript> </ex-resume-from-checkpoint>
<ex-update-state> <python> Manually update graph state before resuming execution.
</python> <typescript> Manually update graph state before resuming execution.
</typescript> </ex-update-state>
Subgraph Checkpointer Scoping
When compiling a subgraph, the checkpointer parameter controls persistence behavior. This is critical for subgraphs that use interrupts, need multi-turn memory, or run in parallel.
<subgraph-checkpointer-scoping-table>
| Feature | checkpointer=False | None (default) | True | |
|---|---|---|---|---|
| Interrupts (HITL) | No | Yes | Yes | |
| Multi-turn memory | No | No | Yes | |
| Multiple calls (different subgraphs) | Yes | Yes | Warning (namespace conflicts possible) | |
| Multiple calls (same subgraph) | Yes | Yes | No | |
| State inspection | No | Warning (current invocation only) | Yes |
</subgraph-checkpointer-scoping-table>
<subgraph-checkpointer-when-to-use>
When to use each mode
- `checkpointer=False` — Subgraph doesn't need interrupts or persistence. Simplest option, no checkpoint overhead.
- `None` (default / omit `checkpointer`) — Subgraph needs
interrupt()but not multi-turn memory. Each invocation starts fresh but can pause/resume. Parallel execution works because each invocation gets a unique namespace. - `checkpointer=True` — Subgraph needs to remember state across invocations (multi-turn conversations). Each call picks up where the last left off.
</subgraph-checkpointer-when-to-use>
<warning-stateful-subgraphs-parallel>
Warning: Stateful subgraphs (checkpointer=True) do NOT support calling the same subgraph instance multiple times within a single node — the calls write to the same checkpoint namespace and conflict.
</warning-stateful-subgraphs-parallel>
<ex-subgraph-checkpointer-modes> <python> Choose the right checkpointer mode for your subgraph.
</python> <typescript> Choose the right checkpointer mode for your subgraph.
</typescript> </ex-subgraph-checkpointer-modes>
<parallel-subgraph-namespacing>
Parallel subgraph namespacing
When multiple different stateful subgraphs run in parallel, wrap each in its own StateGraph with a unique node name for stable namespace isolation:
<python>
</python> <typescript>
</typescript>
Note: Subgraphs added as nodes (via add_node) already get name-based namespaces automatically and don't need this wrapper.
</parallel-subgraph-namespacing>
Long-Term Memory (Store)
<ex-long-term-memory-store> <python> Use a Store for cross-thread memory to share user preferences across conversations.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/main/langgraph-persistence/SKILL.md
Popularity
- Repository stars
- 105
- Repository forks
- 9
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/langchain-ai/skills-benchmarks/langgraph-persistence)