AI Memory Nodes for n8n Workflows
n8n's visual workflow builder is powerful for automation, but its AI agent nodes have no persistent memory between executions. This guide uses REM Labs HTTP Request nodes to store and retrieve context so your n8n AI workflows remember past interactions and deliver smarter responses.
The Problem: Stateless AI Agents in n8n
n8n's AI Agent node lets you build conversational workflows with tools, but each execution starts fresh. The agent has no idea what the user said yesterday or what it decided last week. For customer support bots, sales assistants, or any recurring workflow, this is a dealbreaker.
REM Labs is a REST API -- which means you can wire it into n8n using standard HTTP Request nodes. No custom code, no npm packages. Just two HTTP calls: one to search, one to store.
Step 1: Get Your API Key
Sign up at remlabs.ai/console and copy your API key. In n8n, create a new credential of type Header Auth with:
- Name:
Authorization - Value:
Bearer sk-slop-...
Step 2: Memory Search Node
Add an HTTP Request node before your AI Agent node with these settings:
This searches REM for memories relevant to whatever the user just typed. The response contains an array of memory objects with value and score fields.
Step 3: Feed Context to the AI Agent
Connect the HTTP Request output to a Set node that formats the context, then pipe it into the AI Agent's system message:
The AI Agent now receives relevant history from past conversations as part of its system prompt. It can reference previous tickets, known preferences, and established facts.
Step 4: Memory Store Node
Add another HTTP Request node after the AI Agent to persist the exchange:
Every exchange is now stored persistently. The next time the workflow runs, the search node retrieves relevant past context automatically.
Example: Customer Support Workflow
A complete memory-enhanced support workflow in n8n looks like:
- Webhook Trigger -- receives chat input
- HTTP Request (Search) -- retrieves relevant memories from REM
- Set Node -- formats context for the system prompt
- AI Agent -- generates a response with context
- HTTP Request (Store) -- persists the exchange to REM
- Respond to Webhook -- returns the response
Six nodes. No code. Your support bot now remembers every customer interaction across sessions.
Works with n8n Cloud and self-hosted: Since REM is called via standard HTTP, it works identically on n8n Cloud and self-hosted instances. No custom node packages to install.
Give your n8n workflows a memory
Free tier. No credit card. Just add an HTTP Request node.
Get started free →