Developing Prompt-Based Plugins for FRIEND

Prompt-based plugins allow you to customize FRIENDā€™s behavior and enhance its ability to process information. This guide will walk you through creating both Chat Prompts and Memory Prompts.

Types of Prompt-Based Plugins

1. šŸ’¬ Chat Prompts

Chat prompts alter FRIENDā€™s conversational style and knowledge base. They allow you to create specialized versions of FRIEND for different contexts or expertise areas.

Chat plugin

Example Use Case

Create a plugin that makes FRIEND communicate like a specific expert or professional in a given field, such as a historian, scientist, or creative writer.

2. šŸ§  Memory Prompts

Memory prompts analyze conversations and extract specific information based on predefined criteria. Theyā€™re useful for summarization, key point extraction, or identifying action items from discussions.

Memory plugin

Example Use Case

Develop a plugin that extracts action items from a meeting transcript and compiles them into a to-do list.

Note: Itā€™s possible to create plugins that combine both chat and memory capabilities for more comprehensive functionality.

Creating a Prompt-Based Plugin

Step 1: Define Your Plugin

Decide whether youā€™re creating a Chat Prompt, a Memory Prompt, or a combination of both, and outline its specific purpose.

Step 2: Write Your Prompt

Craft your prompt carefully. For Chat Prompts, focus on defining the personality and knowledge base. For Memory Prompts, clearly specify the information to be extracted and how it should be formatted.

Step 3: Test Your Plugin

Before submitting, itā€™s crucial to test your plugin to ensure it behaves as expected.

For Memory Prompts:

  1. Download the FRIEND app on your device.
  2. Enable developer settings in the app.
  3. Open a memory within the app.
  4. Click in the top right corner (3 dots menu).
  5. In the developer tools section, you can run your prompt to test its functionality.

Testing Prompts In-app

For Chat Prompts:

Currently, there isnā€™t an easy way to test chat prompts directly within the app. Weā€™re working on improving this process. In the meantime, you can use your best judgment and thorough proofreading to ensure your chat prompt will produce the desired results.

Step 4: Prepare Your Plugin for Submission

Once youā€™re satisfied with your pluginā€™s performance, youā€™ll need to create a JSON object that defines your plugin for submission. Hereā€™s a template:

{
  "id": "your-plugin-id",
  "name": "Your Plugin Name",
  "author": "Your Name",
  "description": "A brief description of what your plugin does",
  "image": "/plugins/logos/your-plugin-logo.jpg",
  "memories": false, 
  "chat": true,
  "capabilities": [
    "chat"
  ],
  // or ["memories"] or ["chat", "memories"]
  "chat_prompt": "Your chat prompt here",
  // for Chat Prompts
  "memory_prompt": "Your memory prompt here",
  // for Memory Prompts
  "deleted": false
}