How Hermes memory works
Two bounded files, a frozen snapshot, and session search
Hermes remembers across sessions with two small files and a search index, and the design choice that matters is that both files are bounded: a personal-notes file of 2,200 characters and a user profile of 1,375, injected into the system prompt as a frozen snapshot at the start of a session. That is a deliberately different answer from OpenClaw’s unbounded Markdown, and it explains how Hermes behaves when it is full.
The two files
- MEMORY.md: the agent’s own notes. Environment facts, conventions, tool quirks, completed work; roughly eight to fifteen entries.
- USER.md: the user profile. Name, role, timezone, communication preferences, pet peeves; roughly five to ten entries.
- Both live in the Hermes home directory and are managed by the agent through a memory tool with add, replace and remove. There is no read, because the contents are already in the prompt.
The snapshot is frozen on purpose: it is captured once at session start and never changes mid-session, which preserves the model’s prefix cache. So memory pays off at session boundaries. On messaging platforms a chat is one continuous session that survives restarts, and the documented practice is to start a new session at natural boundaries, a finished task, a change of topic, the start of a day, so the updated files are read again.
What it saves without being asked
- Preferences, environment facts, corrections, conventions, completed work, and explicit requests to remember something.
- Not trivia, not facts a web search returns, not raw dumps, not one-off debugging context, and not what the context files already say.
Memory does not auto-compact: when a write would exceed the limit, the memory tool returns an error instead of silently dropping entries.
When it is full
A write that would exceed the limit fails with an error that lists the current entries and the usage, and the agent makes room in the same turn: it merges overlapping entries with replace, removes stale ones, then adds. The docs recommend consolidating above eighty percent, which the prompt header shows. Compact, information-dense entries are the practice: one line that packs the operating system, the package manager, the shell and the editor beats four.
Search fills the gaps
The files carry the essentials into the next session; a session search tool fills the gaps once old context is gone, and memory providers can plug in as a third layer, from the built-in files to external services. Hermes vs OpenClaw sets this against OpenClaw’s unbounded notes and background consolidation.
Why the bound is the feature
Bounded memory cannot bloat the prompt or drift into a transcript, and the agent has to decide what matters, which is the point of a self-improving loop. The cost is a housekeeping habit and a session boundary now and then. On Diali the files live in the assistant’s sandbox with backups available, and the sessions run on a Gateway that stays up, so the boundaries are the only part left to you. Hosted Hermes on Diali is the hosted version; how OpenClaw memory works is the other engine’s answer.
- Two files, hard limits, one frozen snapshot per session.
- Boundaries are when memory pays off; start a new session on purpose.
- Full is an error to fix, never a silent drop.
Stop reading about it, build one
Set up an agent, pick a channel, and have it working inside the app you already keep open.
