Migrates the current redis package from NAT repo to this repo#2
Migrates the current redis package from NAT repo to this repo#2justin-cechmanek wants to merge 5 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the “direct Redis” NAT components (memory + object store) into this repository alongside the existing Redis Agent Memory integration, wiring them into NAT via a new nat_redis entry point and documenting the additional configuration surfaces.
Changes:
- Adds
nat.plugins.redispackage implementing_type: redis_memory(RediSearch + RedisJSON vector memory) and_type: redis(plain Redis-backed object store). - Registers the new components via the
nat.componentsentry pointnat_redisand updates packaging metadata/dependencies. - Adds unit/integration tests plus documentation updates describing when to use each Redis integration mode.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_redis_editor.py | Unit tests for the new direct-Redis RedisEditor memory implementation. |
| tests/integration/test_redis_object_store.py | Integration test validating RedisObjectStore roundtrip behavior. |
| src/nvidia_nat_redis/init.py | Updates package docstring to reflect multiple Redis integration surfaces. |
| src/nat/plugins/redis/init.py | Introduces the direct-Redis plugin package namespace. |
| src/nat/plugins/redis/register.py | Entry-point import hook to register the direct-Redis components. |
| src/nat/plugins/redis/schema.py | RediSearch/RedisJSON schema + index creation helper for vector memory. |
| src/nat/plugins/redis/redis_editor.py | Implements the MemoryEditor backed by RedisJSON + vector search. |
| src/nat/plugins/redis/memory.py | Registers _type: redis_memory and constructs Redis client + index. |
| src/nat/plugins/redis/redis_object_store.py | Implements the Redis-backed ObjectStore. |
| src/nat/plugins/redis/object_store.py | Registers _type: redis and yields a RedisObjectStore. |
| README.md | Documents both Redis Agent Memory and the newly added direct-Redis plugins. |
| docs/configuration.md | Adds configuration docs for _type: redis_memory and _type: redis. |
| pyproject.toml | Adds dependencies, entry point (nat_redis), and package inclusion for nat.plugins.*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| from .redis_object_store import RedisObjectStore | ||
|
|
||
| async with RedisObjectStore(**config.model_dump(exclude={"type"})) as store: |
| keys = await self._client.keys(pattern) | ||
| if keys: | ||
| await self._client.delete(*keys) |
There was a problem hiding this comment.
@justin-cechmanek shouldn't we use a search index pagination of some kind to fetch keys and run deletes/unlinks? Scans are generally bad.
There was a problem hiding this comment.
Here I think scan_iter() is the more standard approach over search. We can tweak it with a count hint and unlink instead of delete.
|
Delaying Copilot's change suggestions and maintaining parity with the current NAT Redis package for now. |
| 2. Create or load Redis Agent Memory working memory for that identity. | ||
| 3. Call `memory_prompt(...)`, invoke the inner chat function with the hydrated request, and append the finished turn back into working memory. | ||
|
|
||
| ## Direct Redis memory (`redis_memory`) |
There was a problem hiding this comment.
We should have a good look at the readme -- maybe dream a bit with codex/claude -- to think about how to make it easier, and clearer to understand that there are two redis memory types here and some different flavors. Maybe we LEAD with the plugin approach (MemoryEditor) and then underneath list the two options and clearly highlight tradeoffs of each and how they work.
I also think we need a bit more front matter (maybe logos) and hype to draw a bit more attention when landing on the readme. Thanks!!!
There was a problem hiding this comment.
Made some additions to the README. Let me know what you think
tylerhutcherson
left a comment
There was a problem hiding this comment.
@justin-cechmanek looks great. One main comment on the README and 1-2 naming things. The comment on optimizing scans can wait for now -- to your point.
No description provided.