Dify memory
A first-party Tool plugin: recall context before LLM nodes, remember facts after them — the cross-conversation user memory Dify does not have natively.
Overview
Dify’s native memory is per-conversation: the LLM-node memory toggle and conversation variables reset with every new thread, and the knowledge base is static documents — nothing remembers the USER across conversations or apps. The MemorySync plugin adds exactly that as four curated tools. Recall Context returns a prompt-ready memory block to wire into any LLM node; Remember sends a message, with the role you choose, to fact extraction — only the durable facts in a user message are stored, assistant messages are not, re-running a node never processes a message twice, and its reply says what happened (sent for extraction, nothing worth remembering, already sent, or quota reached); Search Memories returns scored JSON with tolerant parsing and a hard result cap; Forget Memory deletes exactly one memory, loudly — and there is deliberately no delete-everything tool (a community Mem0 fork exposes delete_all_memories to the LLM: a one-call account wipe). User scoping resolves automatically — parameter, then Dify’s own runtime user, then a deterministic default — where the community Mem0 plugin takes user_id as a free-form parameter and silently mixes every end user when it isn’t wired. Calls run under a 10s budget with structured, branchable error JSON instead of 30-second node hangs and opaque error blobs.
Setup status and requirements
- Supported version
- memorysync plugin 1.1.0 (.difypkg)
- Last setup review
- 2026-09-01
- Permissions
- A MemorySync API key with read and write scopes.
- Limits
- Requires Dify 1.14+ (plugin runner Python 3.12+). Install from the local package file; the marketplace listing is not yet published.
Capabilities
- Recall Context: prompt-ready memory block for any LLM node
- User scoping auto-resolved from Dify’s runtime — zero wiring required
- Conversation-scoped facts: session_id is the Dify conversation
- Idempotent Remember — a re-run node is recognised, not processed twice
- Remember reports the outcome: sent, nothing to remember, already sent
- Scored Search with tolerant parsing and a ≤25 result cap
- Loud single-id Forget; deliberately NO delete-everything tool
- 10s budget + structured branchable errors — no 30s node hangs
- Cross-surface: memories flow to and from every MemorySync adapter
Quick Start
Chatflow wiring:[User Input]│[Recall Context] ← MemorySync tool node│ {{recall_context.text}}[LLM Node] ← memory block in the prompt│[Remember] ← send what the user shared│[Answer]
Use Cases
Dify chatbots that greet returning users with context
Cross-app memory: facts from one Dify app recalled in another
Replacing the community Mem0 plugin and its shared-user pitfall
Guides and related pages
Related integrations
Explore More
Add long-term memory to Dify
Start free with 10,000 add requests a month and no credit card. Memory is stored per end user and comes back in every later session.
