Chapter 10

Memory and Auto-Learning

Memory is a storage-and-retrieval system — not intelligence. The agent stores what you tell it to store and retrieves what is relevant when a new session starts. It does not independently become smarter, does not have perfect recall, and does not improve on its own. "Auto-learning" means the agent follows your instructions to persist information — nothing more.

This chapter covers how the built-in memory system works in practice, the distinction between memory and skills, how to recall past sessions, and how to keep memory clean over time.

How it works

and in practice

MEMORY.md and USER.md (Ch3) are loaded at session start — before your first message. The agent treats their contents as established facts, not suggestions. Both are plain text files you can inspect, edit, or delete at any time. Here's how they behave in practice:

markdownVerified
# USER.md — SEO manager profile

## Style rules
- Direct, professional tone
- No jargon or filler phrases
- Briefs under 500 words
- Always include internal linking suggestions
- Article drafts: 1,500–2,000 words max

## Content preferences
- Prefer listicle format for competitive keywords
- How-to format for procedural topics
- Include at least 3 internal links per article

Plain text, editable by you or the agent, loaded every session. No database, no hidden state — just a file that persists.

Recall across sessions

: finding what was said before

MEMORY.md and USER.md store facts and preferences — but they do not capture everything from prior sessions. If you discussed a keyword strategy three weeks ago, that conversation lives in session history, not in the memory files. Session search indexes all transcripts using full-text search (FTS5). The agent runs a search, results are summarized by the model, and the summary is injected into context — not the raw transcript, which would overwhelm the context window.

bashVerified
$ hermes search "keyword strategy for education consulting"

Found 3 matching sessions:

1. Session 2026-04-23 (research-specialist)
   Summary: Explored keyword clusters for college
   admissions consulting. Identified 12 long-tail
   keywords with low competition.

2. Session 2026-04-15 (seo-manager)
   Summary: Reviewed keyword list and selected top 5
   for the next content cycle.

Distinction

Memory is not skill

Memory stores facts and preferences; skills store procedures. Mixing them up causes problems — memory is loaded every session regardless of task, while skills load only when the task trigger matches. Put a procedure in memory and it wastes context space when irrelevant; put a fact in a skill and it may not load when needed.

If it answers "what is true?" → memory. If it answers "how do I do this?" → skill. A style rule ("write in a direct tone") is memory because it states a preference. A writing procedure ("draft in this order: title, angle, keywords, word count") is a skill because it defines a process.

Concrete behavior

: three behaviors, not magic

Auto-learning in Hermes means three concrete behaviors: saves durable facts to memory when you tell it to remember something, creates skills from repeated work by documenting patterns it has observed, and patches skills during use when you correct a procedure. Auto-learning means persisting your feedback — not independent improvement (Ch3, Ch7).

Each session, the agent carries more rules in context. Session 10's agent isn't smarter — it just has more stored preferences. The model is the same model every session. The difference is entirely in the accumulated memory.

Beyond built-in

External memory providers

The built-in system is enough for most starting setups. But as your agent accumulates months of context, finding the right piece of memory becomes harder. External memory providers (Honcho, Mem0, and others) add semantic search — instead of loading the entire memory file, the provider searches for the relevant parts and injects only those. Only one external provider can be active at a time, configured through the Hermes configuration file. The built-in system always runs alongside it. For most SEO workflows, the built-in system is sufficient for the first few months; external providers become useful when you need to recall a decision from three months ago about a specific campaign.

Maintenance

Memory hygiene: keeping memory clean and useful

Memory that grows without maintenance becomes noise. Outdated facts, contradictory rules, and bloated files waste context window space. Four rules for keeping memory healthy:

  • Review periodically. Open MEMORY.md and USER.md for each profile monthly. Delete or update outdated facts. Replace changed preferences — do not just add the new rule alongside the old one.
  • Delete one-time instructions. Task-specific instructions ("check the meta description on page X") should not persist. Memory is for durable knowledge, not to-do items.
  • Resolve contradictions. If USER.md says both "casual tone" and "professional tone," the model has to guess. Contradictions are worse than missing rules. Remove the old rule when you change a preference.
  • Keep memory compact. Every line competes for context window space. When in doubt, delete — session search can always find past details if you need them later.

What should never be saved in memory:

  • API keys, passwords, or secrets — belong in .env files
  • Raw conversation logs — session history already stores these
  • Task progress — "I am working on task #4" is session state, not a durable fact
  • Information about other users — memory is per-profile and per-user
  • Speculative or unverified claims — memory should contain confirmed facts, not hypotheses

Rule of thumb: memory should contain things that would still be true and useful three months from now. If information is only relevant for the current task, it belongs in the session conversation. If it's a secret, it belongs in environment configuration.

Takeaway

Memory across your four-agent team

Each profile has its own isolated memory. Here's what each agent on your SEO team (Ch9) carries forward:

Research specialist

Which sources work best for your niche, which filters you prefer, which keyword patterns have performed well.

SERP analyst

Which competitors consistently rank for your targets, which content formats rank well, which SERP features appear most often.

Content writer

Your brand voice rules, word count preferences, and structural patterns (listicles vs. long-form).

SEO manager

Comprehensive style rules, publishing standards, approval criteria, and all prior review decisions.

The research specialist doesn't see the SEO manager's style rules; the content writer doesn't see the SERP analyst's competitive data. This isolation keeps each agent focused on facts relevant to its role. To share a rule across all profiles, add it to each profile's memory separately — or put it in a shared project context file in the working directory.

Memory is the mechanism that makes your agent team compound over time. The procedures in Ch8 define how each agent works. The coordination in Ch9 defines how the team works together. Memory defines what each agent carries forward. Together — procedures, coordination, and accumulated knowledge — these three layers are what make an agent team effective. Not the model. Not the tools. The accumulated context.

Your research specialist keeps returning keywords that are too competitive for your niche. You tell it to add a filter rule, and it patches the keyword research skill. But the same problem keeps recurring — the agent sometimes ignores the filter. Where else could you store this rule to make it harder to ignore? Why would that location help?