> ## Documentation Index
> Fetch the complete documentation index at: https://help.memoryplugin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate into Your Own Custom GPT

> Add MemoryPlugin memory to a Custom GPT you build yourself, using Actions and the OpenAPI spec

export const ArticleInfo = ({author, lastUpdated}) => {
  const authorAvatar = author === 'Alara' ? '/images/author-alara.jpg' : author === 'asad' ? '/images/author-alara.jpg' : null;
  const formatDate = dateInput => {
    if (!dateInput) return '';
    if (typeof dateInput === 'string' && !dateInput.match(/^\d{4}-\d{2}-\d{2}/)) {
      return dateInput;
    }
    try {
      const date = new Date(dateInput);
      const now = new Date();
      const diffTime = Math.abs(now - date);
      const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
      if (diffDays === 0) return 'today';
      if (diffDays === 1) return '1 day ago';
      if (diffDays < 7) return `${diffDays} days ago`;
      if (diffDays < 30) return `${Math.ceil(diffDays / 7)} week${Math.ceil(diffDays / 7) > 1 ? 's' : ''} ago`;
      if (diffDays < 365) return `${Math.ceil(diffDays / 30)} month${Math.ceil(diffDays / 30) > 1 ? 's' : ''} ago`;
      return `${Math.ceil(diffDays / 365)} year${Math.ceil(diffDays / 365) > 1 ? 's' : ''} ago`;
    } catch {
      return dateInput;
    }
  };
  return <div style={{
    display: "flex",
    alignItems: "center",
    gap: "8px",
    marginBottom: "16px",
    padding: "8px 12px",
    backgroundColor: "var(--ifm-color-emphasis-100)",
    borderRadius: "6px",
    fontSize: "14px",
    color: "var(--ifm-color-content-secondary)",
    border: "1px solid var(--ifm-color-emphasis-200)",
    opacity: "0.8"
  }}>
      <div style={{
    width: "40px",
    height: "40px",
    borderRadius: "50%",
    background: authorAvatar || "linear-gradient(45deg, #4F46E5, #7C3AED)",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    color: "white",
    fontWeight: "bold",
    fontSize: "18px"
  }}>
        {authorAvatar ? <img src={authorAvatar} alt={author} style={{
    width: "100%",
    height: "100%",
    borderRadius: "50%"
  }} /> : author?.[0]?.toUpperCase()}
      </div>
      <div>
        <div style={{
    fontWeight: "400",
    fontSize: "14px"
  }}>Written by <span style={{
    fontWeight: "600"
  }}>{author}</span></div>
        <div style={{
    fontSize: "14px"
  }}>Last updated <span style={{
    fontWeight: "600"
  }}>{formatDate(lastUpdated)}</span></div>
      </div>
    </div>;
};

<ArticleInfo author="Alara" lastUpdated="2026-07-04" />

This page is for builders: it shows how to wire MemoryPlugin into a Custom GPT you create yourself, so your GPT can store and recall long-term memory. If you just want to use MemoryPlugin in ChatGPT without building anything, use the [official MemoryPlugin Custom GPT](/integrations/custom-gpt) instead.

You add memory by importing MemoryPlugin's OpenAPI spec as a GPT Action and pasting in a short instruction block.

## Key concepts

<Tabs>
  <Tab title="Actions">
    Actions let a Custom GPT call external tools. You use one to connect your GPT to MemoryPlugin.
  </Tab>

  <Tab title="OpenAPI spec">
    A file that describes MemoryPlugin's API so the GPT builder can import every operation at once.
  </Tab>

  <Tab title="Auth token">
    Your credential for the MemoryPlugin API. Copy it from **Settings → Integrations** in the [dashboard](https://memoryplugin.com/dashboard).
  </Tab>

  <Tab title="Instructions">
    The prompt that tells your GPT how and when to use MemoryPlugin.
  </Tab>
</Tabs>

## Setup

<Steps>
  <Step title="Open the GPT builder">
    Open the edit window for your Custom GPT (or create a new one), go to the **Configure** tab, and scroll down to the **Actions** section.

    <img src="https://mintcdn.com/memoryplugin/0D7zqA9Ak-TR54pG/images/screenshots/custom-gpt/gpt-editor.png?fit=max&auto=format&n=0D7zqA9Ak-TR54pG&q=85&s=ac2b7b6070f55b60bb14f77492943f02" alt="Custom GPT editor showing the Configure tab" width="2360" height="1520" data-path="images/screenshots/custom-gpt/gpt-editor.png" />
  </Step>

  <Step title="Create the action">
    The **Actions** section sits near the bottom of the **Configure** tab.

    <img src="https://mintcdn.com/memoryplugin/0D7zqA9Ak-TR54pG/images/screenshots/custom-gpt/actions-section.png?fit=max&auto=format&n=0D7zqA9Ak-TR54pG&q=85&s=6b565f39c67163a70f07a757afa9ad5d" alt="Actions section in the Custom GPT editor" width="2360" height="1520" data-path="images/screenshots/custom-gpt/actions-section.png" />

    Click **Create new action**, then **Import from URL**, and enter this URL:

    ```
    https://www.memoryplugin.com/openapi.json
    ```

    <img src="https://mintcdn.com/memoryplugin/0D7zqA9Ak-TR54pG/images/screenshots/custom-gpt/create-action.png?fit=max&auto=format&n=0D7zqA9Ak-TR54pG&q=85&s=232c103ac8196ffebc3bd1a6bf1b7b63" alt="Create new action in the Custom GPT editor" width="2360" height="1520" data-path="images/screenshots/custom-gpt/create-action.png" />
  </Step>

  <Step title="Configure authentication">
    In the Authentication section, click the settings icon. Select **API Key**, then choose **Bearer**.

    Copy your auth token from **Settings → Integrations** in the [MemoryPlugin dashboard](https://memoryplugin.com/dashboard): under **Authentication Token**, click **Copy**, then paste it into the authentication setup.

    <img src="https://mintcdn.com/memoryplugin/9o9T_0PzzkacB3w3/images/screenshots/tools/settings-integrations.png?fit=max&auto=format&n=9o9T_0PzzkacB3w3&q=85&s=aeb720a7556b580ce5bffd336cfcec2d" alt="MemoryPlugin dashboard showing the Authentication Token" width="2400" height="1600" data-path="images/screenshots/tools/settings-integrations.png" />

    <img src="https://mintcdn.com/memoryplugin/0D7zqA9Ak-TR54pG/images/screenshots/custom-gpt/auth-setup.png?fit=max&auto=format&n=0D7zqA9Ak-TR54pG&q=85&s=c95d6b82a5d114acde6656495e78f2c9" alt="Authentication setup with API Key and Bearer" width="2200" height="1440" data-path="images/screenshots/custom-gpt/auth-setup.png" />

    <Warning>
      Your auth token is like a password to your account. Keep it confidential. If it ever leaks, click **Regenerate** on the same Settings → Integrations screen to invalidate the old one.
    </Warning>

    <Info>
      Account email independence: Your MemoryPlugin sign‑in email does not need to match the email you use on ChatGPT, Claude, TypingMind, or any other tool. Access and permissions are tied to your MemoryPlugin account (and API key when applicable), not third‑party logins.
    </Info>
  </Step>

  <Step title="Add instructions">
    Back in the **Configure** tab, find the Instructions section. Add the MemoryPlugin instructions after your existing custom instructions.

    <img src="https://mintcdn.com/memoryplugin/0D7zqA9Ak-TR54pG/images/screenshots/custom-gpt/instructions.png?fit=max&auto=format&n=0D7zqA9Ak-TR54pG&q=85&s=8946c5e84c60da886ebef98cec4ee74a" alt="Instructions section in the Custom GPT editor" width="2360" height="1520" data-path="images/screenshots/custom-gpt/instructions.png" />

    ```text theme={null}
    VERY IMPORTANT: ALWAYS fetch all memories at the start of each chat before responding (unless explicitly instructed otherwise), so you have context about me and can help me better. Use the `GetMemoriesAndBuckets` operation to do this.

    The `memory` tool allows you to persist information across conversations. Add to memory any information you want to remember. The information will appear in the context in future conversations.

    - Memories are stored in "buckets"
    - If you do not supply a bucket id when loading memories, all memories are loaded
    - if you do supply a bucket id, only those buckets memories are loaded
    - by default memories are added to the "General" bucket
    - new buckets cannot be named "General"
    - If you supply the bucketId when creating a new memory, it will be added to that bucket instead
    - Do not guess bucket IDs, they are random
    - When using bucket IDs, please make sure they are correct and are sent in the correct parameter.
    - When explicitly instructed to add a memory by the user, follow the users instructions strictly.

    I can use \m or +m as a shortcut to create a new memory.

    - before using any tool, review the tool use instructions thoroughly
    - Double-check the function schemas to make sure you are using the correct expected format.
    - Make sure your tool and/or function call matches the expected format and schema
    - if a JSON schema is specified, adhere to it strictly.
    - Verify all your tool calls with the usage instructions in the system prompt.
    ```
  </Step>

  <Step title="Save and test">
    Click **Save** to save the action, then start a new conversation. The GPT should load your memories at the start of the chat.
  </Step>
</Steps>

## What your GPT gains

Once integrated, your Custom GPT can:

* Load memories at the start of a conversation
* Remember information from earlier chats
* Organize memories into buckets
* Search memories to find what is relevant
* Persist knowledge across conversations
* Share memories with your other MemoryPlugin integrations

## Best practices

<CardGroup cols={2}>
  <Card title="Memory management" icon="brain">
    Tell your GPT which kinds of information to remember, based on what it is for.
  </Card>

  <Card title="Bucket strategy" icon="folder">
    Use separate buckets for the different contexts or topics your GPT handles.
  </Card>

  <Card title="User shortcuts" icon="keyboard">
    Let users know about the \m and +m shortcuts for quick memory creation.
  </Card>

  <Card title="Privacy" icon="shield">
    Be deliberate about what gets stored, and tell users what your GPT remembers.
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="OpenAPI import failed">
    Use the exact URL: `https://www.memoryplugin.com/openapi.json`.
  </Accordion>

  <Accordion title="Authentication errors">
    Recopy your auth token from Settings → Integrations. If it still fails, click Regenerate and update the action with the new token.
  </Accordion>

  <Accordion title="Memories not loading">
    Confirm your GPT instructions include the memory-loading prompt and are formatted as shown.
  </Accordion>

  <Accordion title="Function call errors">
    Make sure the instructions tell the GPT to follow the schema and format strictly.
  </Accordion>
</AccordionGroup>

## Example use cases

* **Personal assistant GPT**: remember preferences, schedule, and personal details.
* **Learning companion**: track progress and concepts studied over time.
* **Project manager**: remember project details, team info, and progress across chats.
* **Writing assistant**: remember style, characters, and plot points across sessions.
* **Customer service**: remember interactions, preferences, and history.

## Next steps

<CardGroup cols={2}>
  <Card title="Official MemoryPlugin Custom GPT" icon="robot" href="/integrations/custom-gpt">
    Use the ready-made GPT instead of building your own
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore the full MemoryPlugin API
  </Card>

  <Card title="Memory Buckets" icon="folder" href="/features/memory-buckets">
    Organize memories effectively
  </Card>
</CardGroup>
