MemorySync
Getting Started

n8n Workflow & Agent Memory

Two nodes give n8n long-term memory: workflow operations (add, search, recall, list, delete) that an AI Agent can also call as a tool, and a Chat Memory sub-node that makes agent conversations persist across executions, restarts and redeploys. Install n8n-nodes-memorysync from the community-nodes panel.

Two nodes, one package

NodePlugs intoWhat it does
MemorySyncAny workflow (and AI Agents as a tool)Six operations: Add Memory, Add Conversation Turn, Search, Recall Context, Get Many, Delete
MemorySync Chat MemoryThe AI Agent’s *memory* portThe agent’s conversation history lives in MemorySync — sessions survive restarts, redeploys, and weeks between chats
Mem0SupermemoryZepMemorySync
Community node ships△ workflow ops only✗ HTTP-request recipes in docs△ built-in node deprecated; hard-removed in n8n v3n8n-nodes-memorysync
AI Agent memory sub-node✗ nonewas the removed node✓ maintained, on the official @n8n/ai-node-sdk path
Agent can call memory as a tool✗ not marked usableusableAsTool
Credential test✗ none — bad keys fail mid-workflow✓ real query at setup time
Retry safety✗ re-runs re-store✓ deterministic idempotency seeds
Runtime dependenciesseveral✓ zero (verified-program rule)

Install

Settings → Community Nodes → Install
Package name: n8n-nodes-memorysync
→ restart is handled by n8n; both nodes appear in the node picker

Create a MemorySync API credential with a key from the dashboard. The credential test performs a real one-result query, so a wrong key fails at connect time — not three steps into a production workflow. n8n Cloud lists only verified community nodes; the verification submission is in progress, so Cloud users should watch the community-nodes panel.

The AI Agent memory sub-node

Chat Trigger ─▶ AI Agent ◀─memory─ MemorySync Chat Memory
◀─model── OpenAI Chat Model
◀─tool─── MemorySync (Search Memories)
GuaranteeHow
Sessions survive anythingHistory lives in MemorySync, not in-process — restarts, redeploys and scale-out don’t lose a turn
Retries never duplicateEvery stored turn carries a deterministic idempotency seed derived from role, session and content
An outage never breaks the agentgetMessages fails open to “no history this run”; the agent still answers
Agents cannot bulk-deleteclear() is a deliberate no-op — deleting a customer’s history stays an explicit human action (the workflow node’s Delete operation)
Same memory everywhereTurns store under the n8n::<session> transcript scope — separate history, same shared user memories as every other MemorySync surface

Workflow operations

OperationUse it for
Add Memory“Remember this fact” — server-side extraction keeps only durable content
Add Conversation TurnVerbatim transcript capture with duplicate-proof retries
Search MemoriesSemantic lookup — results fan out as n8n items
Recall ContextA grouped, prompt-ready context block for a downstream AI step (no competitor node has this)
Get ManyNewest-first listing for an end user
Delete MemoriesExplicit deletion by ID (m_123)
curl --request POST https://api.memorysync.io/v1/memory/add_turn \
--header "X-API-Key: $MEMORYSYNC_API_KEY" \
--header "Content-Type: application/json" \
--data '{"tenant_id":"acme","user_id":"customer-42","source":"n8n","text":"human: I always take the window seat","speaker":"human@n8n::support#h<content-hash>","metadata":{"session_id":"n8n::support"}}'

Quota behaviour is explicit: free-tier exhaustion reports stored: false, accepted: true instead of failing the workflow, and evaluation keys surface a truthful 429. Bad metadata JSON and malformed memory IDs raise clear node errors before any network call.

Supported versions

SurfaceRequiresVerified on
n8n-nodes-memorysync 1.0.0Self-hosted n8n with community nodes enabled; the Chat Memory sub-node needs an n8n release that ships @n8n/ai-node-sdk (current releases do)23 CI checks: the registry contract (package keyword, dist wiring, zero runtime deps), the fnv1a64 idempotency parity vector, and the memory node driven through the REAL @n8n/ai-node-sdk → LangChain adapter chain — windowed history, session isolation, both metadata envelopes (nested production + legacy flat), duplicate-proof retries, fail-open outages, no-op clear — plus a live production round-trip

Where to go next

Was this page helpful?