Repository: dify-plugin-memobase
Author: acane0320
Version: 0.0.2
Type: tool
The Memobase plugin allows Dify applications to connect and interact with a user's self-hosted or managed Memobase instance. Memobase is an open-source long-term memory solution for AI. This plugin provides tools for managing users, conversation data, profiles, and events within that instance.
- User Management: Add, get, update, and delete users in your Memobase instance.
- User Data Management: Insert conversation data, retrieve specific or paginated data, delete data, and get personalized user context from your Memobase.
- User Profile Management: Add, get, update, and delete user profile entries. Manage profile configuration and flush the memory buffer in your Memobase.
- User Event Management: Get recent events, search events based on queries, update, and delete events within your Memobase.
Memobase is open-source, allowing you to deploy your own instance.
To use this plugin, you need to provide the following credentials when adding it in Dify, corresponding to your Memobase instance:
- Memobase URL: The endpoint URL of your Memobase instance (e.g.,
https://api.memobase.dev
). - Memobase API Key: Your API key for authenticating with your Memobase instance.
You can obtain these from your Memobase dashboard or configuration.
Once configured with the details of your Memobase instance, the Memobase tools will be available within the Dify orchestration interface.
You can add these tools to your workflows to:
- Store conversation history for long-term memory in your Memobase.
- Retrieve user profiles or context from your Memobase to personalize responses.
- Search past user events or interactions stored in your Memobase.
- Manage user information within your Memobase directly from Dify.
- Manually flush the memory buffer to immediately process conversation data when needed.
For specific instructions on how to use the tool, you can refer to the Memobase API Reference.
Here are workflow examples based on the memobase plugin to implement memory functionality:
Memory Workflow with Buffer Flush
For scenarios where you need immediate processing of conversation data (such as debugging or testing), you can use the flush workflow:
Buffer Flush Notes:
- User data is held in a buffer. If the buffer gets too large or remains idle, it gets processed automatically
- You can also trigger this processing manually using the flush buffer method
- If you want to store the contents of a conversation immediately after it ends, you need to call the flush buffer method explicitly
- We don't recommend flushing every time because it would cost too many tokens
- However, if you are debugging or testing, it is reasonable to flush right after the conversation, because you want to see the result as soon as possible
This workflow includes the flush buffer step at the end to ensure conversation data is processed immediately, though this approach should be used judiciously due to token costs.
Click on the workflow images above to view the actual workflow files.