Skip to main content
The MemMachine integration for n8n allows you to build sophisticated AI agents that remember users across sessions[cite: 1]. By using the MemMachine community nodes, you can store interactions, retrieve deep context, and trace memory operations directly within your automation canvas[cite: 2].

Overview

This integration provides two specialized nodes:
  • MemMachine Manager: Store messages and “Enrich” your agent prompts with semantic context[cite: 3].
  • MemMachine AI Memory: A native memory node that plugs directly into n8n’s AI Agent node[cite: 4].

Start n8n

To start a simple n8n container run the upstream docker container as described in the official docs:

With Tracing

If you want to visualize the memory interactions you might want to use the docker-compose file in the github repository.
Either way, after one of the commands finished, you are able to open your n8n instance.
1

First Login

Open localhost:5678/:
  1. Fill out a sign-up form.
  2. Skip the customization and click Get Started.
  3. Skip the offer page with Skip.
2

Install the Community Node

If you are using a self-hosted n8n instance:
  1. Navigate to Settings > Community Nodes.
  2. Click Install a community node.
  3. Enter the package name: @memmachine/n8n-nodes-memmachine
  4. Acknowledge the risk and click Install.
3

Configure Your Credentials

When you add a MemMachine node, you will be prompted to create credentials. You will need your API Key from the MemMachine Dashboard.

MemMachine Manager Node

The Manager node is used for manual memory operations at any point in your workflow.

Connect MemMachine

To use the node you’ll need to configure a connection. In case you are running MemMachine on the same machine as a docker container use this endpoint: http://host.docker.internal:8080/v2/api

Action: Store a message

Saves a specific content string to long-term memory.

Action: Enrich with context

Retrieves historical context to inject into an LLM prompt.

MemMachine AI Memory Node

Connect this node directly to the Memory input of a native n8n AI Agent node.
default template refers to the system’s built-in memory context template. Users may override it with a custom template.

Video Walkthrough

Seeing is believing. Check out this practical demonstration of setting up MemMachine nodes within n8n to create persistent AI agents.

Observability & Tracing

MemMachine nodes support native OTLP Tracing for debugging complex agent logic.
When using the AI Memory Node, ensure your agentId and userId are passed consistently across the workflow to ensure the agent’s “recognition” of the user remains persistent.