langgraph-persistence

Persist LangGraph checkpoints and shared memory across invocations using thread_id.

1|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/tawf-labs/zkt-hackathon --skill langgraph-persistence-tawf-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langgraph-persistence
Source: https://github.com/tawf-labs/zkt-hackathon/tree/main/.claude/skills/langgraph-persistence
Command: npx skills add https://github.com/tawf-labs/zkt-hackathon --skill langgraph-persistence-tawf-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

LangGraph executions lose conversational context and long-term user memory unless the graph is configured with the right persistence mechanism.

Core Features & Use Cases

  • Checkpointing with a Checkpointer: Persist and reload graph state per thread_id for reliable multi-turn conversations.
  • Thread isolation via thread_id: Keep separate histories for different users or sessions so state never mixes.
  • Cross-thread long-term memory with Store: Save user preferences or facts shared across multiple conversations.
  • Subgraph checkpointer scoping: Control whether subgraphs retain state across invocations using checkpointer=False, None, or True.

Quick Start

When building your LangGraph, compile it with a checkpointer and always invoke with a config that includes a thread_id so state is remembered across calls.

Frequently Asked Questions about langgraph-persistence

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

FAQPage Schema
How do I persist LangGraph state across multiple conversation turns?

To persist LangGraph state, compile your graph with a checkpointer and invoke it with a config containing a thread_id. This ensures state is saved and reloaded reliably across calls for multi-turn conversations.

When do I need a Store versus a checkpointer in LangGraph?

A checkpointer persists state per thread_id for individual sessions, while a Store is needed for cross-thread long-term memory. Use a Store to save user preferences or facts shared across multiple separate conversations.

Can I use a Postgres saver for LangGraph checkpointing?

Yes, you can use a Postgres saver as your checkpointer when compiling the graph. This provides durable checkpointing for LangGraph execution, replacing the default in-memory checkpointer for production-grade persistence.

How do I isolate conversation history for different users in LangGraph?

You isolate conversation history by consistently providing a unique thread_id in the invocation config for each user or session. This thread isolation ensures separate histories so state never mixes between users.

How does subgraph checkpointer scoping work in LangGraph?

Subgraph checkpointer scoping controls whether subgraphs retain state across invocations by setting the checkpointer parameter to False, None, or True. This determines state persistence behavior for nested graph structures.

Why does my LangGraph execution lose conversational context between runs?

LangGraph loses conversational context because the graph lacks a configured persistence mechanism. You must compile it with an appropriate checkpointer and provide a thread_id to restore state across runs.