@mem0/n8n-nodes-mem0 community node fixes that: store durable facts as memories, recall them in any later run, and hand the node to an n8n AI Agent as a tool so it can remember and recall on its own.
Overview
- Install the node from n8n’s community nodes panel.
- Connect your Mem0 API key once as a credential.
- Drop a Mem0 node into any workflow to add, search, or manage memories.
- Optionally attach it to an AI Agent node, where it becomes a tool the agent calls itself.
Prerequisites
- A Mem0 API key from the API Keys dashboard (sign up at app.mem0.ai if you do not have an account).
- A self-hosted n8n instance. Installing community nodes from npm is a self-hosted feature; n8n Cloud only offers nodes that n8n has verified.
- Owner access to that instance, since only instance owners can install community nodes.
Installation
1
Open the community nodes panel
In n8n, go to Settings → Community Nodes and select Install.
2
Install the package
Enter
@mem0/n8n-nodes-mem0, tick the risk acknowledgement, and select Install.3
Create the credential
Add a new Mem0 API credential and paste your API key. Leave Base URL at
https://api.mem0.ai unless you run Mem0 somewhere else.Verify the install: search the nodes panel for
Mem0. The node should appear with a Memory resource offering Add, Search, Get, Get Many, Update, and Delete.Quickstart
A two-node workflow that writes a memory and reads it back:1
Add a memory
Add a Mem0 node, keep Operation: Add, set User ID to
alice, and add one message with Role user and Content:I am vegetarian and I never eat mushrooms.2
Search for it
Add a second Mem0 node with Operation: Search, User ID
alice, and Query what does the user eat?.3
Run it
Select Test workflow. The Search node returns the extracted dietary memory.
Extraction is asynchronous. The Add node’s Wait for Completion option is on by default, so it polls until extraction finishes before the next node runs. If you turn it off, allow a few seconds before searching for what you just wrote.
Use it as an AI Agent tool
The node is markedusableAsTool, so an n8n AI Agent (Tools Agent) can call it without any wiring on your side:
Operations
The node wraps the hosted Mem0 REST API and supports six operations on the Memory resource:Add
Extracts and stores memories from one or more messages. Supply at least one entity id (User ID, or Agent ID / App ID / Run ID under Additional Fields); the node checks this before calling the API. Additional Fields:
Includes and Excludes narrow what extraction keeps. Sending “I am vegetarian and I never eat mushrooms. I drive a blue Toyota Corolla and my parking spot is B12” stores three memories by default; with
Includes: "only record food and diet preferences" it stores just the dietary one.
Search
Semantic search over stored memories. Takes a Query, at least one entity id, and an optional Limit.Get Many
Lists stored memories for the entity ids you supply. Turn on Return All to page through everything automatically, or leave it off to fetch a single Page. Page Size applies either way.Get, Update, Delete
Operate on one memory by Memory ID. Update accepts new Text and/or Metadata (JSON).Entity filters on Search and Get Many
Both operations take User ID, Agent ID, App ID, and Run ID. At least one is required, since the API rejects a query with no entity scope, and the node fails with a clear message before making the call if all four are empty. Supply several and they combine with OR, so the result is the union of those scopes:Choosing a User ID
The User ID is a stable string you pick to identify whose memories these are. It is not looked up in the dashboard, so any consistent value works: your app’s internal user ID, an email, or a UUID. Use the same value across Add, Search, and Get Many or recall returns nothing.Troubleshooting
- The node does not appear in the panel: community nodes install on self-hosted n8n only, and only instance owners can install them. On n8n Cloud, this node is not yet available.
401 Unauthorized: the API key is wrong or was revoked. Regenerate it in the API Keys dashboard and update the credential.- “Provide at least one of User ID, Agent ID, App ID, or Run ID”: every Add, Search, and Get Many needs an entity scope. Fill in at least one.
- Search returns nothing right after an Add: extraction is asynchronous. Leave Wait for Completion on, or add a short Wait node before searching.
- Searching two entity ids returns more than expected: multiple ids are combined with OR by design. Run one operation per id to narrow.
- “Timed out waiting for memory event”: the add was accepted and is likely still finishing on the server. A timeout here does not mean it failed.
Zapier Integration
Add memory to Zaps across thousands of apps
Flowise Integration
Add memory to Flowise chatflows
Using Mem0? Star us on GitHub to help more developers discover memory for AI apps.