langgraph-persistence

Configure LangGraph checkpointers, thread state, time travel, and cross-thread memory stores.

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/agnivon/viral_thread_generator --skill langgraph-persistence-agnivon
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: langgraph-persistence
Source: https://github.com/agnivon/viral_thread_generator/tree/main/.agents/skills/langgraph-persistence
Command: npx skills add https://github.com/agnivon/viral_thread_generator --skill langgraph-persistence-agnivon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? LangGraph agents lose conversation state between invocations by default, and developers struggle to choose the right checkpointer, manage thread IDs, resume from past checkpoints, or share long-term memory across threads. ## Core Features & Use Cases - Checkpointer Setup: Configure InMemorySaver for testing or PostgresSaver for production, with mandatory thread_id usage for state persistence. - Time Travel & State Editing: Browse checkpoint history, replay or fork from past states, and update state manually with reducer-aware Overwrite semantics. - Subgraph Scoping & Long-Term Memory: Choose the correct subgraph checkpointer mode (False, None, True) and use a Store for cross-thread user preferences. - Use Case: Build a multi-turn support chatbot where each user gets an isolated thread, conversations survive server restarts via Postgres, and user preferences persist across all sessions through a shared Store. ## Quick Start Ask the AI to add Postgres-backed checkpointing with thread IDs to your LangGraph agent so conversations persist across restarts.

Frequently Asked Questions about langgraph-persistence

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add persistence to a LangGraph agent?▼

Compile the graph with a checkpointer such as InMemorySaver for testing or PostgresSaver for production, then always pass a thread_id in the config's configurable field. Without a thread_id, state is not persisted between invocations.

Which LangGraph checkpointer should I use in production?▼

Use PostgresSaver for production since InMemorySaver loses all data on process restart. Create it with PostgresSaver.from_conn_string and run setup() once during deployment to create the required tables.

How do I time travel or resume from a past checkpoint in LangGraph?▼

Call get_state_history with the thread config to list checkpoints, then invoke the graph with None as input and a past checkpoint's config to replay. Use update_state on a past config to fork with modified state.

Why does update_state append instead of replacing my list state?▼

update_state passes values through the state's reducers, so a list with an add reducer gets appended. Wrap the value in Overwrite to replace the existing state instead of merging it.

Can a LangGraph subgraph remember state across invocations?▼

Yes, compile the subgraph with checkpointer=True for cross-invocation memory. However, the same stateful subgraph instance cannot be called multiple times in parallel within one node due to checkpoint namespace conflicts.

How do I share memory across different threads in LangGraph?▼

Use a Store such as InMemoryStore compiled alongside the checkpointer. Access it inside nodes via the Runtime parameter's store property, using namespaced keys like (user_id, "preferences") so all threads for a user share the data.