app icon
mem0
0.0.2

Dify integration for mem0

yevanchen/mem02981 installs

mem0

Author: yevanchen
Version: 0.0.1
Type: tool

Description

mem0 is a memory management plugin that enables conversation history storage and retrieval for LLM applications.

Setup

  1. Get your API key from mem0 dashboard
  2. Install the package:
  1. Initialize the client:

Memory Actions

add_memory

Stores conversation history and context for users.

Backend logic:

  • Messages are stored in user-specific partitions using
  • Supports conversation history and context storage
  • Handles message format validation and processing
  • Optimizes storage for efficient retrieval

retrieve_memory

Retrieves relevant conversation history based on queries.

Backend logic:

  • Semantic search across user's memory partition
  • Returns relevant conversation snippets
  • Handles context ranking and relevance scoring
  • Optimizes query performance

Usage in Dify

  1. In Dify workflows, place before LLM calls to provide context
  2. Add after LLM responses to store new interactions
  3. can be customized in workflow run API
  4. Note: iframe and webapp modes currently don't support user_id due to lack of access control

Maybe Future Features

  • Multimodal Support
  • Memory Customization
  • Custom Categories & Instructions
  • Direct Import
  • Async Client
  • Memory Export
  • Webhooks
  • Graph Memory
  • REST API Server
  • OpenAI Compatibility
  • Custom Prompts

For feature requests or discussions, contact [email protected]

CATEGORY
Tool
VERSION
0.0.2
yevanchen·03/04/2025 02:29 PM
REQUIREMENTS
Tool invocation
Maximum memory
256MB