> ## 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.

# Hermes Agent plugin

> Dexi as Hermes Agent's memory provider — recall before every turn, dexi_* tools, optional session digest

[Hermes Agent](https://github.com/NousResearch/hermes-agent) can use Dexi two ways. As a plain **MCP server** it gets the eighteen tools (see [Getting Started → Hermes Agent](/mcp/getting-started#hermes-agent)). The **dexi memory-provider plugin** on this page goes further: it recalls relevant notes before every turn, teaches the agent how to use your notes, and can leave a digest note per session. Hermes allows one external memory provider at a time, so pick this *instead of* the `mcp_servers` entry when Dexi is your memory — configuring both duplicates the tools.

Source, issues, and version history: [github.com/dexi/hermes-plugin](https://github.com/dexi/hermes-plugin) (MIT).

| | MCP server (`mcp_servers.dexi`) | Memory provider (this plugin) |
| - | - | - |
| Tools | all eighteen as `mcp_dexi_*` | compact `dexi_*` set (search / get / list / save / append / tags / folders / bases / reviews) |
| Auto-recall before each turn (`<dexi-context>`) | — | ✓ |
| System-prompt guidance | — | ✓ |
| Session digest note (opt-in) | — | ✓ |
| Skills `dexi:capture` / `dexi:recall` / `dexi:review` | — | ✓ |
| Works alongside another memory provider (Honcho, Mem0, …) | ✓ | ✗ |
| Auth | OAuth, browser or paste-back | same — shares the token cache |

## Install

```bash theme={null}
hermes plugins install dexi/hermes-plugin --enable
hermes memory setup            # pick "dexi"  (or: memory.provider: dexi in ~/.hermes/config.yaml)
hermes dexi login              # one-time OAuth
hermes memory status
```

Or as a pip package (entry-point discovery — handy in a container image), then set `memory.provider: dexi`:

```bash theme={null}
pip install git+https://github.com/dexi/hermes-plugin.git
```

Requires `mcp>=1.26,<2` and `httpx`, both present in a Hermes install with the `mcp` extra.

<Tabs>
  <Tab title="Desktop / laptop">
    `hermes 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. Hermes' local callback completes the flow; you'll see "Authorization Successful — return to Hermes."
  </Tab>

  <Tab title="Headless server / VPS">
    Same command; open the printed URL in any browser, approve, then paste the final redirect URL — or just its `?code=…&state=…` part — back into the terminal when Hermes prompts. SSH port-forwarding the callback port also works. Tokens are cached in `~/.hermes/mcp-tokens/dexi*.json`, so a gateway started later reuses them silently.
  </Tab>
</Tabs>

If you already had an `mcp_servers.dexi` entry, the provider reuses its token — no second approval. Verify with `hermes memory status` (shows **dexi** as the active provider) and `hermes dexi status` (config plus a live probe).

## What it does

**Recall (`prefetch`)** — before each non-trivial turn, the plugin runs `semantic_search` over your notes for the incoming message (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. Hermes shows it in the recall indicator ("🧠 Dexi — recalled 5 memories").

**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 `id`, `title`, `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.

**Session digest (off by default)** — with `session_digest: true`, one note per session is written at session end, session switch, pre-compaction, or shutdown — never per turn. It holds the questions asked, the last answer, and the session id, tagged `#hermes` (configurable). Deterministic (no LLM call in the plugin) and idempotent per session.

**Skills** — `dexi:capture`, `dexi:recall`, `dexi:review` mirror the [Claude Code plugin's](/mcp/claude-code-plugin) with the `dexi_*` tool names; load one explicitly, or schedule `dexi:review` with a Hermes cron for a daily quiz over Telegram.

**Deliberately not done** — no note per turn, no mirroring of Hermes' `MEMORY.md`/`USER.md`, no rules/provenance/rollback layer. 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 (`auto_recall`, default on) | the current user message (≤ 500 chars) as a search query |
| Tools | the arguments the model passes (a query, note text you asked it to save) |
| Session digest (`session_digest`, default **off**) | your session's user messages (first \~240 chars each, up to 12) + the last answer (\~1,200 chars) |

Never full transcripts, `MEMORY.md`, or tool-call history. Everything lands in your Dexi account, visible and deletable in the app. Set `read_only: true` and the connection cannot write at all: Hermes requests only the `notes:read` scope and the write tools disappear from the agent.

## Configuration

`~/.hermes/dexi.json` — created by `hermes memory setup`; every key optional; `DEXI_<KEY>` environment variables override:

| Key | Default | Meaning |
| - | - | - |
| `auto_recall` | `true` | inject relevant notes before each turn |
| `recall_results` | `5` | max notes injected |
| `recall_min_similarity` | `0.55` | semantic similarity floor (0–1) |
| `session_digest` | `false` | write one digest note per session |
| `digest_tag` | `#hermes` | tag on digest notes (word characters only — Dexi's hashtag syntax) |
| `read_only` | `false` | request `notes:read` only; hide write tools |
| `prefetch_timeout` | `2.5` | seconds; recall is skipped past this |
| `tool_timeout` | `30` | seconds per explicit tool call |
| `mcp_url` | `https://mcp.dexi.net/mcp` | override for a self-hosted or dev server |

CLI (available while `memory.provider` is `dexi`): `hermes dexi status`, `hermes dexi login`, `hermes dexi logout` (clears the cached tokens on the Hermes side), `hermes dexi config`.

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

## Troubleshooting

| Symptom | Fix |
| - | - |
| `hermes memory status` doesn't list dexi | Confirm the plugin dir exists at `~/.hermes/plugins/dexi/` (`hermes plugins list`), then `hermes plugins enable dexi`. |
| Tool calls return `unauthorized (401)` | The cached token is missing, expired, or revoked — run `hermes dexi login`. |
| Authorize URL expired | Dexi's approval request is valid for ten minutes; run `hermes dexi login` again and approve promptly. |
| Non-interactive environment error at first use | A gateway with no TTY can't run the browser flow; authorize once from a terminal with `hermes dexi login`, then restart the gateway — the cached tokens are reused. |
| Duplicate tools (`mcp_dexi_*` and `dexi_*`) | You have both an `mcp_servers.dexi` entry and the provider active; remove one (or `exclude` the MCP side's tools). |
| Digest never appears | It's opt-in: `session_digest: true` in `~/.hermes/dexi.json`, and the connection must not be `read_only`. |


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