Skip to content

About

OpenClaw Supermemory lets to have long-term memory and recall for your openclaw agent.

Topics

Resources

Stars

798 stars

Watchers

1 watching

Forks

Repository files navigation

OpenClaw Supermemory Plugin

Untitled_Artwork 3

Long-term memory for OpenClaw. Automatically remembers conversations, recalls relevant context, and builds a persistent user profile — all powered by Supermemory cloud. No local infrastructure required.

Requires Supermemory Pro or above - Unlock the state of the art memory for your OpenClaw bot.

Install

openclaw plugins install @supermemory/openclaw-supermemory

Setup

openclaw supermemory login
openclaw gateway restart

login opens your browser to sign in to Supermemory with OAuth, enables the plugin in ~/.openclaw/openclaw.json, and saves credentials to ~/.supermemory-openclaw/credentials.json (readable only by you). Access tokens refresh automatically; if the sign-in is revoked or expires, run login again.

The same commands also run without OpenClaw on your PATH:

npx -y @supermemory/openclaw-supermemory login
npx -y @supermemory/openclaw-supermemory status
npx -y @supermemory/openclaw-supermemory logout

Servers and headless machines

When no browser can be opened (SSH sessions, no display), login prints the sign-in link instead. Open it on any computer. After consent the browser is sent to http://127.0.0.1:19883/callback on the OpenClaw machine, so either:

  • forward the port before opening the link: ssh -L 19883:127.0.0.1:19883 your-server, or
  • when the page fails to load, copy the full address from the browser's address bar and paste it into the waiting login prompt.

login --print-url never opens a browser and prints the link as a single SUPERMEMORY_AUTHORIZE_URL=<url> line on stdout, for scripts and the Supermemory CLI.

Use an API key instead

openclaw supermemory setup
openclaw gateway restart

Enter your API key from app.supermemory.ai, or set SUPERMEMORY_OPENCLAW_API_KEY. An API key in the config or environment always takes precedence over the OAuth sign-in, and self-hosted / custom baseUrl instances need one.

Advanced Setup

openclaw supermemory setup-advanced
openclaw gateway restart

Configure all options interactively: container tag, auto-recall, auto-capture, capture mode, custom container tags, and more.

How it works

Once installed, the plugin works automatically:

  • Auto-Recall — Before every AI turn, queries Supermemory for relevant memories and injects them as context. The AI sees your user profile and semantically similar past conversations.
  • Auto-Capture — After every AI turn, the conversation is sent to Supermemory for extraction and long-term storage.
  • Custom Container Tags — Define custom memory containers (e.g., work, personal, bookmarks). The AI automatically picks the right container based on your instructions when using memory tools.

Everything runs in the cloud. Supermemory handles extraction, deduplication, and profile building.

Slash Commands

Command Description
/remember <text> Manually save something to memory. Stores the given text immediately.
/recall <query> Search memories with similarity scores.
/supermemory-index Index the current project into memory. Agent skill: explores the codebase, then saves focused memories (unlike /remember).

AI Tools

The AI uses these tools autonomously. With custom container tags enabled, all tools support a containerTag parameter for routing to specific containers.

Tool Description
supermemory-save Save information to memory.
supermemory-search Search memories by query.
supermemory-forget Delete a memory by query or ID.
supermemory-profile View user profile (persistent facts + recent context).

The hyphenated names above are the standard across all Supermemory plugins. The older supermemory_store, supermemory_search, supermemory_forget and supermemory_profile names still work and resolve to the same tools, but they are deprecated and will be removed in 3.0. Update any tool allowlists to the hyphenated names.

CLI Commands

openclaw supermemory login              # Sign in with OAuth (--print-url for headless)
openclaw supermemory logout             # Revoke and remove the OAuth sign-in
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)

Configuration

Without OAuth, set the API key (and, for self-hosted instances, the base URL) via environment variables:

export SUPERMEMORY_OPENCLAW_API_KEY="sm_..."
export SUPERMEMORY_BASE_URL="http://localhost:8000"   # optional; defaults to https://api.supermemory.ai

Or configure in ~/.openclaw/openclaw.json:

Options

Key Type Default Description
apiKey string — Supermemory API key. Optional after login; takes precedence over OAuth when set.
baseUrl string https://api.supermemory.ai API endpoint. Set to a self-hosted / local URL to point at your own instance; leave blank for the cloud.
apiVersion "v5" | "legacy" Auto-selected Protocol override. The hosted root URL uses v5; custom endpoints default to legacy.
containerTag string openclaw_{hostname} Root memory namespace.
autoRecall boolean true Inject relevant memories before every AI turn.
autoCapture boolean true Store conversations after every turn.
maxRecallResults number 10 Max memories injected per turn.
profileFrequency number 50 Inject full profile every N turns.
captureMode string "all" "all" filters short texts, "everything" captures all.
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

{
  "plugins": {
    "slots": {
      "memory": "openclaw-supermemory"
    },
    "entries": {
      "openclaw-supermemory": {
        "enabled": true,
        "hooks": {
          "allowPromptInjection": true,
          "allowConversationAccess": true
        },
        "config": {
          "apiKey": "${SUPERMEMORY_OPENCLAW_API_KEY}",
          "baseUrl": "https://api.supermemory.ai",
          "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'"
        }
      }
    }
  }
}

About

OpenClaw Supermemory lets to have long-term memory and recall for your openclaw agent.

Topics

Resources

Stars

798 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages