n8n's AI Agent node is great for wiring an LLM into an automation — but each execution is independent. The agent that handled a customer's request today knows nothing about the one it handled yesterday, because there's no durable memory between workflow runs. Personalization and continuity — the whole point of an AI assistant in a workflow — need state that outlives a single execution. This guide shows what persistent memory for n8n looks like in practice — what to store, what it changes, and exactly how to wire it up. New to the idea? Start with the complete guide to persistent memory for AI.
Why n8n agents need persistent memory
The problem isn't the model — it's statelessness. n8n is only as consistent as the context it's handed each session, and without a durable memory that context resets to zero every time. Persistent memory is a store outside the model that keeps the facts, decisions, and preferences you build up, and surfaces them by meaning when they're relevant again — so n8n stops re-learning your project and starts compounding what it knows.
What your n8n setup should remember
- Per-contact context: what this customer asked before, their preferences, their account facts.
- Decisions and outcomes from earlier runs of the same workflow.
- Corrections and feedback that should shape future automated replies.
- Anything the workflow learns that the next execution should start from.
What it changes, concretely
Before: an n8n support workflow treats every inbound message as a first contact. After: a recall step loads the contact's history and preferences before the agent replies, and a remember step saves the new facts — each run continues the relationship instead of restarting it.
How to add persistent memory to n8n
- Add an HTTP Request node (or a custom tool on the AI Agent node) that calls the Kit for AI REST API.
- Recall before the agent runs — pass the contact/user id as end_user_id — and inject the memories into the prompt.
- Remember after — write the durable facts the run produced back to that user's namespace.
- Each end user is isolated automatically, so one workflow safely serves many contacts.
One memory across every tool
Because the memory lives in the cloud, it isn't locked to n8n. A decision you save here is recalled by every other MCP-capable tool and by your own scripts over the API — switch models or editors and your memory follows you. That's the difference between a per-app memory silo and a real memory layer for AI, and it's why the same account also handles document ingestion and cited search.
FAQ
Does n8n have persistent memory built in?
n8n can persist a single thread or run's state, but not a distilled, semantically searchable long-term memory that spans threads and users. Persistent memory adds exactly that — a durable store, recalled by meaning, isolated per end user — through one API.
How do I give n8n long-term memory?
Call the Kit for AI REST API or typed SDK from your n8n setup: recall(query, end_user_id) to load relevant memories into context and remember(fact, end_user_id) to save durable facts — with an isolated namespace per user, so one integration serves all of them.
Related guides
Go deeper: the AI memory API · the memory layer pattern — or read the pillar guide to persistent memory for AI.
Add persistent memory to your n8n agents in minutes — Start free and call remember and recall over the REST API or the typed SDK.