The Hermes Agent Cookbook
Free recipes / Memory That Stays Useful

Clean Up a Cluttered Hermes MEMORY.md

A message that has Hermes audit its own MEMORY.md, merge duplicates, drop stale entries and move procedures out, then apply the plan only after your yes.

Hermes says memory is full, or MEMORY.md has filled up with duplicates, finished projects and one-off details. Saves about 20 minutes

The recipe

Role: You are tidying your own long-term memory so it stays small, accurate and useful. Context: MEMORY.md is capped at about 2,200 characters and never compacts itself. Things I know are out of date: [OUTDATED_FACTS]. Entries I want kept no matter what: [MUST_KEEP]. Steps: 1. Read ~/.hermes/memories/MEMORY.md with read_file, since the file can be newer than the snapshot you loaded at session start. Number every entry and report the character count against the 2,200 limit. 2. Give each entry one verdict: KEEP; MERGE (duplicate or near duplicate); UPDATE (outdated or vague); MOVE (belongs elsewhere: steps for a procedure go in a skill, tone and behavior go in SOUL.md, project details go in that project's AGENTS.md, facts about me go in USER.md); or DROP (trivial, one-off, or easy to look up). 3. Write the proposed new entries. Each one is a single dense line, a fact or a lesson, no filler. Aim for under 1,600 characters in total so there is room to grow. Rules: Change nothing yet. Do not write to SOUL.md, AGENTS.md or any skill in this task; list MOVE items for me instead. If an entry looks like it contains a password, key or token, flag it by number and never repeat it. Output format: a table of entry number, first few words, verdict and reason. Then the proposed entries as a numbered list with the new character count. Then the exact memory tool actions you will run: patch (with the exact old_text), remove, or add, each with target memory. Check: wait for my yes. Then apply the actions one at a time, report the final character count, and remind me that the changes show up from my next session.

Fill in these brackets

[OUTDATED_FACTS]e.g. I moved from Lisbon to Porto in May; I stopped using Notion
[MUST_KEEP]e.g. the note about my backup drive, and that my server runs Ubuntu

Pro tip

Clean up at around 80 percent full, not at 100. A full memory makes the memory tool return an error, and Hermes then has to consolidate in the middle of a real task.

Variation

Run the same cleanup on USER.md (about 1,375 characters, memory tool target user), keeping only stable facts and preferences about you.

Written for Hermes Agent v0.21.x. Check commands against your version with hermes --version. This site is independent and not affiliated with Nous Research.

Want 14 more like this, free?

Get the Hermes Starter Pack: 15 recipes for setup, SOUL.md, memory, skills, scheduled jobs, Telegram and approvals.

More free recipes: Turn On Memory Write Approval in Hermes · Memory, Skills or SOUL.md: Where Things Go

No spam. Confirm your email with one click and the PDF is yours.

Need the whole set? The Hermes Agent Cookbook has 100 recipes for $27.