Redis Memory
Redis Memory stores an agent’s memory in a Redis server owned by your company. With it, the agent remembers what was said in the earlier messages of each conversation and, if you turn it on, also important facts about each user that it keeps from one conversation to the next.
If you only want an agent to remember the conversation, you don’t need this component: when you turn on Use memory in the agent, NappAI keeps the history for you. Use Redis Memory when you want that memory to live in your own Redis server.
When to use it
- Your company already uses Redis and wants its assistants’ memory there.
- Your data policy requires conversation history to be stored on your own server.
- You want an assistant to remember facts about each customer, such as their usual store, across different conversations.
Configuration
Before you start you need a Redis server that NappAI can reach and that includes the search and JSON modules (built into Redis Stack and Redis 8), plus its connection address.
| Field | What it does |
|---|---|
| Redis Server Connection URL (required) | The connection address of your Redis server, with host, port, user, password and database. |
Advanced options
| Field | What it does |
|---|---|
| Enable Checkpointing | Stores the thread of each conversation in your Redis server so the agent remembers the earlier messages. Default: on. |
| Enable Store | Turns on long-term memory: the agent can save important facts about each user and look them up in later conversations. Turning it on shows Enable Semantic Search. Default: off. |
| Enable Semantic Search | Appears with Enable Store. Lets the agent search memories by meaning, not only by exact words. Turning it on shows the Embedding connection and the Embedding Dimension field. |
| Embedding Dimension | Appears with Enable Semantic Search. The size of the numeric representations produced by the connected embeddings model. It must match that model; check the value in the provider’s documentation. Default: 1536. |
| Session ID | Identifier of the session. You can leave it empty: the agent uses the session of each run, which you can set with Set Session ID. |
| Conversation ID | Identifier of the conversation. You can leave it empty: the agent saves and restores the thread by the conversation of each run. |
| Connection | What to connect |
|---|---|
| Embedding | An embeddings component, for example OpenAI Embeddings. Required to use Enable Store. |
Output
Memory is the configured memory. Connect it to the Memory input of an agent such as Agent, Simple Agent or Deep Agent. That input appears when you turn on Use memory in the agent’s Advanced tab.
With Enable Store on, the agent also gains the ability to save an important fact, search what it has saved and retrieve a specific fact. It decides when to do so based on the conversation.
Example
Ópticas Mirador handles appointment requests for its stores by chat and already uses Redis in its systems:
- Add Redis Memory and connect Redis Server Connection URL to an Environment Variable component that holds the server address.
- In the agent, turn on Use memory in the Advanced tab and connect Memory to the new Memory input.
When a customer asks for an appointment and then writes “afternoon would be better”, the agent knows which appointment and store they mean, and the conversation stays on Ópticas Mirador’s server.
Good practices
- Turn on long-term memory only if the agent must remember facts across different conversations; to follow one conversation, Enable Checkpointing is enough.
- Tell the agent in its instructions what it should and should not remember.
- Use Set Session ID with a stable customer identifier so each customer’s memories don’t mix with others.