Long-Term Memory
What it is
Curated information intended to remain useful across sessions and days.
In plain terms
Long-term memory is the small set of facts Hermes decides belong in the permanent record, similar to how a contact card keeps someone’s current address and preferences up to date across years of knowing them, rather than saving a transcript of every conversation you’ve ever had with them. It’s meant to still matter in a month, not just for the rest of today’s conversation.
Why it matters
Not every detail from a conversation earns a place in long-term memory — only the subset curated specifically to stay relevant across sessions and days. Session history can remain queryable in SQLite after a session ends, but it is not the same small set injected as standing context into a new session. Long-term memory makes selected facts immediately reusable without turning the entire transcript into permanent prompt content.
How it works
This layer is exactly what the built-in memory files hold, or what an external provider’s persistent store holds if one is configured: MEMORY.md for the agent’s own operating notes and USER.md for facts about the person, each capped by a character limit — 2,200 and 1,375 characters by default — so the store can’t balloon into something too bulky to inject whole into every prompt (tools/memory_tool.py). Because both files load once and freeze into the system prompt at session start, a fact saved here is visible to the model on literally the next message it sees in a later session, without being searched for. When either file nears its limit, adding something new is rejected until stale entries get trimmed or replaced, keeping the store deliberately small and current.
A concrete example
Across a week of sessions, a founder tells Hermes to always draft investor emails in a particular tone, then later mentions the company just closed a new office lease.
- The tone preference goes into USER.md as a standing instruction.
- The lease detail goes into MEMORY.md as a fact about the current situation. The next month, asked to draft a partner update, Hermes already has both facts sitting in context — no re-explaining needed, because they were curated into the permanent store instead of just existing somewhere inside an old chat log.
How it connects
This note belongs to the Memory family. Its closest neighboring concepts are: Memory Provider, Session Search, Agent Runtime, Personal OS.
Source evidence
vendor/hermes-agent/tools/memory_tool.py:1022-1032#memory_tool— Verified Source Map evidence for memory_tool. The memory tool routes a single operation by action toadd,replace, orremove; this flow continues through theaddbranch.
Workflows
- No first-pass workflow mapping yet; this concept still appears in the vault graph through articles and source evidence.
Related articles
- Hermes Agent for Beginners: A Step-by-Step Route from Empty Server to Useful Automation
- Why Hermes Feels Different: Memory, Self-Improving Skills, and an Agent That Keeps Working
- Inside Hermes: How the Agent Loop, Context, Memory, Gateways, and Cron Jobs Work Together
- The Ultimate Beginner’s Guide to Hermes: From First Installation to an AI Operations Team
