Adding memory to Hermes

Hermes remembers Hermes; this is about the other forty

Hermes is one of the few agents that already has memory of its own: sessions live in a SQLite store per profile, an FTS5 index searches them and an LLM summarises them for cross-session recall, and MEMORY.md and USER.md carry what it has learned about the project and about you. This page is not about replacing any of that. It is about the question Hermes cannot answer: what you did in Claude Code, Codex, Cursor or opencode on the same machine, last week or last spring.

What Hermes already has

Its own sessions, searchable; its own notes, persistent; a skills system compatible with the agentskills.io standard. All of it is scoped to Hermes. The forty-one other agents on the machine each keep their own log in their own format, and none of them are in Hermes's index.

Adding recall

deja install hermes-auto

That writes the MCP server, so the model can call the deja tool itself — search past sessions, read one in full, see a file's history, ask what fixed an error, ask how a command is really run here, store a decision — and a plugin under ~/.hermes/plugins/deja — a plugin.yaml manifest and an __init__.py exporting register(ctx), which is Hermes's own plugin shape. Its pre_llm_call hook returns recall under context, which is appended to the user message. That is also where Hermes wants it: the system prompt stays byte-identical, so provider caching survives. When a terminal command fails, its transform_tool_result hook appends what this machine ran after the same error before to the result the model reads next. The installer also lists the plugin in plugins.enabled, since a discovered plugin is shown as "not enabled" and never loaded until it is there, and adds a /deja command for asking directly.

It also writes a memory provider. Hermes fills its memory.provider slot once, at hermes memory setup, from a list that otherwise holds mem0, supermemory, honcho and their keys and servers; deja appears there as deja-memory, needs none of that, and starts full, because what it answers from is the session history already on the disk. Pick it there, or set it directly:

hermes config set memory.provider deja-memory

The provider alone, without the MCP server or the hook plugin, is in the Hermes plugin catalog and installs from Hermes itself once deja is on PATH:

hermes plugins install deja-vu

With the provider active the model gets the same recall before each turn and three tools — deja_recall, deja_fix, deja_blame — and the pre_llm_call plugin steps aside so nothing arrives twice. You also see what it brought: Hermes prints one recall line per turn, and deja's receipt (🧠 deja · you have been here: "…" (3d ago)) and its session-start notes ride that line in the CLI. hermes -z, hermes chat -Q, gateway chats, the TUI and desktop stay quiet, and deja keeps the notes for a session that shows them. The hook plugin has no such line to write to, so without the provider deja stays silent on screen.

Reading Hermes's store needs the sqlite3 CLI on the machine; deja doctor names it if it is missing.

Or only the skill

Hermes installs skills straight from a GitHub repository, so the CLI contract can be added without the plugin:

hermes skills install vshulcz/deja-vu/skills/deja-search

That teaches the agent to reach for deja search --json, deja ctx, deja blame and deja fix on its own when a question sounds like earlier work. It needs the deja binary on PATH (brew install deja-vu or the install script) and nothing else.

What arrives

On each prompt, when this machine's history in any agent answers it, the plugin appends the matching session to the message; silence is the common case. A cron job gets none of this on its own, only the tools when it calls them. An injection is capped at about 1.5 KB per prompt and 4 KB per tool call — what memory costs has the measured comparison.

The part that is not about Hermes

The index covers every agent's transcripts on the machine — forty-two of them, each in its own format — so a fix found in Claude Code answers a question asked in Hermes, including sessions from before any of this was installed. A transcript a client later deletes stays searchable; only deja forget drops one on purpose. Nothing here writes memories, so there is nothing to hallucinate into your history; indexing and search are local, and credentials are stripped as the index is built (privacy).

Getting started · Switching between agents · The Hermes session format

Found this useful? Star deja-vu on GitHub.