npm package: @memorystack/openclaw-memorystack
Description: OpenClaw MemoryStack memory plugin - long-term memory for your AI assistant
Author: MemoryStack
Latest version: 1.0.1

# MemoryStack Plugin for OpenClaw

Long-term memory for OpenClaw (formerly Clawdbot). Automatically remembers conversations, recalls relevant context, and builds a persistent memory layer — all powered by [MemoryStack](https://memorystack.app) cloud.

## Install

```bash
openclaw plugins install @memorystack/clawdbot-memorystack
```

Restart OpenClaw after installing.

## Configuration

The only required value is your MemoryStack API key. Get one at [memorystack.app/dashboard/api-keys](https://memorystack.app/dashboard/api-keys).

Set it as an environment variable:

```bash
export MEMORYSTACK_API_KEY="ms_proj_..."
```

Or configure it directly in `openclaw.json` (or `moltbot.json`):

```json
{
  "plugins": {
    "entries": {
      "clawdbot-memorystack": {
        "enabled": true,
        "config": {
          "apiKey": "${MEMORYSTACK_API_KEY}",
          "autoRecall": true,
          "autoCapture": true
        }
      }
    }
  }
}
```

### Advanced options

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `apiKey` | `string` | - | Your MemoryStack API key (required) |
| `baseUrl` | `string` | `https://memorystack.app` | API endpoint URL |
| `autoRecall` | `boolean` | `true` | Inject relevant memories before every AI turn |
| `autoCapture` | `boolean` | `true` | Automatically store conversation content after every turn |
| `maxRecallResults` | `number` | `5` | Max memories injected into context per turn (1-20) |
| `debug` | `boolean` | `false` | Verbose debug logs for API calls and responses |

## Slash Commands

Use these commands directly in chat:

| Command | Description |
|---|---|
| `/add <text>` | Save something to long-term memory |
| `/search <query>` | Search your memories |
| `/stats` | View memory usage statistics |

## CLI Commands

Manage memories from the terminal:

```bash
openclaw memorystack search "project alpha"
openclaw memorystack stats
openclaw memorystack add "The server IP is 10.0.0.5"
openclaw memorystack deleteall   # Destructive!
```

## How it works

Once installed, the plugin works automatically with zero interaction:

- **Auto-Recall** — Before every AI turn, the plugin queries MemoryStack for relevant memories and injects them as context using semantic search.
- **Auto-Capture** — After every AI turn, the last user/assistant exchange is sent to MemoryStack for extraction and long-term storage.

Everything runs in the cloud. MemoryStack handles importance scoring, contradiction detection, consolidation, and reflection on its end.

## Features

- **Hybrid Search** - Vector similarity + text search with RRF ranking
- **Importance Scoring** - Automatic ranking of what matters
- **Contradiction Detection** - Resolves conflicts and updates beliefs
- **Memory Consolidation** - Deduplication and merging (runs server-side)
- **Temporal Decay** - Simulates natural forgetting
- **Reflection** - Discovers patterns and generates insights

## Links

- 🌐 **Website**: https://memorystack.app
- 📚 **Documentation**: https://memorystack.app/docs
- 🚀 **Quick Start**: https://memorystack.app/docs/quickstart
- 🔑 **Get API Key**: https://memorystack.app/dashboard/api-keys
- 💰 **Pricing**: https://memorystack.app/pricing

## License

MIT