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

Overview

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

Start n8n

To start a simple n8n container run the upstream docker container as described in the official docs:
docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -e GENERIC_TIMEZONE="Europe/Berlin" \
  -e TZ="Europe/Berlin" \
  -e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
  -e N8N_RUNNERS_ENABLED=true \
  -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

With Tracing

If you want to visualize the memory interactions you might want to use the docker-compose file in the github repository.
wget -q https://raw.githubusercontent.com/MemMachine/n8n-nodes-memmachine/refs/heads/main/docker-compose.yml
docker-compose up -d
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. SignUp form
  2. Skip the customization and click Get Started. customize form
  3. Skip the offer page with Skip. upsell form
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. Community Nodes Page
  3. Enter the package name:
@memmachine/n8n-nodes-memmachine
  1. Acknowledge the risk and click Install. Install Community Nodes
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
MemMachine connection

Action: Store a message

Saves a specific content string to long-term memory.
ParameterTypeDescription
orgId / projectIdStringRequired. Your unique organization and project identifiers.
typesmultiOptionsRequired. Memory types to use (episodic, semantic).
producerStringRequired. Who created this message (e.g., “Agent” or “User”).
producedForStringRequired. Intended recipient of the message.
episodeContentStringRequired. The actual message text to store.
episodeTypeOptionsnone (default) or message.
metadataJSONAdditional metadata to associate with the message.
sessionIdStringRequired. Unique session identifier.
groupIdStringUnique group identifier (defaults to default).
agentId / userIdStringRequired. Identifiers for the specific AI agent and user.

Action: Enrich with context

Retrieves historical context to inject into an LLM prompt.
ParameterTypeDefaultDescription
orgId / projectIdString-Required. Unique organization and project identifiers.
typesmultiOptions-Required. Memory types to use (episodic, semantic).
queryString-Required. Natural language query for semantic search.
limitNumber50Maximum number of memory results to return.
scoreThresholdNumber-Minimum relevance score required to include a memory.
filterString-Filter expression to refine memory search results.
expandContextNumber0Number of extra episodes to include for context.
sessionIdString-Required. Unique session identifier.
groupIdStringdefaultUnique group identifier.
agentId / userIdString-Required. Identifiers for the specific AI agent and user.
enableTemplateBooleantrueRenders a formatted context string using a template.
contextTemplateStringdefault templateMarkdown template for formatting.

MemMachine AI Memory Node

Connect this node directly to the Memory input of a native n8n AI Agent node.
ParameterTypeDefaultDescription
orgId / projectIdString-Required. Your unique organization and project identifiers.
contextWindowLengthNumber10Max recent messages to include in chat history.
enableMemoryTemplateBooleanfalseWhether to wrap history in a formatted template.
historyCountNumber5Number of episodic memories to include in the template.
shortTermCountNumber10Number of short-term memories to include.
memoryContextTemplateStringdefault templateMarkdown template for formatting.
default template refers to the system’s built-in memory context template. Users may override it with a custom template.

Observability & Tracing

MemMachine nodes support native OTLP Tracing for debugging complex agent logic. Jaeger UI Trace Example
ParameterTypeDescription
tracingEnabledBooleanSet to true to enable operation tracing.
traceVerbosityOptionsminimal, normal, or verbose.
exportToJaegerBooleanIf true, sends traces to your Jaeger instance.
jaegerOtlpEndpointStringThe endpoint URL (e.g., http://jaeger:4318/v1/traces).
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.