Skip to content

Commit f01609f

Browse files
committed
feat(redis): enhance checkpoint handling and add example notebooks
Core changes: - Fix Redis key parsing to handle additional components in _parse_redis_checkpoint_writes_key method - Modify error handling to accept keys with more than 6 components by slicing (parts[:6]) - Update error message to indicate "at least 6 parts" needed rather than "expected 6" Added comprehensive test suites: - Basic key parsing tests (test_key_parsing.py) - Subgraph key parsing tests (test_subgraph_key_parsing.py) - Fix verification tests (test_fix_verification.py) - Semantic search key tests (test_semantic_search_keys.py) - Streaming tests (test_streaming_modes.py, test_streaming.py) Added new example notebooks: - Memory management examples (add-summary-conversation-history, delete-messages, etc.) - Human-in-the-loop examples (breakpoints, edit-graph-state, time-travel, etc.) - Subgraph management notebooks (subgraph-persistence, subgraphs-manage-state) - Agent creation examples with history management and HITL
1 parent d96aed7 commit f01609f

33 files changed

+10248
-64
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,4 @@ pip-selfcheck.json
220220
libs/redis/docs/.Trash*
221221
.python-version
222222
.idea/*
223+
examples/.Trash*

examples/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,16 @@ docker compose down
2727

2828
## Notebook Contents
2929

30-
- `persistence_redis.ipynb`: Demonstrates the usage of `RedisSaver` and `AsyncRedisSaver` checkpoint savers with LangGraph.
30+
- `persistence-functional.ipynb`: Demonstrates the usage of `RedisSaver` and functional persistence patterns with LangGraph.
3131
- `create-react-agent-memory.ipynb`: Shows how to create an agent with persistent memory using Redis.
3232
- `cross-thread-persistence.ipynb`: Demonstrates cross-thread persistence capabilities with Redis.
33-
- `persistence-functional.ipynb`: Shows functional persistence patterns with Redis.
33+
- `cross-thread-persistence-functional.ipynb`: Shows functional cross-thread persistence patterns with Redis.
34+
- `create-react-agent-manage-message-history.ipynb`: Shows how to manage conversation history in a ReAct agent with Redis.
35+
- `subgraph-persistence.ipynb`: Demonstrates persistence with subgraphs using Redis.
36+
- `subgraphs-manage-state.ipynb`: Shows how to manage state in subgraphs with Redis.
37+
- `create-react-agent-hitl.ipynb`: Demonstrates human-in-the-loop (HITL) capabilities with Redis.
38+
- `human_in_the_loop/*.ipynb`: Demonstrates various human-in-the-loop interaction patterns with LangGraph and Redis.
39+
40+
All notebooks have been updated to use the Redis implementation instead of memory implementation, showcasing the proper usage of Redis integration with LangGraph.
3441

3542
These notebooks are designed to work both within this Docker environment (using local package builds) and standalone (using installed packages via pip).

0 commit comments

Comments
 (0)