LangGraph Redis Persistence
Add Redis-backed checkpoints, stores, and caching and memory middleware to LangGraph applications.
- Source repo
- redis-developer/langgraph-redis
- Stars
- ★ 240
- Last updated
- 5d ago
- License
- MIT
- Primary language
- Python
- FA score
- 62/100 · Some gaps
At a glance
- How it runs
- Works with
- Platform-specific
- Cost
- Free, no paid service needed
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- Python developers building LangGraph conversations that need to save, restore, and list checkpoints by thread.
- Not a fit if
- Teams unable to provide RedisJSON and RediSearch
- Developers not building with LangGraph or LangChain agents
- Source review
- 62/100 · Some gaps
What does this agent do, and when should you use it?
This is an importable Python library with Redis implementations for LangGraph checkpoint savers, Stores, and LangChain agent middleware. Checkpointers have synchronous, asynchronous, and shallow variants that retain only the latest checkpoint; Stores provide key-value persistence with optional vector search. Middleware offers semantic caching, tool-result caching, conversation memory, and semantic routing for LangChain agents, with integration through langchain.agents.create_agent(). Data is stored in Redis, and first use requires creating indices with setup() or the corresponding asynchronous setup method. The library requires RedisJSON and RediSearch; Redis 8.0+ includes both modules by default. It does not provide a hosted service or standalone agent interface.
Install langgraph-checkpoint-redis in an application and connect it to Redis. Use RedisSaver or AsyncRedisSaver to write, retrieve, and list LangGraph checkpoints, or choose ShallowRedisSaver to keep only the latest checkpoint. Use RedisStore or AsyncRedisStore for key-value data and optionally configure a vector-search index. Create the required indices with setup(), asetup(), or the Store's corresponding setup method. Configure SemanticCacheMiddleware, ToolResultCacheMiddleware, ConversationMemoryMiddleware, or SemanticRouterMiddleware for a LangChain agent and run it through create_agent(). TTL settings can expire data, refresh expiration on reads, and govern which tool results are cacheable.
- Python developers building LangGraph conversations that need to save, restore, and list checkpoints by thread.
- Teams that need persistent key-value memory across threads and want to retrieve it by vector similarity in Redis.
- LangChain agent developers who want to cache model responses by semantic similarity to reduce repeated calls.
- Application teams with deterministic tools or expensive API computations that need configurable tool-result caching.
- Agent developers who need to retrieve relevant past messages and inject them into conversation context.
- Teams that want Redis TTL to clean up checkpoint or Store entries automatically, with optional expiration refresh on reads.
How do you install or deploy this agent?
You need a Python application, a reachable Redis instance, and RedisJSON and RediSearch. The README lists redis>=5.2.1, redisvl>=0.5.1, and langgraph-checkpoint>=2.0.24 as main dependencies. Redis 8.0+ includes the required modules by default; for earlier versions, use Redis Stack or install the modules separately. Install the package with:
pip install langgraph-checkpoint-redisThe README does not specify a Python version range. For Azure Managed Redis, Azure Cache for Redis, or Redis Enterprise, it recommends a standard redis.Redis client rather than RedisCluster; connection settings depend on the endpoint and TLS configuration.
How do you use this agent?
Initialize the indices, then write and retrieve a checkpoint:
from langgraph.checkpoint.redis import RedisSaver
config = {"configurable": {"thread_id": "1", "checkpoint_ns": ""}}
with RedisSaver.from_conn_string("redis://localhost:6379") as saver:
saver.setup()
# Pass a LangGraph-produced checkpoint, metadata, and new versions to put()
saved_config = saver.put(config, checkpoint, metadata, new_versions)
loaded_checkpoint = saver.get(config)For async applications, import AsyncRedisSaver from langgraph.checkpoint.redis.aio and use asetup(), aput(), aget(), and alist(). The checkpoint, metadata, and new_versions values should come from a LangGraph flow; the README shows the checkpoint shape but not a complete standalone minimal graph example. For a Store, construct RedisStore, call setup(), and use it in the application; pass the relevant configuration to enable vector search or TTL.
What are this agent's strengths and limitations?
- One library provides full checkpoint history, a latest-only shallow implementation, and both sync and async interfaces.
- Redis Stores support optional vector search and share the Redis deployment boundary with checkpointing and middleware.
- TTL works for checkpoints and Stores, can refresh on reads, and is disabled by default so data persists.
- Tool caching can be controlled with tool metadata, volatile and ignored argument names, and side-effect name prefixes.
- The deployment must provide RedisJSON and RediSearch; missing modules cause index creation or checkpoint operations to fail.
- Applications must run Python, supply a Redis connection, and initialize indices before first use.
- For Azure and Redis Enterprise configurations, the README calls for a standard Redis client; RedisCluster examples do not apply.
- The README does not specify a supported Python version range, hosted service, or complete deployment bundle for standalone middleware use.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| LangGraph Redis Persistence This agent | 62 · Some gaps | Library / SDKFree | ★ 240 | 5d ago | Python | — |
| Oracle AI Developer Hub | 44 · Major gaps | Library / SDKFree + model costs | ★ 4.4k | 1d ago | Jupyter Notebook | — |
| Dynamiq Agent Orchestration | 61 · Some gaps | Library / SDKFree + model costs | ★ 1.1k | 2d ago | Python | OpenAI API |
| Lang-Agent Visual Agent Configuration Platform | 50 · Major gaps | Web appFree + model costs | ★ 338 | 9mo ago | TypeScript | — |
How does FollowAgents rate this agent?
Why each dimension lost points
The repository describes data writes, indexes, TTL behavior, and connection configuration for its Redis checkpointers, stores, and middleware; it also gives standard-client and TLS examples. It does not explain encryption, access controls, or sensitive-data governance for checkpoints or conversation content, and the TTL-removal example calls an internal method. Setup is explicit, but per-write confirmation and general rollback guidance are absent. Dependency ranges are listed without evidence of security review or vulnerability handling. Publisher identity is treated as unknown, so attribution receives only limited support.
The README covers sync, async, and shallow storage examples, and explains Redis 8 versus older module requirements and the errors expected when modules are missing. However, its opening dependency minimums conflict with pyproject.toml for langgraph-checkpoint and redisvl, and some examples use helper functions or variables not defined in the snippets. Test configuration shows a Redis container and optional API/Sentinel tests, but there is no execution evidence; conftest suppresses ordinary Redis startup, shutdown, and cleanup errors, limiting failure visibility.
The material covers checkpoint persistence, stores, vector search, TTL, sync/async use, Azure/Enterprise proxy configuration, and several middleware types, including rules for when caching is enabled or skipped. Boundaries remain incomplete: cache safety depends on tool metadata and name/argument heuristics, and semantic-cache false matches and deployment-specific constraints are not discussed in depth. Connection and Redis module requirements are clearly addressed for common environments.
The README is organized around installation, checkpointers, stores, middleware, examples, and implementation details; it documents installation, prerequisites, setup, and multiple usage patterns. LICENSE and pyproject both identify MIT. Sync/async names are reasonably consistent, but the dependency versions in the README conflict with project configuration. Some limitations and configuration cautions are documented, but there is no changelog or clear maintenance responsibility/update commitment; an organization contact in author metadata does not establish maintenance arrangements.
The package connects Redis persistence, vector search, caching, semantic memory, and routing to LangGraph/LangChain, with concrete value beyond a basic checkpointer. Examples are broad and configurations are reusable, but snippets containing undefined helper functions or variables are less directly usable. There is little quantitative evidence about cost, operational burden, or cache quality.
The README gives specific claims about capabilities, Redis module requirements, TTL behavior, and cache decision rules; some dependencies and the license can be cross-checked against pyproject and LICENSE. The supplied material contains no implementation source or actual test results to substantiate README behavior point by point, and badges are claims rather than verification performed for this review. The documentation distinguishes some environment prerequisites from behavior, but does not systematically label inference versus verified fact.
- Reconcile the README and pyproject.toml dependency minimums, and confirm RedisJSON, RediSearch, TLS, and proxy requirements for the target deployment.
- Treat checkpoints, conversations, and cache entries as potentially sensitive; the supplied material does not describe encryption or access-control policy. TTL is off by default, and the TTL-removal example calls an internal method.
- Validate middleware cache rules and semantic-similarity behavior in the target deployment; tool-name and metadata rules cannot guarantee safe handling of every side effect or time-sensitive result.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Changes - chore(release): bumped release version to 0.5.2 (#205) - fix(checkpoint): retry best-effort TTL application to prevent orphaned search index entries (#203) - chore(deps-dev): bump cryptography from 49.0.0 to 50.0.0 (#204) 🐛 Bug Fixes - fix(checkpoint): preserve DeltaChannel snapshots in Redis JSON (#202) Contributors We'd like to thank all the contributors who worked on this release! @LiamCollick, @dependabot, @dependabot[bot] and @limjoobinView on GitHub ↗ -
Release notes excerpt
Changes - chore(deps-dev): bump transformers from 5.0.0rc3 to 5.5.0 (#200) - chore(release): bumped release version to 0.5.1 (#199) 🐛 Bug Fixes - Fix nested set deserialization in JsonPlusRedisSerializer (#198) - fix: escape RediSearch-special characters in store delete queries (#197) Contributors We'd like to thank all the contributors who worked on this release! @dependabot, @dependabot[bot], @jerry153fish and @limjoobinView on GitHub ↗ -
v0.5.0 0.5.0
Release notes excerpt
Changes - chore(release): bumped release version to 0.5.0 (#195) - Use PyPI Trusted Publishing for publishing releases (#194) - Fix: Removed dependency on private constructor helper (#193) - Fix latest checkpoint pointers for custom prefixes (#188) 🐛 Bug Fixes - fix(checkpointer): apply ttl to minimal checkpoint for cancellation (#190) - fix(checkpoint): base64-decode pending send blobs before deserialization (#192) Contributors We'd like to thank all the contributors who worked on this release! @haseeb-m4235, @limjoobin and @zettlt2View on GitHub ↗
FAQ
Do I need to install RedisJSON and RediSearch separately with Redis 8.0 or later?
Do checkpoints or Store entries expire automatically?
default_ttl to expire entries and refresh_on_read to refresh expiration when they are read.Can I keep only the latest checkpoint for each thread?
ShallowRedisSaver; the async variant is AsyncShallowRedisSaver. These implementations keep only the latest checkpoint.Can I use this with Azure Managed Redis or Redis Enterprise?
redis.Redis client instead of RedisCluster. These deployments typically require TLS, and the modules must be selected when creating the service.