Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Memorize What Matters

20.1. Memorize What Matters — Remembering What Matters

Memory is actively stored, not a log of the whole conversation

Agent-curated memory: Hermes decides for itself what is worth remembering — it does not store the entire transcript wholesale. Two core files:

~/.hermes/memories/MEMORY.md   # facts about the environment, projects, technical preferences
~/.hermes/memories/USER.md     # a profile of the user themselves

A real example of MEMORY.md content: preferred Python version, default editor, current projects, timezone — exactly the kind of information that repeats in every session if it is not remembered in advance.

Memory has deliberately limited size

Memory is intentionally capped (~2,200 characters for MEMORY.md, ~1,375 for USER.md). When full, the agent automatically consolidates old entries — not deleting willy-nilly, but compressing them while keeping the core.

How to actively request something be remembered

"Remember this for next time"
"Clean up the memory"
"Replace the old Python 3.9 note — I'm on 3.12 now"

After an effective working session, just saying the first sentence is enough for the agent to save the key points on its own.

The “frozen snapshot” property — the easiest thing to misunderstand

This is an important technical point to know: memory is a frozen snapshot — changes made during a session do not appear in the system prompt until the next session begins. The agent writes to disk immediately, but the prompt cache is not invalidated mid-session — a deliberate trade-off to keep prompt caching stable and avoid API costs spiking.

Notes

  • Actively “seed” the memory from the very start: dedicate a first session to telling the agent your name, role, tools you often use, and current projects — instead of letting memory accumulate passively over weeks.
  • Keep the roles clearly separate: memory is for facts (environment, preferences, what has been learned about you); skills are for procedures (multi-step operation sequences, specific tool usage instructions) — stuffing the wrong kind into the wrong place degrades both.
  • Since memory changes only take effect in the next session, do not be surprised if the agent “forgets” something you just told it in the same session — this is designed behavior, not a bug.