langgraph-persistence Skill for Claude Code: Memory
Teaches your agent how LangGraph saves state: checkpointers, thread IDs, time travel, long-term memory with the Store and subgraph scoping.
- Installs
- 18.4K
- on skills.sh
- Stars
- 1.3K
- on GitHub
- Updated
- Oct 2026
- last repo commit
The skill covers how LangGraph keeps state. It explains two kinds of memory. A checkpointer holds short-term memory for one thread, and a Store holds long-term memory across threads. It compares the three checkpointers (InMemorySaver for testing, SqliteSaver for local development, PostgresSaver for production) and gives Python and TypeScript examples.
It loads when a graph needs to persist state, resume from history or scope a subgraph's checkpointer. It lists four common fixes, such as always passing a thread_id. It bundles no scripts. Its production example reads a DATABASE_URL for your own Postgres database.
Good for
- Developers who want a LangGraph chatbot to remember a conversation
- Teams moving a graph from in-memory testing to Postgres
- Developers who need to replay or edit a past graph state
Install langgraph-persistence
Claude Code
- 1
Copy this prompt.
Install the langgraph-persistence skill in Claude Code. Run this command: npx skills add https://github.com/langchain-ai/langchain-skills --skill langgraph-persistence Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
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.
Sections in SKILL.md
- Checkpointer Setup
- Thread Management
- State History & Time Travel
- Subgraph Checkpointer Scoping
- When to use each mode
- Parallel subgraph namespacing
- Long-Term Memory (Store)
- Fixes
- What You Should NOT Do
Key facts
- Author
- langchain-ai
- Installs on skills.sh
- 18,386 as of 2026-11-02
- License
- MIT (as detected by GitHub)
- Last repo commit
- 2026-10-29
- skills.sh audits
- Gen Agent Trust Hub: pass; Socket: pass; Snyk: pass
What it includes
InMemorySaver, SqliteSaver, PostgresSaver
InMemorySaver is for testing and loses data on restart, SqliteSaver suits local development, and PostgresSaver is the production choice.
Write ·
Checkpointer selectionPass the checkpointer at compile time
Compile the graph with a checkpointer and always send a thread_id in the config. Different thread IDs keep separate state.
Write ·
Checkpointer setup and thread_idResume from a checkpoint or update state
Replay from an earlier checkpoint, or edit state with update_state. The update goes through reducers, so use Overwrite to replace a value.
Write ·
Time travelFalse, None or True
False means no persistence for the subgraph, None lets it pause and resume with interrupt() but start fresh each call, and True lets it remember across calls.
Write ·
Subgraph checkpointer scopingCross-thread facts and preferences
The Store keeps user preferences and facts across conversations. Nodes reach it through the runtime object, not a global.
Write ·
Long-term memory with the StoreFour common mistakes
A missing thread_id, using InMemorySaver in production, expecting update_state to bypass reducers, and using the Store directly in a node.
Read ·
Fixes
From the official docs
Questions
What does langgraph-persistence do?
It teaches your agent how to make a LangGraph app remember things. That covers saving state between runs, separate conversation threads, replaying history and keeping long-term facts.
How do I install it?
Use the install box at the top of this page. The LangChain README also gives an npx skills command that installs every skill in the repo, which is more than this skill needs.
Does it need a database or API key?
The skill itself needs neither. Its examples use in-memory storage, and its production example uses PostgresSaver with a DATABASE_URL, which points at your own Postgres database.
Which checkpointer should I use?
PostgresSaver for production. SKILL.md marks InMemorySaver as not production ready because data is lost on restart, and SqliteSaver as partly ready for local development.
How is it different from langgraph-fundamentals?
langgraph-fundamentals covers building graphs, and this one covers saving their state. They come from the same repo, and this skill does not require the other.
Is it safe?
It bundles no scripts and only guides how your agent writes code. Review the code, and keep the database URL in an environment variable as its examples do.
Information
updated Nov 2, 2026
- Repository
- langchain-ai/langchain-skills
- Folder
config/skills/langgraph-persistence
Sources
Docs, issue trackers and discussions this page is built from.
Show all 4Hide
- langgraph-persistence SKILL.md · github.com
- langchain-ai/langchain-skills README · github.com
- langgraph-persistence on skills.sh · skills.sh
- langchain-ai/langchain-skills · github.com