Skip to main content
Version: v1.0 (Raw Transcripts)

Transcript: Redis Agent Memory Basics

Version 1: Source Transcript

This document represents the raw lecture transcript recorded from the video lecture. For architectural study notes and system design documentation, see Version 2.

Full Transcript​

Modern large language models are getting better at reasoning, calling tools, and completing tasks. They are faster and more capable than they were a few years ago. But even this modest model needs the right data, state, and memory at the right time. If every conversation with your AI agent starts from zero, the experience feels generic. But if it remembers the right things, it starts to feel actually useful. Today, I want to show you Redis Agent Memory, a managed service that helps your agents to remember things and recall those memories when it matters. The app you are seeing is a travel agent implemented using LangGraph. Redis Agent Memory gives it memory capabilities for the current conversation and for durable user facts and preferences across sessions. On the right side, you can see the current session memory, all the retrieved long-term memories, and newly created memories. Here is how the app works. LangGraph runs one agent turn. Before calling the model, the app retrieves session memory and searches long-term memories from Redis Agent Memory. Then, it injects the context into the prompt. After the model responds, the app writes the conversation as session events, extracts durable facts or preferences, and stores those back into Redis Agent Memory. Redis Agent Memory can also create durable memories in the background. Let me show you how you can get started with the Redis Agent Memory. First, log in to Redis Cloud. From the console, go to Agent Memory. From here, you can create a new Agent Memory service. You will see two options, quick creation and custom creation. Quick creation creates a service and the underlying Redis databases for you automatically using your free 30 megabytes plan. Custom creation lets you choose the Redis database behind the service, which is useful when you care about the service's durability, performance, and scalability. For this demo, I will use custom creation. I will then name the service, select my database, and confirm the service creation. Once the service is created, make sure to copy the new API key. Take a note of the endpoint URL, the store ID, and the previously copied API key. These are the values your app needs to connect to Redis Agent Memory. Now, let's see why this memory layer matters in practice. I'm about to give the agent a few durable facts in a normal conversation. I'm not explicitly asking it to remember anything. The memory layer identifies durable facts and preferences and creates long-term memories. After the response, we can see the newly created long-term memories on the right. These are the durable facts Redis Agent Memory can use in future sessions. Now, I'm adding session-specific context. San Francisco next month matters right now, but it probably shouldn't become a durable user preference. The current conversation appears in short-term memory, while relevant long-term memories can be retrieved and used it to personalize the answer. Here is the key distinction. Session memory gives the agent continuity, while long-term memory gives it personalization. Now, I will start a fresh session. Short-term memory resets, but long-term memory should still be available. There you have it. The session is new, but the agent can still recall durable preferences from Redis agent memory. If your AI agents needs to remember users preferences or context across sessions, Redis agent memory is the fastest way to get started. Curious to learn a little more? Try the demo app. The link you can find in the description. Happy coding.

Timestamped Segments​

  • [00:03] Modern large language models are getting better at reasoning, calling tools, and completing tasks. They are faster and more capable than they were a few years ago. But even this modest model needs the right data, state, and memory at the right time. If every conversation with your AI agent starts from zero, the experience feels generic. But if it remembers the right things, it starts to feel actually useful.
  • [00:29] Today, I want to show you Redis Agent Memory, a managed service that helps your agents to remember things and recall those memories when it matters. The app you are seeing is a travel agent implemented using LangGraph. Redis Agent Memory gives it memory capabilities for the current conversation and for durable user facts and preferences across sessions.
  • [00:53] On the right side, you can see the current session memory, all the retrieved long-term memories, and newly created memories. Here is how the app works. LangGraph runs one agent turn. Before calling the model, the app retrieves session memory and searches long-term memories from Redis Agent Memory.
  • [01:14] Then, it injects the context into the prompt. After the model responds, the app writes the conversation as session events, extracts durable facts or preferences, and stores those back into Redis Agent Memory. Redis Agent Memory can also create durable memories in the background.
  • [01:35] Let me show you how you can get started with the Redis Agent Memory. First, log in to Redis Cloud. From the console, go to Agent Memory. From here, you can create a new Agent Memory service. You will see two options, quick creation and custom creation.
  • [01:54] Quick creation creates a service and the underlying Redis databases for you automatically using your free 30 megabytes plan. Custom creation lets you choose the Redis database behind the service, which is useful when you care about the service's durability, performance, and scalability. For this demo, I will use custom creation.
  • [02:13] I will then name the service, select my database, and confirm the service creation. Once the service is created, make sure to copy the new API key. Take a note of the endpoint URL, the store ID, and the previously copied API key. These are the values your app needs to connect to Redis Agent Memory.
  • [02:39] Now, let's see why this memory layer matters in practice. I'm about to give the agent a few durable facts in a normal conversation. I'm not explicitly asking it to remember anything. The memory layer identifies durable facts and preferences and creates long-term memories.
  • [02:58] After the response, we can see the newly created long-term memories on the right. These are the durable facts Redis Agent Memory can use in future sessions. Now, I'm adding session-specific context. San Francisco next month matters right now, but it probably shouldn't become a durable user preference.
  • [03:20] The current conversation appears in short-term memory, while relevant long-term memories can be retrieved and used it to personalize the answer. Here is the key distinction. Session memory gives the agent continuity, while long-term memory gives it personalization.
  • [03:39] Now, I will start a fresh session. Short-term memory resets, but long-term memory should still be available. There you have it. The session is new, but the agent can still recall durable preferences from Redis agent memory. If your AI agents needs to remember users preferences or context across sessions, Redis agent memory is the fastest way to get started.
  • [04:05] Curious to learn a little more? Try the demo app. The link you can find in the description. Happy coding.