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
- Get your API key from mem0 dashboard
- Install the package:
- 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
- In Dify workflows, place before LLM calls to provide context
- Add after LLM responses to store new interactions
- can be customized in workflow run API
- 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]