> ## 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.

# How MemoryPlugin Works

> The memory model, how memories are stored and recalled, and how tokens are spent

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" />

Every new chat starts from zero. The model that felt like it knew you yesterday opens today with a blank slate, and you're back to re-explaining yourself. This page is about why that happens, and what MemoryPlugin does about it.

## Why AI forgets

Modern AI models have no persistent memory. A model seems to remember earlier turns only because the whole conversation is fed back into its context window with every message. The context window is the text the model can read at once. Think of it as a desk with limited space: new messages come in, older ones get pushed off the edge. The model isn't forgetting in a human sense, it just can't see what's no longer on the desk. Start a new chat and the desk is wiped clean.

MemoryPlugin closes that gap. It keeps your memories, chat history, and files outside the model, and pages the relevant pieces into the context window when they're needed.

<Frame caption="The context window is small and wiped between chats. Your memory store persists, and only the relevant pieces get paged in.">
  <img className="block dark:hidden" src="https://mintcdn.com/memoryplugin/0D7zqA9Ak-TR54pG/images/diagrams/context-vs-memory-light.svg?fit=max&auto=format&n=0D7zqA9Ak-TR54pG&q=85&s=d65934d8e3f0d440b614c644e79adc3b" alt="Diagram: a small volatile context window above a wide persistent memory store, with only relevant pieces paged up" width="720" height="256" data-path="images/diagrams/context-vs-memory-light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/memoryplugin/0D7zqA9Ak-TR54pG/images/diagrams/context-vs-memory-dark.svg?fit=max&auto=format&n=0D7zqA9Ak-TR54pG&q=85&s=e31cb38fcc9ea73bdf5713b4f0e52b30" alt="Diagram: a small volatile context window above a wide persistent memory store, with only relevant pieces paged up" width="720" height="256" data-path="images/diagrams/context-vs-memory-dark.svg" />
</Frame>

## Storing memories

MemoryPlugin captures information two ways: **you ask for it** ("remember that I use TypeScript and Tailwind"), or **the AI recognizes it** and saves a detail worth keeping without you asking.

How the save happens depends on the integration:

<Tabs>
  <Tab title="Browser Extension">
    On plain web chat surfaces (ChatGPT, Claude, Gemini, and others), no memory tool is wired into the page. So the extension pastes a short instruction asking the AI to emit a marker line, for example `to=memoryplugin&&memory=User prefers morning meetings`. It watches the response, spots that line, and sends the memory to MemoryPlugin's servers.

    Done well this is invisible. The tradeoff: it rides inside the conversation rather than a clean tool call, so it depends on the AI following the instruction.
  </Tab>

  <Tab title="Custom GPT">
    ChatGPT Custom GPTs use OpenAI Actions, so memories are stored through a real function call rather than a marker in the text.
  </Tab>

  <Tab title="MCP Server">
    MCP clients call the `store_memory` tool directly. No markers, no pasted instructions.
  </Tab>

  <Tab title="TypingMind Plugin">
    TypingMind stores memories through the plugin's tool calls.
  </Tab>
</Tabs>

Where a real memory tool exists, MemoryPlugin uses it. The marker approach is the fallback for web-chat surfaces that don't expose one.

<Note>
  Only the memory text itself is sent to MemoryPlugin's servers, never your full conversation. This holds for every integration.
</Note>

## Bringing memories back

When you start a new conversation, MemoryPlugin makes your stored memories available to the AI:

* **Browser Extension**: pressing the MemoryPlugin button injects your memories into the message before it's sent. You can also turn on automatic injection, which adds them to a new chat's first message after a five-second countdown you can cancel.
* **Custom GPT, MCP Server, TypingMind Plugin**: the AI loads memories through a tool call, at the start of a chat or when you ask it to.

## Chat history

Hold the two layers in your head this way: your memories are **the notebook**, short curated notes your AI keeps with it in every conversation. Chat History is **the archive**, the complete record of your past conversations, recalled when it's relevant. The notebook is small and always present; the archive is large and consulted on demand.

Chat History works in three steps:

* **Import** brings in an export file from a platform (ChatGPT, Claude, TypingMind, and a few others) to backfill everything you already have.
* **Sync** captures new conversations automatically as you have them. Sync is browser-extension only and currently covers ChatGPT, Claude, Gemini, Grok, DeepSeek, and TypingMind.
* **Recall** is how your AI uses that archive. It decides when your past chats are relevant, writes its own search query, and pulls back a concise, relevant slice. It does not load your entire history into context.

See [Chat History](/features/chat-history/introduction) for the full walkthrough.

## What this costs in tokens

Every memory or piece of history that lands in the context window is text the model has to read, and text costs tokens. A handful of memories is nothing. A few hundred, injected into every message, adds up and can crowd the window.

Two things keep this in check:

* **[Smart Memory](/features/smart-memory)** groups your memories into categories. Instead of loading everything every time, your AI loads only the category relevant to the current question. On large memory sets this cuts the tokens spent on memory by around 90% while keeping answers relevant.
* **Chat History recall is bounded.** A recall pulls a small, targeted amount of context (roughly 600 tokens by default, capped well below what a full history would cost), not the whole archive.

## One memory. Every AI.

<Frame caption="One memory store, reachable from every tool you use.">
  <img className="block dark:hidden" src="https://mintcdn.com/memoryplugin/0D7zqA9Ak-TR54pG/images/diagrams/cross-tool-mcp-light.svg?fit=max&auto=format&n=0D7zqA9Ak-TR54pG&q=85&s=3c9eb2229dd7bd800afee7ad406f9f71" alt="Hub and spoke diagram: your memory in the center, connected to ChatGPT, Claude, Gemini, and Cursor" width="720" height="290" data-path="images/diagrams/cross-tool-mcp-light.svg" />

  <img className="hidden dark:block" src="https://mintcdn.com/memoryplugin/0D7zqA9Ak-TR54pG/images/diagrams/cross-tool-mcp-dark.svg?fit=max&auto=format&n=0D7zqA9Ak-TR54pG&q=85&s=3f28b3bbf4e2e1691f017c784a587e03" alt="Hub and spoke diagram: your memory in the center, connected to ChatGPT, Claude, Gemini, and Cursor" width="720" height="290" data-path="images/diagrams/cross-tool-mcp-dark.svg" />
</Frame>

<video controls playsInline className="w-full aspect-video rounded-xl" src="https://mintcdn.com/memoryplugin/9o9T_0PzzkacB3w3/videos/recall-in-action.mp4?fit=max&auto=format&n=9o9T_0PzzkacB3w3&q=85&s=938bda8739b3e927a20ff4b59df63b58" data-path="videos/recall-in-action.mp4" />

Your memories, chat history, and files live in one place and travel with you. Add to your memory in any tool, and every other tool has it from your next conversation there. You're not locked into one AI's memory system. See [Supported Platforms](/platforms/supported-platforms) for the full list of where MemoryPlugin works and what each platform can do.

## Next steps

<CardGroup cols={2}>
  <Card title="Choose an Integration" icon="puzzle-piece" href="/integrations/overview">
    Pick the method that fits your workflow
  </Card>

  <Card title="Explore Features" icon="star" href="/features/memory-buckets">
    Memory buckets, Smart Memory, Ask, and more
  </Card>
</CardGroup>
