Enhance your Dify applications with long-term memory by integrating the Memobase plugin. This guide will walk you through setting up and using the plugin to create more intelligent, context-aware AI agents.

Prerequisites

First, find and install the open-source Memobase plugin from the Dify plugin marketplace.

Memobase Plugin in the Dify Marketplace

Next, you’ll need a Memobase instance:

  • Memobase Cloud: The easiest way to get started is by signing up for a managed instance on the Memobase dashboard.
  • Self-Hosted: For more control, you can deploy your own instance. See the Memobase GitHub repository for instructions.

Plugin Configuration

To connect the plugin to your Memobase instance, you need to provide two credentials when adding the tool to your Dify application:

  1. Memobase URL: The API endpoint for your instance (e.g., https://api.memobase.dev).
  2. Memobase API Key: Your unique API key for authentication.

You can find both of these in your Memobase dashboard.

API Key and URL in the Memobase Dashboard

Using the Plugin in Dify Workflows

Once configured, you can use the plugin’s tools in your Dify workflows to:

  • Store and Recall Conversations: Persist dialogue for long-term context.
  • Personalize Responses: Retrieve user profiles to tailor interactions.
  • Access Past Events: Search and utilize historical user data.
  • Manage Memory: Directly manipulate data within your Memobase instance from Dify.

For detailed information on each tool, refer to the Memobase API Reference.

Example Workflow

Here is a conceptual example of a Dify workflow that uses the Memobase plugin to retrieve and store memory:

A minimal Dify workflow demonstrating memory retrieval and storage.

By integrating Memobase, you can build sophisticated AI applications that learn from and remember past interactions, leading to more engaging and personalized user experiences.