Hermes Agent memory: MEMORY.md, USER.md, limits and backups
How Hermes Agent remembers: MEMORY.md and USER.md, their character limits, session search, external providers, and how to view, turn off or move memory.
Hermes Agent keeps two small Markdown files in ~/.hermes/memories/: MEMORY.md, its own notes, capped at 2,200 characters, and USER.md, what it knows about you, capped at 1,375. Both are pasted into the system prompt once, at the start of each session. Everything else it can recall comes from ~/.hermes/state.db, a SQLite database of every CLI and messaging session that it searches when it needs to, plus the skills it writes to ~/.hermes/skills/. A full memory file is not trimmed: a write that would overflow is refused and the agent has to consolidate first. Turn memory off by setting memory_enabled and user_profile_enabled to false in ~/.hermes/config.yaml, and move all of it to another machine with hermes backup and hermes import, which overwrites the Hermes home it is run in. As of November 30, 2026, on v0.23.5 (released November 27).
Four places Hermes remembers things
“Memory” in Hermes covers four different mechanisms, and most confusion comes from mixing them up. Only the first is called memory in the memory docs; the others are how it recalls more than two small files could hold.
| What | Where it lives | How the model sees it |
|---|---|---|
Built-in memory: MEMORY.md (environment facts, conventions, lessons) and USER.md (your identity, preferences, how you like to be spoken to) | ~/.hermes/memories/ | In the system prompt, every session, frozen at the start |
Session history: every past conversation, from the terminal and from messaging apps | ~/.hermes/state.db (SQLite with FTS5 full-text search) | Only when the agent searches it; results are the actual messages |
Skills: procedures it wrote for itself after working something out | ~/.hermes/skills/ | A compact index in the prompt; a skill’s full text loads when it is needed |
An external provider (optional): Honcho, Mem0, Hindsight, Supermemory, OpenViking, Holographic and others | The provider’s own store, local or cloud; its config under ~/.hermes/ | Recalled by the provider and added alongside the built-in memory |
The split is deliberate. The two files are small because they are sent with every request; the history is large because it is only read on demand. If you want a fact in front of the agent at all times, it belongs in memory. If it only needs to be findable, the session history already has it.
The two memory files and their limits
The agent writes to its memory through a memory tool with three actions, add, patch and remove, each aimed at a target of memory or user. There is no read action, because the contents are already in its prompt. That prompt copy carries a usage header, in the docs’ example:
MEMORY (your personal notes) [67% — 1,474/2,200 chars]CopiedThe limits are characters, not tokens: 2,200 for MEMORY.md (about 800 tokens) and 1,375 for USER.md (about 500). The docs are direct about what happens at the edge: memory “does not auto-compact”, and when a write would go over, the tool “returns an error instead of silently dropping entries.” The agent then has to consolidate or remove entries in the same turn and retry, and above 80% it is told to consolidate before adding. So a full memory is not lost data; it is the agent rewriting its own notes shorter. If you want more room, raise the limits in config.yaml (shown below), knowing every extra character is sent on every request.
Two details catch people out. First, the snapshot is frozen: a memory saved mid-conversation is on disk at once but does not appear in the system prompt until the next session starts. Second, entries are scanned before they are accepted, and anything matching prompt injection or exfiltration patterns, or containing invisible Unicode, is rejected, so a write can fail for a reason other than size.
Who writes to memory, and when
The agent saves things in two ways. In the foreground, during your conversation, when you correct it or tell it something worth keeping. And after a turn, a background self-improvement review “may quietly save a memory or update a skill”, announced in the chat with a short 💾 Memory updated line. That review runs on your main chat model by default, so it costs model usage like any other call; it can be pointed at a cheaper model or switched off:
# ~/.hermes/config.yaml
auxiliary:
background_review:
enabled: false # no automatic post-turn review; /refine still runs one by hand
# or keep it and route it to a cheaper model:
# provider: openrouter
# model: <a cheaper model ID>
display:
memory_notifications: verbose # off | on (default) | verbose, with a preview of the changeCopiedIf you would rather approve every save, set memory.write_approval: true. In the interactive CLI a foreground save then asks you inline; on a messaging app, in scripts and from the background review, saves are staged instead, and you handle them with /memory pending, /memory approve <id> and /memory reject <id>. Skills have their own, separate skills.write_approval; the Hermes skills guide covers how the agent writes, patches and locks them.
Viewing, editing and deleting what it remembers
The files are plain text, so the quickest look is:
cat ~/.hermes/memories/MEMORY.md ~/.hermes/memories/USER.md
hermes journey # timeline of everything it has learned: memories and skillsCopiedThe documented way to change entries is the learning journey, also available as /journey inside a chat: hermes journey edit <node> opens a memory entry (or a skill’s SKILL.md) in your $EDITOR, and hermes journey delete <node> removes it. Deleting is not undoable for memory: the docs say skills are archived and can be restored, while “memory chunks are removed.” You can also just tell the agent what to forget; it uses the same remove action. Whichever way, the change reaches the prompt at the next session.
There is no reset command for memory as of v0.23.5. To start from nothing, delete the entries, or take a hermes backup first and then clear the two files. Session history is managed separately:
hermes sessions list # recent conversations
hermes sessions export ~/sessions.jsonl # all sessions to JSONL
hermes sessions delete <session-id> # deletes one session
hermes sessions prune --dry-run # what pruning would delete (default: older than 90 days)Copieddelete and prune delete data: prune without --dry-run deletes every session that matches, and --yes skips its confirmation, so run the dry run first. If you only want old conversations out of the way, hermes sessions archive takes the same filters and hides them without deleting anything.
Turning memory off
# ~/.hermes/config.yaml
memory:
memory_enabled: false # MEMORY.md
user_profile_enabled: false # USER.md
memory_char_limit: 2200 # defaults, if you only want to resize
user_char_limit: 1375
write_approval: false # true = approve each saveCopiedWith both set to false the built-in stores are off completely and the memory tool is dropped from what the model is offered. This does not stop the session history being recorded or skills being written; those are separate, as above.
The terminal and the messaging gateway share one memory
Memory belongs to the Hermes home directory, not to the place you talk from. The CLI and the gateway that serves Telegram, Discord and the rest read the same ~/.hermes/memories/ and record into the same state.db, so something you tell the agent on your phone is in its prompt the next time you start hermes in a terminal, and the reverse.
The difference is the session boundary. Each CLI run is a new session, so new memories load the next time you start it. A chat on a messaging app has no natural end: the docs warn that “a chat can run for weeks as a single session”, which means the memory snapshot in that chat never refreshes and the conversation keeps growing in cost. Their advice is to send /new at natural breaks, such as a finished task, a change of topic or the start of a day.
The real separation is the profile. “Memory is scoped per profile by design”: hermes -p work reads ~/.hermes/profiles/work/memories/, not your default memory. If a remembered fact seems to have vanished, the docs’ troubleshooting order is: was the tool actually called, is the save waiting for approval, is this the same profile, is memory enabled, and has a new session started since.
What reaches the model provider
Everything the model reads goes to whichever provider serves it. For memory that means:
- Both memory files, on every request, as part of the system prompt. Anything written into
USER.mdabout you travels with every call. - Session history only when searched. Search runs locally against SQLite, and “no LLM summarization” is involved; the messages it finds are then returned to the model as a tool result.
- The background review’s input, on your main model unless you route it elsewhere.
- With an external provider, the provider itself also receives turns, transcripts including tool output, recall queries, memory writes and delegation results. Hermes runs them through its secret scrub first, but the docs note that credentials “with no recognisable shape”, such as an arbitrary password, are not detected and reach the provider as written.
If you run a local model (the Hermes with Ollama guide covers it), none of this leaves the machine, an external cloud memory provider apart.
External memory providers
Hermes can add one external provider on top of the built-in files. In the providers docs’ words, “Only one external provider can be active at a time — the built-in memory is always active alongside it.” The list as of November 30, 2026: Honcho (cloud or self-hosted), Mem0, Hindsight, Supermemory, OpenViking, Holographic (a local SQLite store that needs no API key), Memori, and two unsupported Hermes Labs plugins, ByteRover and RetainDB.
hermes memory setup # pick and configure a provider
hermes memory status # what is active
hermes memory off # back to built-in memory onlyCopiedThe choice is stored as memory.provider in config.yaml, with each provider’s settings beside it (for example ~/.hermes/honcho.json) and its keys in ~/.hermes/.env. One change in progress matters on update: the docs say providers “are moving out of the Hermes tree into their maintainers’ own repositories” and ship as catalog plugins, which hermes update installs for a provider you already use; if lazy installs are off, the machine is offline or you decline, it only warns, and you run hermes plugins install <name> yourself. A fix to that install step landed in a canary build on November 29 and is not yet in a stable release, so on v0.23.5 check hermes memory status after updating. The Hermes update guide covers the rest of an update.
Backing it up and moving it to another machine
All of the above lives under one directory, ~/.hermes/ (or /opt/data inside the official container, mounted from the host; see Hermes in Docker). Hermes packs it with its own command, which is safe while it is running because it copies the database through SQLite’s backup API:
hermes backup -o ~/hermes-move.zip
chmod 600 ~/hermes-move.zip # treat it as holding your keys and loginsCopiedThe zip holds configuration, memories, skills, sessions and data, but not the Hermes code, so install Hermes on the new machine first. The docs list .env and auth among what even the --quick snapshot takes, and the full backup’s exclusions do not name them, so treat the zip as a secret and delete it once the move is done.
The import is destructive: “All files in the archive overwrite existing files in your Hermes home.” On a machine that already has a Hermes setup you want, take a hermes backup there first. The docs also say to stop the gateway before importing, and it is worth stopping the old machine’s gateway too, so two machines are never answering on the same bot tokens:
hermes gateway stop # on the old machine, then on the new one if it runs a gateway
hermes import ~/hermes-move.zip # on the new machine: overwrites its Hermes home
hermes gateway start # on the new machine; needs the service (hermes gateway install) set up thereCopiedTo carry a single profile instead of everything, hermes profile export <name> -o file.tar.gz and hermes profile import do the same for one profile.
Beside OpenClaw and Claude Code
The three keep memory as Markdown on disk, which is why all three can be read, edited and backed up like any files. The differences are in size and who writes. Hermes caps its two files hard and refuses overflow. OpenClaw writes a MEMORY.md plus daily notes in its workspace (~/.openclaw/workspace by default), searches them semantically, and truncates an oversized MEMORY.md in the prompt while keeping the file intact; the OpenClaw memory guide goes through it. Claude Code splits instructions you write (CLAUDE.md, see the CLAUDE.md guide) from auto memory it writes itself, kept per repository and loaded up to the first 200 lines or 25KB. Hermes’s memory is about you and its machine rather than one repository, which fits an agent you talk to from a phone as much as from a project folder; the Hermes vs Claude Code comparison covers the rest of that difference.