aboutsummaryrefslogtreecommitdiff
path: root/apps/docs/integrations/openclaw.mdx
blob: 9f0101c0fb1a4dc4aeb3e1d25d2a6da4f35d49b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
---
title: "OpenClaw"
sidebarTitle: "OpenClaw"
description: "OpenClaw Supermemory Plugin — works across Telegram, WhatsApp, Discord, Slack, and more"
icon: "/images/openclaw-logo.jpg"
---

<Warning>
This integration requires the **Supermemory Pro plan**. [Upgrade here](https://console.supermemory.ai/billing).
</Warning>

[OpenClaw](https://github.com/supermemoryai/openclaw-supermemory) is a multi-platform AI messaging gateway that connects to WhatsApp, Telegram, Discord, Slack, iMessage, and other messaging channels. The Supermemory plugin gives OpenClaw memory across every channel.

## Get Your API Key

Create a Supermemory API key from the [API Keys](https://console.supermemory.ai/keys) page, then add it to your shell profile so it persists across sessions:

<Tabs>
  <Tab title="macOS / Linux (zsh)">
    ```bash
    echo 'export SUPERMEMORY_OPENCLAW_API_KEY="sm_..."' >> ~/.zshrc
    source ~/.zshrc
    ```
  </Tab>
  <Tab title="macOS / Linux (bash)">
    ```bash
    echo 'export SUPERMEMORY_OPENCLAW_API_KEY="sm_..."' >> ~/.bashrc
    source ~/.bashrc
    ```
  </Tab>
  <Tab title="Windows (PowerShell)">
    ```powershell
    [System.Environment]::SetEnvironmentVariable("SUPERMEMORY_OPENCLAW_API_KEY", "sm_...", "User")
    ```
    Restart your terminal after running this.
  </Tab>
</Tabs>

## Install the Plugin

```bash
openclaw plugins install @supermemory/openclaw-supermemory
```

Restart OpenClaw after installing.

## How It Works

Once installed, the plugin runs automatically with zero interaction:

- **Auto-Recall** — Before every AI turn, Supermemory is queried for relevant memories and the user's profile. These are injected as context so the AI sees preferences, facts, and semantically similar past conversations.
- **Auto-Capture** — After every AI turn, the conversation exchange is sent to Supermemory for extraction and long-term storage. Supermemory handles deduplication and profile building.

## Features

### AI Tools

The AI can use these tools autonomously during conversations:

| Tool | Description |
|------|-------------|
| `supermemory_store` | Save information to long-term memory. |
| `supermemory_search` | Search memories by query with similarity scores. |
| `supermemory_forget` | Delete a memory by query or ID. |
| `supermemory_profile` | View the user profile — persistent facts and recent context. |

### Slash Commands

Users can interact with memory directly in chat:

| Command | Description |
|---------|-------------|
| `/remember [text]` | Manually save something to memory. |
| `/recall [query]` | Search memories and see results with similarity scores. |

### CLI Commands

```bash
openclaw supermemory search <query>    # Search memories from the terminal
openclaw supermemory profile           # View user profile
openclaw supermemory wipe              # Delete all memories (requires confirmation)
```

## Manual Configuration

Optional — only needed if you prefer to set the API key directly in the config file instead of the environment variable.

Add the plugin to your `openclaw.json`:

```json5
{
  "plugins": {
    "entries": {
      "openclaw-supermemory": {
        "enabled": true,
        "config": {
          "apiKey": "sm_..."
        }
      }
    }
  }
}
```

### Advanced Options

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `autoRecall` | `boolean` | `true` | Inject relevant memories before every AI turn. |
| `autoCapture` | `boolean` | `true` | Store conversation content after every turn. |
| `maxRecallResults` | `number` | `10` | Max memories injected into context per turn. |
| `profileFrequency` | `number` | `50` | Inject full user profile every N turns. |
| `captureMode` | `string` | `"all"` | `"all"` filters noise. `"everything"` captures all messages. |
| `debug` | `boolean` | `false` | Verbose debug logs. |

## Next Steps

<CardGroup cols={2}>
  <Card title="GitHub Repository" icon="github" href="https://github.com/supermemoryai/openclaw-supermemory">
    Source code, issues, and detailed README.
  </Card>

  <Card title="Claude Memory Tool" icon="brain" href="/integrations/claude-memory">
    Use Claude's native memory tool with Supermemory as backend.
  </Card>
</CardGroup>