Skip to main content

Redis Agent Memory integration for NVIDIA NeMo Agent Toolkit

Project description

Redis

nemo-agent-toolkit-redis

Redis-backed memory for NVIDIA NeMo Agent Toolkit — production Redis Agent Memory integrations plus direct Redis plugins (the historical nat.plugins.redis stack).

In NAT, long-term recall is usually wired through memory tools such as get_memory and add_memory, which delegate to a MemoryEditor implementation. This package adds Redis-backed options in two families: Redis Agent Memory (AMS over HTTP — richer lifecycle, optional auto-memory workflow) and direct Redis (JSON + vector search or plain KV inside nat.plugins.redis, no AMS).

This repo is the standalone home for integrations that used to ship under packages/nvidia_nat_redis in the NeMo Agent Toolkit monorepo.

Redis Agent Memory (full stack)

  1. _type: redis_agent_memory_backend — Redis Agent Memory as a NAT MemoryEditor long-term memory backend.

  2. _type: redis_agent_memory_auto_memory — A native Redis Agent Memory wrapper that uses working memory plus memory_prompt hydration on every turn. AMS runs as a separate service; these surfaces talk to it via the agent-memory client.

  3. _type: redis_agent_memory_backend — Redis Agent Memory behind NAT’s standard MemoryEditor contract (fits tool-driven long-term memory).

  4. _type: redis_agent_memory_auto_memory — A workflow wrapper (not just another editor): working memory, memory_prompt hydration every turn, turn capture, and promotion — the fullest AMS-shaped integration.

Direct Redis (simple in-Redis memory)

Loaded via the nat.plugins setuptools entry point nat_redis (same name as the historical monorepo package):

  • _type: redis_memory — Vector search over JSON documents in Redis (RediSearch); requires a workflow embedder and Redis Stack (or Redis with search + JSON support). Implements MemoryEditor-style semantic memory without AMS.
  • _type: redis — NAT object store on plain Redis key–value storage (not semantic long-term memory).
Redis Agent Memory Direct Redis
Runs AMS service + Redis Redis only (your NAT process uses the client)
Best for Learning-style memory, working memory, AMS filters and APIs Lightweight Redis-native memory or KV object store
Tradeoff Operate AMS; HTTP path Simpler ops for redis / redis_memory; vector path needs embedder + search-capable Redis

Use Redis Agent Memory when you want the Redis Agent Memory feature set. Use redis_memory when you only need a lightweight Redis-native MemoryEditor without AMS.

Python imports (same as NeMo)

Direct Redis support is implemented only under nat.plugins.redis (for example from nat.plugins.redis.redis_editor import RedisEditor), matching NeMo Agent Toolkit. The nat.plugins setuptools entry point nat_redis loads nat.plugins.redis.register. Redis Agent Memory code lives under nvidia_nat_redis.redis_agent_memory.

Install

With uv:

uv add nemo-agent-toolkit-redis

With pip:

pip install nemo-agent-toolkit-redis

Install the package into the same Python environment as nvidia-nat-core. After installation, confirm NAT can discover the Redis plugin:

uv run nat info components

For local development in this repo:

git clone https://github.com/redis-developer/nemo-agent-toolkit-redis.git
cd nemo-agent-toolkit-redis
uv sync --group dev --extra test

Compatibility

This package supports NeMo Agent Toolkit >=1.6.0,<2.0.0 and Python >=3.11,<3.14. Compatibility is checked in CI against supported NAT minor versions.

Choose A Surface

  • Use _type: redis_agent_memory_backend when your workflow already uses NAT memory tools and you want Redis Agent Memory behind the standard MemoryEditor contract.
  • Use _type: redis_agent_memory_auto_memory when you want Redis Agent Memory to own working-memory continuity, prompt hydration, and turn capture on every request. This exposes the richness of Redis Agent Memory in its fullest form.
  • Use _type: redis_memory when you want the simpler direct-Redis memory from NeMo Agent Toolkit (Redis JSON + vector index, no Redis Agent Memory). You must configure an embedder reference and run a Redis deployment that supports the search commands used by the plugin.
  • Use _type: redis when you need NAT’s Redis-backed object store (KV), not vector or AMS-backed semantic memory.

Integration Modes

These examples cover the two Redis Agent Memory integration shapes (MemoryEditor backend vs workflow wrapper). For redis_memory / redis, see Configuration reference.

Direct Long-Term Memory Backend

Use _type: redis_agent_memory_backend when you want Redis Agent Memory behind NAT's generic memory tools such as get_memory and add_memory.

memory:
  redis_memory:
    _type: redis_agent_memory_backend
    base_url: http://localhost:8000
    default_namespace: nat

Native Redis Agent Memory Wrapper

Use _type: redis_agent_memory_auto_memory when you want:

  • working-memory continuity by conversation_id
  • automatic memory_prompt hydration
  • completed turns appended back into Redis Agent Memory
  • background promotion into long-term memory
workflow:
  _type: redis_agent_memory_auto_memory
  inner_agent_name: assistant_chat
  memory_name: redis_memory

  memory_prompt:
    optimize_query: false
    long_term_search:
      limit: 5

  working_memory:
    namespace: nat
    ttl_seconds: 86400
    long_term_memory_strategy:
      strategy: discrete

The wrapper resolves runtime identity from NAT context:

  • user_id -> Redis Agent Memory user_id
  • conversation_id -> Redis Agent Memory session_id

Examples

Both example directories are self-contained. Each includes a .env.example, localhost-bound Docker Compose services, a NAT config, a runner, and a short README.

Configuration

Development

make setup
make lint
make test
make validate
make build
make check

Integration tests are opt-in because they start real Redis and Agent Memory Server containers:

make test-integration

The example Compose files are intended for local development. They bind Redis and AMS to 127.0.0.1 and run AMS with auth disabled.

See CONTRIBUTING.md.

Support

File Redis integration bugs, Redis Agent Memory behavior questions, and package release issues in this repository: https://github.com/redis-developer/nemo-agent-toolkit-redis/issues.

File nvidia-nat-core runtime, loader, or public plugin API issues in the NeMo Agent Toolkit repository: https://github.com/NVIDIA/NeMo-Agent-Toolkit/issues.

License

This project is licensed under the Apache License 2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nemo_agent_toolkit_redis-0.2.0.tar.gz (243.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nemo_agent_toolkit_redis-0.2.0-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file nemo_agent_toolkit_redis-0.2.0.tar.gz.

File metadata

  • Download URL: nemo_agent_toolkit_redis-0.2.0.tar.gz
  • Upload date:
  • Size: 243.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nemo_agent_toolkit_redis-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e2da0e26d527ce4932740db854f09206e95e48221169a94207889317ccd98b55
MD5 c141c23f19291a393e3f0136bf1e3028
BLAKE2b-256 dbd77bc7f8617627851d58ad61c3baa9f18d35688e1226014811a80d8d8b5409

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_agent_toolkit_redis-0.2.0.tar.gz:

Publisher: publish.yml on redis-developer/nemo-agent-toolkit-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nemo_agent_toolkit_redis-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nemo_agent_toolkit_redis-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18a18617e50635a1ca6e41e91c05eefdd3c1c3e3d4b47b1aabc3b730b199fb96
MD5 51082fe80d551cda6ccc61fb2cf768d3
BLAKE2b-256 4deb270eb7aa3f4811f0fe6747f5621e625d22c7276b071625befbe9d0aab9ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for nemo_agent_toolkit_redis-0.2.0-py3-none-any.whl:

Publisher: publish.yml on redis-developer/nemo-agent-toolkit-redis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page