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.

1

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.
  4. Acknowledge the risk and click Install. Install Community Nodes
2

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.

Action: Store a message

Saves a specific content string to long-term memory.
ParameterTypeDescription
orgId / projectIdStringRequired. Your unique organization and project identifiers.
producerStringRequired. Who created this message (e.g., “Agent” or “User”).
producedForStringRequired. Intended recipient of the message.
episodeContentStringRequired. The actual message text to store.
episodeTypeOptionsdialog (default), summary, or observation.
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
queryString-Required. Natural language query for semantic search.
limitNumber50Maximum number of memory results to return.
filterBySessionBooleantrueRestricts results to the current session context.
enableTemplateBooleantrueRenders a formatted context string using a template.
contextTemplateString-Markdown template for formatting (uses system default if empty).

MemMachine AI Memory Node

Connect this node directly to the Memory input of a native n8n AI Agent node.
ParameterTypeDefaultDescription
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.

Observability & Tracing

MemMachine nodes support native OTLP Tracing for debugging complex agent logic. When enabled, you can visualize memory operations in external tools like Jaeger. 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).
Pro-Tip: 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.