Skip to content

Commit 81c9dea

Browse files
committed
docs: clean up READMEs
1 parent 05e830d commit 81c9dea

7 files changed

+69
-2110
lines changed

README.md

+58-13
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ This repository contains Redis implementations for LangGraph, providing both Che
55
## Overview
66

77
The project consists of two main components:
8+
89
1. **Redis Checkpoint Savers**: Implementations for storing and managing checkpoints using Redis
910
2. **Redis Stores**: Redis-backed key-value stores with optional vector search capabilities
1011

1112
## Dependencies
1213

1314
The project requires the following main dependencies:
15+
1416
- `redis>=5.2.1`
15-
- `redisvl>=0.3.7`
16-
- `langgraph-checkpoint>=2.0.10`
17+
- `redisvl>=0.5.1`
18+
- `langgraph-checkpoint>=2.0.24`
19+
- `langgraph>=0.3.0`
1720

1821
## Installation
1922

@@ -184,6 +187,39 @@ async def main():
184187
asyncio.run(main())
185188
```
186189

190+
## Examples
191+
192+
The `examples` directory contains Jupyter notebooks demonstrating the usage of Redis with LangGraph:
193+
194+
- `persistence_redis.ipynb`: Demonstrates the usage of Redis checkpoint savers with LangGraph
195+
- `create-react-agent-memory.ipynb`: Shows how to create an agent with persistent memory using Redis
196+
- `cross-thread-persistence.ipynb`: Demonstrates cross-thread persistence capabilities
197+
- `persistence-functional.ipynb`: Shows functional persistence patterns with Redis
198+
199+
### Running Example Notebooks
200+
201+
To run the example notebooks with Docker:
202+
203+
1. Navigate to the examples directory:
204+
205+
```bash
206+
cd examples
207+
```
208+
209+
2. Start the Docker containers:
210+
211+
```bash
212+
docker compose up
213+
```
214+
215+
3. Open the URL shown in the console (typically <http://127.0.0.1:8888/tree>) in your browser to access Jupyter.
216+
217+
4. When finished, stop the containers:
218+
219+
```bash
220+
docker compose down
221+
```
222+
187223
## Implementation Details
188224

189225
### Indexing
@@ -195,6 +231,7 @@ The Redis implementation creates these main indices:
195231
3. **Writes Index**: Tracks pending writes and intermediate states
196232

197233
For Redis Stores with vector search:
234+
198235
1. **Store Index**: Main key-value store
199236
2. **Vector Index**: Optional vector embeddings for similarity search
200237

@@ -205,34 +242,42 @@ We welcome contributions! Here's how you can help:
205242
### Development Setup
206243

207244
1. Clone the repository:
245+
208246
```bash
209-
git clone https://github.com/langchain-ai/langgraph
210-
cd langgraph
247+
git clone https://github.com/redis-developer/langgraph-redis
248+
cd langgraph-redis
211249
```
212250

213251
2. Install dependencies:
252+
214253
```bash
215-
poetry install
254+
poetry install --all-extras
216255
```
217256

218257
### Available Commands
219258

220259
The project includes several make commands for development:
221260

222261
- **Testing**:
262+
223263
```bash
224264
make test # Run all tests
225-
make test_watch # Run tests in watch mode
265+
make test-all # Run all tests including API tests
226266
```
227267

228268
- **Linting and Formatting**:
269+
270+
```bash
271+
make format # Format all files with Black and isort
272+
make lint # Run formatting, type checking, and other linters
273+
make check-types # Run mypy type checking
274+
```
275+
276+
- **Redis for Development/Testing**:
277+
229278
```bash
230-
make lint # Run all linters
231-
make lint_diff # Lint only changed files
232-
make lint_package # Lint only the package
233-
make lint_tests # Lint only tests
234-
make format # Format all files
235-
make format_diff # Format only changed files
279+
make redis-start # Start Redis in Docker
280+
make redis-stop # Stop Redis container
236281
```
237282

238283
### Contribution Guidelines
@@ -247,4 +292,4 @@ The project includes several make commands for development:
247292

248293
## License
249294

250-
This project is licensed under the MIT License.
295+
This project is licensed under the MIT License.

examples/Dockerfile.jupyter

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ ENV PATH="/home/jupyter/venv/bin:$PATH"
2121

2222
# Install dependencies
2323
RUN pip install --no-cache-dir --upgrade pip && \
24-
pip install --no-cache-dir langgraph==0.3.25 && \
24+
pip install --no-cache-dir langgraph>=0.3.0 && \
2525
pip install --no-cache-dir -e /home/jupyter/workspace/libs/checkpoint-redis && \
26-
pip install --no-cache-dir jupyter redis langchain-openai langchain-anthropic python-ulid
26+
pip install --no-cache-dir jupyter redis>=5.2.1 redisvl>=0.5.1 langchain-openai langchain-anthropic python-ulid
2727

2828
# Set the working directory to the examples folder
2929
WORKDIR /home/jupyter/workspace/libs/checkpoint-redis/examples

examples/README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
# Redis Notebooks for LangGraph
22

3-
This directory contains Jupyter notebooks demonstrating the usage of the Redis with LangGraph.
3+
This directory contains Jupyter notebooks demonstrating the usage of Redis with LangGraph.
44

55
## Running Notebooks with Docker
66

7-
To run these notebooks using the local development versions of LangChain and the Redis partner package:
7+
To run these notebooks using the local development version of the Redis checkpoint package:
88

99
1. Ensure you have Docker and Docker Compose installed on your system.
1010
2. Navigate to this directory (`examples`) in your terminal.
1111
3. Run the following command:
12+
1213
```bash
1314
docker compose up
1415
```
16+
1517
4. Look for a URL in the console output that starts with `http://127.0.0.1:8888/tree`. Open this URL in your web browser to access Jupyter Notebook.
16-
5. You can now run the notebooks, which will use the local development versions of LangChain and the Redis partner package.
18+
5. You can now run the notebooks, which will use the local development version of the Redis checkpoint package.
1719

1820
Note: The first time you run this, it may take a few minutes to build the Docker image.
1921

2022
To stop the Docker containers, use Ctrl+C in the terminal where you ran `docker compose up`, then run:
23+
2124
```bash
2225
docker compose down
2326
```
2427

2528
## Notebook Contents
2629

2730
- `persistence_redis.ipynb`: Demonstrates the usage of `RedisSaver` and `AsyncRedisSaver` checkpoint savers with LangGraph.
31+
- `create-react-agent-memory.ipynb`: Shows how to create an agent with persistent memory using Redis.
32+
- `cross-thread-persistence.ipynb`: Demonstrates cross-thread persistence capabilities with Redis.
33+
- `persistence-functional.ipynb`: Shows functional persistence patterns with Redis.
2834

2935
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)