retainr is a persistent memory API for n8n. Install the n8n-nodes-retainr community node, connect it to your AI Agent workflow, and your agent remembers every user across sessions — no database setup, no code required. Works on n8n Cloud and self-hosted.
n8n runs each workflow execution in isolation. When it finishes, all context is gone. The next run starts completely fresh — your AI has no memory of the same user's previous conversations. n8n's built-in Simple Memory only lasts for the current session. retainr persists across sessions, restarts, and deployments.
Session only. Cleared on restart. Single user. No search.
Requires DB setup, schema design, and custom queries. Weeks of work.
30-second node install. Persistent, multi-user, semantic search. Free plan.
Go to n8n Settings → Community Nodes → Install. Enter "n8n-nodes-retainr". Done in 30 seconds.
After each AI interaction, use the Store Memory node to save context keyed by user ID, session ID, or any unique identifier.
Before each AI call, use the Search Memory node to inject the most relevant past context into your prompt automatically.
After installing the community node, configure it with your API key and a namespace to scope memories. Use any string that identifies who or what the memory belongs to — user ID, customer slug, or conversation ID.
// Store Memory node settings
{
"apiKey": "{{ $env.RETAINR_API_KEY }}",
"namespace": "user:{{ $json.userId }}",
"content": "{{ $json.message }}",
"metadata": {
"role": "user",
"timestamp": "{{ $now }}"
}
}
// Search Memory node settings
{
"apiKey": "{{ $env.RETAINR_API_KEY }}",
"namespace": "user:{{ $json.userId }}",
"query": "{{ $json.currentMessage }}",
"limit": 5
}n8n AI Agent Memory: Complete Tutorial (2026)
Step-by-step guide to installing retainr on n8n Cloud and self-hosted.
Why n8n AI Agents Forget Everything
How n8n workflow isolation works and why persistent memory requires an external API.
n8n LangChain Memory Node Guide
Using retainr with n8n's LangChain AI Agent node for production workflows.
n8n vs Make.com for AI Agent Memory
Which platform handles AI memory better — and how retainr works on both.
1,000 memory operations per month. Free forever. No credit card required.
Start free