← Back to Plugins
Voice

Mempalace Memory

ggettert By ggettert 👁 13 views ▲ 0 votes

OpenClaw memory-slot plugin backed by MemPalace: automatic recall and conversation capture over HTTPS MCP, with owner/audience-aware privacy rules.

GitHub

Install

openclaw plugins install @ggettert/openclaw-mempalace-memory@alpha

README

# openclaw-mempalace-memory

[![npm version](https://img.shields.io/npm/v/@ggettert/openclaw-mempalace-memory.svg)](https://www.npmjs.com/package/@ggettert/openclaw-mempalace-memory)
[![CI](https://github.com/ggettert/openclaw-mempalace-memory/actions/workflows/ci.yml/badge.svg)](https://github.com/ggettert/openclaw-mempalace-memory/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

Long-term memory for [OpenClaw](https://github.com/openclaw/openclaw) agents, kept in your
[MemPalace](https://github.com/MemPalace/mempalace). Before each message, the plugin adds the most
relevant memories to the agent's prompt. After each reply, it saves the exchange in your palace.

It connects to MemPalace over HTTP (MCP at a `…/mcp` URL).

Package: `@ggettert/openclaw-mempalace-memory` · Plugin id: `mempalace-memory`

> **Status: 2.0 prerelease (`2.0.0-alpha.x`).** Config keys may still change before 2.0.0. See the
> [CHANGELOG](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/CHANGELOG.md).
>
> - **Verified live** on OpenClaw 2026.11.5 with embedded agents: recall, capture,
>   `/mempalace_status`, and delegated-turn pairing (beta) with `trustSettleAudience`.
> - **Verified** against the official MemPalace 3.12.0 `mempalace serve`: local with no token, and
>   with a Bearer token.
> - **Verified live** on OpenClaw 2026.11.12 with a Claude CLI agent: auto-recall, auto-capture,
>   `memory_recall` and `memory_store` (including `agentRooms` notes rooms).
> - **Published** to npm (from 2.0.0-alpha.6) and ClawHub (from 2.0.0-alpha.6).
> - **Not yet verified:** shared-conversation rules, and delegated-turn pairing on Claude CLI agents.
> - **Needs** OpenClaw 2026.11.5 or newer, and MemPalace 3.11 or newer (3.9 works but is
>   [slow](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/troubleshooting.md#slow-or-partial-results)).
>   Node.js is whatever your OpenClaw runs on.

## Quick start

### 1. Run a MemPalace server

Pick one.

**a) Local: MemPalace on the same machine as OpenClaw.**

```bash
mempalace serve        # listens on 127.0.0.1:8765, no token
```

- The plugin's url is `http://127.0.0.1:8765/mcp`. A loopback server needs no token, so leave out
  `apiKey`.
- Use `127.0.0.1` or `localhost`. `mempalace serve --host ::1` doesn't start on MemPalace 3.12.0.
- Run one hub per palace. One hub owns a shared palace; don't launch a second server that writes to
  it. If OpenClaw also has MemPalace's own MCP server registered (for the official skill), point it
  at the same hub:

  ```bash
  openclaw mcp set mempalace '{"url":"http://127.0.0.1:8765/mcp","transport":"streamable-http"}'
  ```

- Setups that run MemPalace only over stdio aren't supported yet
  ([#26](https://github.com/ggettert/openclaw-mempalace-memory/issues/26)).

More in the FAQ:
[run MemPalace locally](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/faq.md#how-do-i-run-mempalace-locally).

**b) Remote or team: MemPalace on another machine.**

- Run `mempalace serve` with a token, over `https`: its own TLS (`--tls-cert`, `--tls-key`) or
  behind a TLS proxy. See MemPalace's
  [remote server guide](https://mempalaceofficial.com/guide/remote-server.html) and
  [CLI reference](https://mempalaceofficial.com/reference/cli.html).
- The plugin sends the token as `Authorization: Bearer <token>` (`authScheme: "bearer"`, the
  default). If your server expects `X-Api-Key`, set `authScheme: "x-api-key"`.
- Store the token as a secret, not in `openclaw.json`. With OpenClaw's secret store:

  ```bash
  # Paste the token, then Ctrl-D. A protected secret can't be read back once saved.
  openclaw secrets store set MEMPALACE_API_KEY --kind secret --value-file -
  ```

  Any SecretRef source works (`env`, `file`, `exec`, `store`). See OpenClaw's
  [secrets docs](https://docs.openclaw.ai/gateway/secrets).

### 2. Install the plugin

```bash
# From ClawHub (OpenClaw's default source)
openclaw plugins install @ggettert/openclaw-mempalace-memory@alpha

# Or from npm
openclaw plugins install npm:@ggettert/openclaw-mempalace-memory@alpha
```

- While only prereleases exist, pass `@alpha` or an exact version (`@2.0.0-alpha.6`). OpenClaw
  won't install a prerelease without one.
- An `npm:` install asks you to confirm, because npm isn't a trusted source by default. In scripts,
  review the package and pass `--force`.
- OpenClaw warns that it can't verify where the plugin came from. That's normal for third-party
  plugins; see the
  [FAQ](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/faq.md#why-does-openclaw-warn-that-it-cant-verify-where-the-plugin-came-from).

### 3. Turn it on

In `~/.openclaw/openclaw.json` (JSON5):

```json5
{
  plugins: {
    // If you use a plugins.allow list, add "mempalace-memory" to it.
    slots: { memory: "mempalace-memory" },
    entries: {
      "mempalace-memory": {
        enabled: true,
        // Required: lets the plugin read the turn. Sits next to config, not inside it.
        hooks: { allowConversationAccess: true },
        config: {
          // a) Local:
          url: "http://127.0.0.1:8765/mcp",

          // b) Remote, instead:
          // url: "https://palace.example.com/mcp",
          // apiKey: { source: "store", provider: "default", id: "MEMPALACE_API_KEY" },
        },
      },
    },
  },
}
```

- The change applies on save. Restart the Gateway only if you turned config reload off.
- If your tool policy uses a strict profile or allow list, allow `memory_recall` and
  `memory_store` (for example with `tools.alsoAllow`). Auto-recall runs only when the turn's tool
  policy allows `memory_recall`.

Every option is in the
[configuration reference](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/configuration.md).

### 4. Check it works

Send your agent a message in a private chat, then send `/mempalace_status` there. You should see
`last connect ok` and counters for the agent:

```text
mempalace-memory 2.0.0-alpha.6 (auto-recall on, auto-capture on)
palace: last connect ok at 2026-11-23T18:00:01.112Z; last ok 2026-11-23T18:20:44.090Z; last error none
agent main: memory enabled
  recall: 1 injected, 0 no hits, last 2026-11-23T18:20:43.871Z; skipped: none
  ...
```

- The Gateway log shows `mempalace-memory: registered` and `mempalace-memory: connected`.
- `disabled until configured (…)` means the config is missing or wrong; the text in brackets says
  what.
- `last error auth` means the server refused the key. See
  [fix a 401](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/faq.md#how-do-i-fix-a-401-or-403).

More in [Troubleshooting](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/troubleshooting.md).

## How it works

- **Auto-recall.** Before each of your messages, it searches the palace and adds the closest
  memories (3 by default) to the prompt, marked as untrusted reference data.
- **Auto-capture.** After each successful turn you sent, it saves your message and the reply, with
  secrets redacted, to the wing `openclaw_conversations`, in a room named after the agent.
- **Tools.** Agents get `memory_recall` and `memory_store`. Gateway `memory.search`, `memory.get`,
  `memory.status` and Active Memory work too.
- **Owner-only by default.** Memory works in the agent owner's private chats. Groups, channels,
  threads and other people's DMs get nothing unless you opt them in. Each agent recalls only its own
  saved conversations unless you share them.
- **Never blocks a chat.** Loading never fails and makes no network calls. A slow or unreachable palace skips
  recall for that turn instead of stalling it.
- **Small.** About 2,100 lines of TypeScript, modeled on OpenClaw's bundled `memory-lancedb`, so it
  behaves like a first-party memory plugin.

## Documentation

- [Configuration](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/configuration.md):
  every option, its default and limits, and when changes apply.
- [FAQ](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/faq.md): how to run
  MemPalace locally, share memory between agents, turn it on for a group, tune recall, and more.
- [Privacy and security](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/privacy-and-security.md):
  who gets memory, what is stored, delegated turns, known limitations.
- [Troubleshooting](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/docs/troubleshooting.md):
  `/mempalace_status`, every skip reason, common problems.

## Works with the official MemPalace OpenClaw skill

MemPalace has its own OpenClaw skill, `mempalace`
([integrations/openclaw](https://github.com/MemPalace/mempalace/tree/main/integrations/openclaw),
[guide](https://mempalaceofficial.com/guide/openclaw.html)). The two work together and their names
don't clash.

- **This plugin:** automatic recall and saving, plus simple `memory_recall` / `memory_store` tools,
  limited to what the current chat may see.
- **The official skill:** the full palace toolset through MemPalace's MCP server: knowledge graph,
  diaries, maintenance and setup.

Point both at the same MemPalace hub.

This package also ships a short agent skill, `mempalace-memory`
([SKILL.md](https://github.com/ggettert/openclaw-mempalace-memory/blob/main/skills/mempalace-memory/SKILL.md)).
It tells agents when to use `memory_recall` and `memory_store`, that recalled text is untrusted, never
to store secrets, and to use the official skill for anything beyond quick search and store.

- `memory_search` (for local notes files) is a different tool; this plugin doesn't provide it.
- OpenClaw loads the skill only while the plugin is enabled and selected in `plugins.slots.memory`.
- A bundled, managed, agent or workspace skill with the same name replaces it.
- Turn it off with `skills.entries.mempalace-memory.enabled: false`. Check it with
  `openclaw 

... (truncated)
voice

Comments

Sign in to leave a comment

Loading comments...