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

# OpenClaw

> Memory plugin for OpenClaw: syncs AI context across OpenClaw, ChatGPT, Claude, Gemini, Manus, and more.

OpenClaw's memory is local. This plugin makes it universal.

Sync your AI context across OpenClaw, ChatGPT, Claude, Gemini, Manus, and many more, so you never re-explain yourself again.

## Features

* **Long-term memory**: Saves what is relevant for personalizing your OpenClaw and other AI app experiences as memories from your OpenClaw usage; in a private cloud-vault with encryption-at-rest and secure interfaces. Auto-consolidates and forgets stale information. Securely stores facts, preferences, episodes, goals, constraints, and more.
* **Short-term memory**: Determines short-term memory needs from OpenClaw usage such as conversation summaries, tasks, facts, preferences, procedures, and more. Auto-converts them to long-term memory periodically.
* **Data privacy & security**: You own all your data and only you can read your information. All LLM calls are made in secure mode. You have granular control to forget or delete what you need to.
* **Cross-platform sync**: Save context from ChatGPT, Claude, Gemini, Manus, Perplexity, and other flows into your cloud-vault and use in OpenClaw automatically.
* **Cross-channel memory**: Memories persist across Telegram, Slack, WhatsApp, Discord, and all supported channels.
* **Auto-recall**: Automatically injects relevant memories before each LLM turn.
* **Auto-capture**: Automatically stores conversation context after each turn.
* **Slash commands**: `/remember` and `/recall` for direct memory interaction.
* **Agent tools**: `maximem_store`, `maximem_search`, `maximem_forget` for agent-driven memory operations.
* **CLI commands**: Terminal-based memory management with `openclaw maximem`.

## API key

You'll need a Maximem API key to use this plugin.

1. Sign up or log in at [app.maximem.ai](https://app.maximem.ai).
2. Navigate to **Settings → API Keys**.
3. Click **Generate New Key**.
4. Copy your key (starts with `mx_...`).

<Warning>
  Keep this key secure. It grants access to your memory vault.
</Warning>

## Installation

```bash theme={null}
openclaw plugins install @maximem/memory-plugin
```

That's it. The plugin is now installed.

### Verify installation

```bash theme={null}
openclaw plugins list
```

You should see `memory-plugin` in the list with status `enabled`.

<Accordion title="Run diagnostics">
  If something isn't working:

  ```bash theme={null}
  openclaw plugins info memory-plugin
  openclaw plugins doctor
  ```
</Accordion>

## Configuration

### Option 1: Environment variable (recommended)

Set your API key as an environment variable. This keeps it out of config files.

<Tabs>
  <Tab title="macOS / Linux (zsh)">
    ```bash theme={null}
    echo 'export MAXIMEM_API_KEY="mx_..."' >> ~/.zshrc
    source ~/.zshrc
    ```
  </Tab>

  <Tab title="macOS / Linux (bash)">
    ```bash theme={null}
    echo 'export MAXIMEM_API_KEY="mx_..."' >> ~/.bashrc
    source ~/.bashrc
    ```
  </Tab>

  <Tab title="Windows PowerShell">
    ```powershell theme={null}
    [System.Environment]::SetEnvironmentVariable("MAXIMEM_API_KEY", "mx_...", "User")
    ```
  </Tab>
</Tabs>

Then restart your terminal.

### Option 2: Config file

Edit `~/.openclaw/openclaw.json`:

```json theme={null}
{
  "plugins": {
    "entries": {
      "memory-plugin": {
        "enabled": true,
        "config": {
          "apiKey": "mx_...",
          "autoRecall": true,
          "autoCapture": true,
          "maxRecallTokens": 1000,
          "minPromptLength": 5,
          "captureDebounceMs": 2000
        }
      }
    }
  },
  "agents": {
    "list": [{
      "id": "main",
      "tools": {
        "allow": ["maximem_store", "maximem_search", "maximem_forget"]
      }
    }]
  }
}
```

### Configuration options

| Option              | Type    | Default | Description                                                                                         |
| ------------------- | ------- | ------- | --------------------------------------------------------------------------------------------------- |
| `apiKey`            | string  | none    | Your Maximem API key. **Required** (or set `MAXIMEM_API_KEY` env var).                              |
| `autoRecall`        | boolean | `true`  | Automatically inject relevant memories before each turn. *Recommended: keep enabled.*               |
| `autoCapture`       | boolean | `true`  | Automatically capture conversation context after each turn. *Recommended: keep enabled.*            |
| `maxRecallTokens`   | number  | `1000`  | Maximum tokens for recalled memory context (100 to 10000). *Higher = more context, more API usage.* |
| `minPromptLength`   | number  | `5`     | Minimum prompt length to trigger recall. *Prevents recall on very short messages like "hi".*        |
| `captureDebounceMs` | number  | `2000`  | Debounce window for batching captures (milliseconds). *Lower = faster capture, more API calls.*     |

## Usage

### Quick start

Once installed and configured, the plugin works automatically:

1. **You chat** with OpenClaw on any channel (WhatsApp, Slack, Telegram, etc.).
2. **Vity recalls** relevant context from your AI history, including past ChatGPT, Claude, and Perplexity conversations.
3. **OpenClaw responds** with full awareness of your cross-platform context.
4. **Vity captures** new information for future sessions.

No manual action needed. It just works.

Use the commands below when you want direct control.

### Slash commands

Use these commands directly in any supported chat channel.

#### `/remember [text]`

Manually save information to long-term memory.

```
/remember My favorite programming language is TypeScript
/remember I prefer dark themes for all applications
/remember Project deadline is March 15, 2026
```

**Response:**

```
✓ Saved to memory: "My favorite programming language is TypeScript"
```

#### `/recall [query]`

Search your long-term memory.

```
/recall favorite programming language
/recall project deadline
/recall preferences
```

**Response:**

```
Found 2 relevant memories:

1. "My favorite programming language is TypeScript" (saved 2 days ago)
2. "I prefer dark themes for all applications" (saved 1 week ago)
```

### CLI commands

Manage memories from your terminal.

#### Search memories

```bash theme={null}
openclaw maximem search "favorite color"
openclaw maximem search "deadlines" --limit 20
openclaw maximem search "preferences" --json
```

**Options:**

* `-l, --limit <n>`: Maximum results (default: 10)
* `--json`: Output as JSON for scripting

### Agent tools

Enable these tools in your agent configuration to let OpenClaw manage memory autonomously:

```json theme={null}
{
  "agents": {
    "list": [{
      "id": "main",
      "tools": {
        "allow": ["maximem_store", "maximem_search", "maximem_forget"]
      }
    }]
  }
}
```

With these enabled, your agent can:

| Tool             | What it does                                                       |
| ---------------- | ------------------------------------------------------------------ |
| `maximem_store`  | Save important facts when you share information.                   |
| `maximem_search` | Recall memories when answering questions about past conversations. |
| `maximem_forget` | Remove specific memories when you ask it to.                       |

**Example interaction:**

```
You: "Forget that I said I like Python. I've switched to Rust."

Agent: Done. I've removed the memory about Python and noted your preference for Rust.
```

## Troubleshooting

### "API key not found" error

Ensure your API key is set correctly:

```bash theme={null}
echo $MAXIMEM_API_KEY
```

This should output your key (starting with `mx_...`). If it's empty:

1. Re-run the export command from the [Configuration](#configuration) section.
2. Restart your terminal.
3. Try again.

### Memories not being recalled

1. **Check config**: ensure `autoRecall` is `true`.
2. **Check prompt length**: messages shorter than `minPromptLength` (default: 5 characters) won't trigger recall.
3. **Verify plugin status:**

   ```bash theme={null}
   openclaw plugins list
   ```

   Confirm `memory-plugin` shows as `enabled`.

### Plugin not loading

Run diagnostics:

```bash theme={null}
openclaw plugins doctor
```

This checks for common configuration issues and missing dependencies.

### Context not syncing from other platforms

Make sure you have:

1. The Maximem Vity Chrome extension installed for web-based LLMs.
2. Logged into the same Maximem account in both the extension and this plugin.
3. Enabled sync for the platforms you want (ChatGPT, Claude, etc.) in your Vity settings.

## Coming soon

* `openclaw maximem stats`: view memory statistics and usage.
* `openclaw maximem wipe`: bulk delete memories with filters.
* Category-based filtering in search.

## Support

* **Plugin site**: [memoryplugin-for-openclaw.com](https://memoryplugin-for-openclaw.com)
* **Issues & bugs**: [GitHub Issues](https://github.com/gauravmaximem/moltbot-memory-plugin-maximem/issues)
* **Email**: [support@maximem.ai](mailto:support@maximem.ai)
* **Twitter / X**: [@MaximemAI](https://twitter.com/maximem_ai)
