- Home
- Resources
- Integrations
- Redis Chat Memory
n8n Redis Chat Memory nodeConfigure Redis Chat Memory in n8n.
Chat history that survives a restart lives outside n8n, in Redis. The n8n Redis Chat Memory node is a sub-node, a small node you attach to a bigger one instead of running it on its own. It plugs into the memory port of an agent, carries 3 parameters and runs at version 2.
Verified Trustpilot reviews · AI, automation & growth agency
What does the n8n Redis Chat Memory node actually do?
It stores the chat history of an AI conversation in Redis instead of keeping it inside the workflow. A root node, meaning the node that receives the workflow items and drives the model, reads that history back on every run, so the model sees what was said earlier without you resending the whole conversation each time.
Picture a support assistant that answers on a chat widget. Without memory, every message starts from nothing: the customer gives an order number, then asks a follow up question, and the model has no idea what order they mean. Attach this node to the AI Agent, point Session ID at the chat session, and the thread holds together across messages.
Second case: a team runs several chat surfaces off one workflow. Because every Redis Chat Memory node in a workflow reaches the same memory instance by default, two surfaces would read each other's history. Giving each memory node its own session ID keeps the conversations apart, which is exactly what Session ID set to customKey is for.
Third case: a long running assistant where history keeps growing. Context Window Length caps how many past interactions the model receives, and Session Time To Live decides how long the session stays in Redis at all. Those two settings are the difference between a conversation that stays cheap and one that drags a full transcript into every call, billed by whoever provides the model, whether that is OpenAI, Anthropic or another provider.
When would you pick something else? If a conversation only needs to hold together inside a single execution, a memory server is overhead you do not need. Redis earns its place when the history has to outlive the run, be shared between workflows, or expire on a schedule you control. And if the root node is a chain rather than an agent, memory is not an option there at all.
The limits are worth knowing up front. The node exposes 3 parameters and nothing else: no eviction policy, no message trimming beyond the context window, no read or write of individual messages. Destructive operations on the stored history belong to other nodes, so a node such as Chat Memory Manager can overwrite what this one saved when both point at the same session. The n8n review covers where the platform sits more broadly, and AI Agent Tool accepts the same memory port when an agent is called as a tool.
What do you connect before the node runs?
- 01
Create the Redis credential
Open the Credentials menu in n8n and add a Redis credential. It asks for a Password, a Host (
localhostby default), a Port (6379by default), a Database Number (0by default) and an SSL toggle. n8n stores it once and every workflow on the instance can reuse it, so a second memory node later needs no new setup. - 02
Select it on the node
Drop the Redis Chat Memory node on the canvas and pick that credential in the node panel. There is no authentication selector to choose from on this node: one credential type, one choice. Everything else on the panel is the 3 parameters covered further down.
- 03
Attach it to a root node
Drag from the memory port of an AI Agent, AI Agent Tool, Chat Memory Manager or Chat Trigger to the node. A sub-node never executes on its own, so the only way to test the credential is to run the root node and watch the execution. Nothing happens if the node sits unattached on the canvas.
Where does the node plug in?
n8n splits AI work between a root node, which takes the workflow items, and sub-nodes attached to its ports: one type of sub-node per port. This node fills the memory port and only that port.
Output (what it plugs into)
- Memory
ai_memory
01Memory
The memory port is where a root node picks up the conversation history it should carry into the next model call. Redis Chat Memory connects here, and nowhere else: the node has no main input, so it never receives workflow items directly.
Key parameters
- Optional: an agent answers without memory, it simply forgets everything between messages.
- AI Agent: the usual root node for a chat assistant that has to remember an order number or a name.
- Chat Trigger: the entry point of a chat workflow, which also exposes a memory port.
- Chat Memory Manager: the node that reads and rewrites stored history, pointed at the same Redis session.
How do you set the 3 parameters?
The Redis Chat Memory node has 3 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.
Parameters index
Session ID
sessionIdTypeWhat you see in n8n
Notes & use cases
This decides which conversation the node reads and writes. Every stored history hangs off a session, and two runs that share a session share a thread.
Key parameters
- Session ID:
fromInput(Connected Chat Trigger Node) looks for an input field calledsessionIdcoming from a directly connected Chat Trigger, whilecustomKey(Define below) lets you use an expression to reference data in previous nodes or enter static text. - Session Key From Previous Node: the field that carries the key when you define it yourself, typically
{{ $json.sessionId }}.
Session Time To Live
sessionTTLWhat you see in n8n
Notes & use cases
Here you decide how long Redis keeps the session before dropping it. It is the only parameter that acts after the workflow has finished running.
Key parameters
- Session Time To Live: a number of seconds, for how long the session should be stored. Set to
0it will not expire, so the history stays until something else removes it.
Context Window Length
contextWindowLengthWhat you see in n8n
Notes & use cases
Stored history and sent history are two different things. This number sets how many past interactions the model actually receives as context on each call.
Key parameters
- Context Window Length: a number of previous interactions to consider for context, independent of how much Redis holds.
Need help automating Redis Chat Memory with n8n?
A person reads every message.
Questions people ask next
01Is the n8n Redis Chat Memory node free to use?
02What do you need for it to work?
03What are the limits of the node?
04What do you attach at a minimum, and where do you start?
05n8n or Make for this kind of AI workflow?
Get our weekly integration tips.
No spam. Unsubscribe anytime.

