Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 84 additions & 59 deletions apps/docs/integrations/openclaw.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,51 +11,53 @@ This integration requires the **Supermemory Pro plan**. [Upgrade here](https://c

[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

Get started by installing the plugin with a single command.

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

Restart OpenClaw after installing.

## Setup

Run the setup command and enter your API key when prompted.

```bash
openclaw supermemory setup
```

Enter your API key from [console.supermemory.ai](https://console.supermemory.ai). That's it.

<AccordionGroup>
<Accordion title="Advanced Setup">
Configure all options interactively with the advanced setup command:

```bash
openclaw supermemory setup-advanced
```

This lets you configure: container tag, auto-recall, auto-capture, capture mode, custom container tags, and more.

See [Configuration Options](#configuration-options) for all available settings.
</Accordion>
</AccordionGroup>

## How It Works

Once installed, the plugin runs automatically with zero interaction:
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.
- **Custom Container Tags** — When enabled via advanced setup, define custom memory containers (e.g., `work`, `personal`, `bookmarks`). The AI automatically picks the right container based on your instructions.

## Features

### AI Tools

The AI can use these tools autonomously during conversations:
The AI can use these tools autonomously during conversations.

| Tool | Description |
|------|-------------|
Expand All @@ -66,7 +68,7 @@ The AI can use these tools autonomously during conversations:

### Slash Commands

Users can interact with memory directly in chat:
Users can interact with memory directly in chat.

| Command | Description |
|---------|-------------|
Expand All @@ -75,43 +77,66 @@ Users can interact with memory directly in chat:

### CLI Commands

Manage your memory from the terminal.

```bash
openclaw supermemory search <query> # Search memories from the terminal
openclaw supermemory profile # View user profile
openclaw supermemory wipe # Delete all memories (requires confirmation)
openclaw supermemory setup # Configure API key
openclaw supermemory setup-advanced # Configure all options
openclaw supermemory status # View current configuration
openclaw supermemory search <query> # Search memories
openclaw supermemory profile # View user profile
openclaw supermemory wipe # Delete all memories (requires confirmation)
```
Comment on lines +83 to 89
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation introduces new CLI setup commands (e.g., openclaw supermemory setup) that may not exist in the external OpenClaw plugin, blocking user setup.
Severity: HIGH

Suggested Fix

Verify that the openclaw supermemory setup, setup-advanced, and status commands are implemented and functional in the OpenClaw v2 plugin. If they are not, either remove them from the documentation or revert to the previous setup instructions that used environment variables until the CLI is ready.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: apps/docs/integrations/openclaw.mdx#L83-L89

Potential issue: The documentation for the OpenClaw integration was updated to use new
CLI commands like `openclaw supermemory setup` as the primary setup method. These
commands are not part of the main Supermemory codebase and are presumed to exist in the
separate OpenClaw v2 plugin repository. If these commands are not implemented in the
plugin as documented, users will encounter 'command not found' errors and will be unable
to configure the integration, as this is presented as the main setup path.

Did we get this right? 👍 / 👎 to inform future reviews.


## 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_..."
<AccordionGroup>
<Accordion title="Manual Configuration">
### Configuration Options

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `apiKey` | `string` | — | Supermemory API key. |
| `containerTag` | `string` | `openclaw_{hostname}` | Root memory namespace. |
| `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. |
| `enableCustomContainerTags` | `boolean` | `false` | Enable custom container routing. |
| `customContainers` | `array` | `[]` | Custom containers with `tag` and `description`. |
| `customContainerInstructions` | `string` | `""` | Instructions for AI on container routing. |

### Full Example

```json
{
"plugins": {
"entries": {
"openclaw-supermemory": {
"enabled": true,
"config": {
"apiKey": "${SUPERMEMORY_OPENCLAW_API_KEY}",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation suggests using ${VAR} syntax for an API key inside a JSON configuration. Standard JSON does not support this, which will likely cause authentication failures.
Severity: HIGH

Suggested Fix

Remove the ${VAR} syntax from the JSON example. Instead, instruct users to set the environment variable in their shell profile and then use a placeholder in the JSON, like "apiKey": "YOUR_API_KEY_HERE", with a comment explaining that the plugin will read the SUPERMEMORY_OPENCLAW_API_KEY environment variable if the key is not hardcoded.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: apps/docs/integrations/openclaw.mdx#L118

Potential issue: The manual configuration section in the OpenClaw integration
documentation provides a JSON snippet where the API key is set using
`${SUPERMEMORY_OPENCLAW_API_KEY}`. Standard JSON does not support environment variable
interpolation with this syntax. When the configuration is parsed, the `apiKey` field
will contain the literal string `"${SUPERMEMORY_OPENCLAW_API_KEY}"` instead of the key's
value. This will cause API authentication to fail, rendering the integration
non-functional for users who follow the manual setup.

Did we get this right? 👍 / 👎 to inform future reviews.

"containerTag": "my_memory",
"autoRecall": true,
"autoCapture": true,
"maxRecallResults": 10,
"profileFrequency": 50,
"captureMode": "all",
"debug": false,
"enableCustomContainerTags": true,
"customContainers": [
{ "tag": "work", "description": "Work-related memories" },
{ "tag": "personal", "description": "Personal notes" }
],
"customContainerInstructions": "Store work tasks in 'work', personal stuff in 'personal'"
}
}
}
}
}
}
}
```

### 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. |
```
</Accordion>
</AccordionGroup>

## Next Steps

Expand Down
Loading