Skip to lesson

NVIDIANVIDIA-Certified Professional: Agentic AI2026-105.1 Implement memory mechanisms for short- and long-term context retention.

Redis Examples

Completed by opening the official lab

Why it matters

Long-term memory is a write path and a read path, and an agent decides when to use each. This example puts both behind tools, so you can see what the agent stores and what it gets back.

What to practise

Start Redis with the example’s Docker Compose file, then run the workflow with nat run twice: once with a stated preference, once with a question that depends on it. Read configs/config.yml: a tool_calling_agent with a memory_add tool and a get_memory tool, both bound to a redis_memory backend from the Redis-maintained nemo-agent-toolkit-redis plugin, one user_id and an embedder for HNSW search by L2 distance. Watch which inputs the agent stores as facts, that its tool description makes it call get_memory first on every turn, and what query and top_k return in the Phoenix trace.

How it fits

The two tools are the write and recall steps of 5.1.2 and 5.1.3. Compare what the agent stores here with 5.1.2’s reconciliation of facts before writing, and compare the similarity-only recall with 5.1.3’s ranking by relevance and recency.