langgraph-checkpoint-redis

langgraph-checkpoint-redis#

Redis implementations for LangGraph — checkpoint savers, stores with vector search, and agent middleware.

Concepts

Understand the architecture, key patterns, and design decisions behind Redis-backed checkpointing, stores, and middleware.

Concepts
User Guides

Step-by-step guides for installation, configuration, TTL management, middleware setup, and enterprise deployment.

User Guide
Examples

23 Jupyter notebooks covering checkpoints, human-in-the-loop, memory, middleware, and ReAct agents.

Examples
API Reference

Complete API documentation for all public classes — savers, stores, middleware, and utilities.

API Reference

Quick Start#

Install the package:

pip install langgraph-checkpoint-redis

Use Redis as your LangGraph checkpoint saver:

from langgraph.checkpoint.redis import RedisSaver

with RedisSaver.from_conn_string("redis://localhost:6379") as checkpointer:
    checkpointer.setup()

    # Use with any LangGraph graph
    graph = builder.compile(checkpointer=checkpointer)
    config = {"configurable": {"thread_id": "my-thread"}}
    result = graph.invoke({"messages": [("human", "Hello!")]}, config)

Features#

  • Checkpoint Savers — Full and shallow variants, sync and async, with automatic TTL

  • Stores — Key-value storage with optional vector search for semantic retrieval

  • Middleware — Semantic caching, tool result caching, conversation memory, and semantic routing

  • Cluster Support — Automatic detection and handling of Redis Cluster, Azure Managed Redis, and Redis Enterprise

  • TTL Management — Native Redis TTL with refresh-on-read and per-thread pinning