> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dexi.net/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw plugin

> Dexi as OpenClaw's memory plugin — recall before every turn, dexi_* tools, /remember and /recall, optional session digest

[OpenClaw](https://openclaw.ai) can use Dexi two ways. As a plain **remote MCP server** it gets the eighteen tools with no install (see [Getting Started → OpenClaw](/mcp/getting-started#openclaw)). The **`openclaw-dexi` memory plugin** on this page goes further: it recalls relevant notes before every turn, teaches the agent how to use your notes, adds `/remember` and `/recall`, and can leave a digest note per conversation. It takes OpenClaw's exclusive **memory slot**, so pick it *instead of* the built-in `memory-core` (local `memory_search`/`memory_get`, dreaming and the markdown memory flush are off while Dexi is the memory plugin) and instead of an `mcp.servers.dexi` entry (configuring both duplicates the tools).

Source, issues, and version history: [github.com/dexi/openclaw-plugin](https://github.com/dexi/openclaw-plugin) (MIT). npm: [`openclaw-dexi`](https://www.npmjs.com/package/openclaw-dexi).

| | Native MCP server (`openclaw mcp add dexi …`) | Memory plugin (this page) |
| - | - | - |
| Tools | all eighteen as `dexi__*` | compact `dexi_*` set (search / get / list / save / append / tags / folders / bases / reviews) |
| Auto-recall before each turn (`<dexi-context>`) | — | ✓ |
| Memory prompt section | — | ✓ |
| `/remember` · `/recall` · `/dexi-digest` commands | — | ✓ |
| Session digest note (opt-in) | — | ✓ |
| Skills `dexi-capture` / `dexi-recall` / `dexi-review` | — | ✓ |
| Works alongside OpenClaw's built-in memory (`memory-core`) | ✓ | ✗ (exclusive memory slot) |
| Auth | OAuth (`openclaw mcp login dexi`) | OAuth (`openclaw dexi login`), browser or paste-back |

## Install

```bash theme={null}
openclaw plugins install openclaw-dexi
openclaw plugins enable openclaw-dexi    # claims the memory slot (unlocks the `openclaw dexi` CLI)
openclaw dexi setup                      # hook permissions + tool allowlist, then signs you in
openclaw gateway restart
```

`setup` writes `plugins.entries.openclaw-dexi` (with the `hooks.allowConversationAccess` / `allowPromptInjection` permissions the memory hooks need), `plugins.slots.memory = "openclaw-dexi"`, and the `dexi_*` tool allowlist into `~/.openclaw/openclaw.json`, then runs `openclaw dexi login`. Flags: `--read-only`, `--session-digest`, `--digest-tag <tag>`, `--mcp-url <url>`, `--no-login`, `--no-browser`. Requires OpenClaw ≥ 2026.5.7 (Node 22+).

<Tabs>
  <Tab title="Desktop / laptop">
    `openclaw dexi login` prints an authorize URL and opens your browser. Sign in to Dexi, optionally restrict the connection to one folder or tag, and approve. The plugin's loopback listener on `127.0.0.1` completes the flow; you'll see "Dexi is connected to OpenClaw" in the tab and `✓ Connected to Dexi` in the terminal.
  </Tab>

  <Tab title="Headless server / VPS">
    Same command (add `--no-browser`); open the printed URL in any browser, approve, then paste the final redirect URL — or just its `?code=…&state=…` part — back into the terminal (or run `openclaw dexi login --code '<pasted value>'`). SSH port-forwarding the callback port also works. Tokens are stored in `~/.openclaw/dexi/oauth.json` (mode 0600); the gateway reuses them silently after a restart.
  </Tab>
</Tabs>

Verify with `openclaw dexi status` (config plus a live probe) and `openclaw status` (the Memory row reads *enabled (plugin openclaw-dexi)*).

## What it does

**Recall (`before_prompt_build`)** — before each interactive turn, the plugin runs `semantic_search` over your notes for the incoming message (channel metadata stripped; plus a keyword pass when it contains a `#hashtag` or a "quoted phrase") and injects hits above the similarity floor as a `<dexi-context>` block of titles and snippets. Never full bodies — the model calls `dexi_get` or `full_text: true` when it wants one. Best-effort with a \~2.5 s budget; failures inject nothing. Heartbeat and cron runs are skipped.

**Tools** — each forwards to the Dexi MCP tool of the same purpose and accepts an optional `intent` sentence:

| Tool | Forwards to | Notes |
| - | - | - |
| `dexi_search` | `search_notes` + `semantic_search` | `mode`: `hybrid` (default, merged and de-duplicated, each item marked `keyword` / `semantic` / `both`), `keyword`, or `semantic`; `full_text` |
| `dexi_get` | `get_note` | full body |
| `dexi_list` | `list_notes` | `source`, `tag`, `folder`, `period`, `since`, `sort`, `page`, `size`, `full_text` |
| `dexi_save` | `create_note` | returns the note's `url` |
| `dexi_append` | `update_note` (`mode: append`) | keeps the note's formatting |
| `dexi_tags` / `dexi_folders` | `list_tags` / `list_folders` | |
| `dexi_bases` / `dexi_query_base` | `list_bases` / `query_base` | the user's saved [bases](/properties-and-bases); `name`, `view`, `page`, `size`, `full_text`; items carry `properties` |
| `dexi_reviews_due` / `dexi_review_grade` | `get_due_reviews` / `grade_review` | spaced repetition |

Every result item carries a `url` (`https://app.dexi.net/dashboard/notes/<id>`) so the agent can cite notes.

**Commands** — `/remember <text>` saves a note without involving the model (first line becomes the title, `#hashtags` become tags), `/recall <query>` runs a hybrid search, `/dexi-digest` writes the current session's digest now.

**Session digest (off by default)** — with `sessionDigest: true`, one note per conversation is written when the session ends (`/new`, `/reset`, idle or daily rotation), before compaction, after `digestIdleMinutes` of quiet, or at gateway shutdown — never per turn. It holds the questions asked, the last answer, and the session key, tagged `#openclaw` (configurable). Later flushes *append* to the same note; the session→note mapping is persisted in `~/.openclaw/dexi/digests.json`, so gateway restarts and one-shot `openclaw agent` runs don't create duplicates. Deterministic — no LLM call in the plugin.

**Skills** — `dexi-capture`, `dexi-recall`, `dexi-review` mirror the [Claude Code plugin's](/mcp/claude-code-plugin) with the `dexi_*` tool names and load while the plugin is enabled; schedule `dexi-review` with an OpenClaw cron job for a daily quiz over Telegram or Discord.

**Deliberately not done** — no note per turn, no mirroring of transcripts or `MEMORY.md`, no LLM-written summaries. Dexi is your notes app; the agent is a reader and an occasional, deliberate writer.

## What leaves your device

Only when the corresponding feature runs, and only to `mcp.dexi.net` under your own account:

| Feature | Data sent |
| - | - |
| Auto-recall (`autoRecall`, default on) | the current user message (≤ 500 chars) as a search query |
| Tools / commands | the arguments the model (or you) pass — a query, note text you asked it to save |
| Session digest (`sessionDigest`, default **off**) | your session's user messages (first \~240 chars each, up to 12) + the last answer (\~1,200 chars) |

Never full transcripts, local memory files, or tool-call history. Everything lands in your Dexi account, visible and deletable in the app. Set `readOnly: true` and the connection cannot write at all: the plugin requests only the `notes:read` scope, and the write tools, `/remember`, and the digest disappear.

## Configuration

`plugins.entries.openclaw-dexi.config` in `~/.openclaw/openclaw.json` — written by `openclaw dexi setup`; every key optional; `DEXI_<KEY>` environment variables override (e.g. `DEXI_MCP_URL`):

| Key | Default | Meaning |
| - | - | - |
| `autoRecall` | `true` | inject relevant notes before each turn |
| `recallResults` | `5` | max notes injected (1–20) |
| `recallMinSimilarity` | `0.55` | semantic similarity floor (0–1) |
| `sessionDigest` | `false` | write one digest note per session |
| `digestTag` | `#openclaw` | tag on digest notes (word characters only — Dexi's hashtag syntax) |
| `digestIdleMinutes` | `30` | also flush the digest after this much quiet |
| `readOnly` | `false` | request `notes:read` only; hide write tools |
| `recallTimeoutMs` | `2500` | recall is skipped past this |
| `toolTimeoutMs` | `30000` | per explicit tool call |
| `mcpUrl` | `https://mcp.dexi.net/mcp` | override for a self-hosted or dev server |
| `debug` | `false` | verbose plugin logs |

CLI: `openclaw dexi setup`, `openclaw dexi login [--read-only] [--no-browser] [--code <value>]`, `openclaw dexi logout` (revokes the token and forgets it locally), `openclaw dexi status`, `openclaw dexi search <query>`, `openclaw dexi save <text>`.

Manage, narrow, or revoke the grant itself in Dexi under **Settings → Connected apps** — the connection appears there as *OpenClaw (Dexi memory)*; a folder/tag restriction set there applies on the next request.

## Troubleshooting

| Symptom | Fix |
| - | - |
| `openclaw dexi` says "does not know the command" / Memory row doesn't show *plugin openclaw-dexi* | A `kind: memory` plugin stays disabled until it owns the slot: run `openclaw plugins enable openclaw-dexi` (switches `plugins.slots.memory` from `memory-core`), then `openclaw dexi setup` and `openclaw gateway restart`. `openclaw plugins list` must show **Dexi** as enabled. |
| Tools answer "Dexi is not connected" | The token is missing, expired, or revoked — run `openclaw dexi login` on the machine running the gateway, then restart the gateway. |
| Authorize URL expired | Dexi's approval request is valid for ten minutes; run `openclaw dexi login` again and approve promptly. |
| The browser callback can't reach the gateway host | Use the paste-back flow: open the URL on your own machine, approve, and paste the final redirect URL (or `--code`) into the terminal. |
| Duplicate tools (`dexi__*` and `dexi_*`) | You have both an `mcp.servers.dexi` entry and the plugin active; remove one (`openclaw mcp unset dexi`). |
| I want OpenClaw's built-in memory back | `openclaw config set plugins.slots.memory memory-core` and restart the gateway; the Dexi plugin can stay installed. |
| Digest never appears | It's opt-in: `sessionDigest: true` in the plugin config, and the connection must not be `readOnly`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.