Hermes Agent: Memory System
Last updated: 2026-08-31
The memory system is Hermes's core differentiator — it's not a "forget after chatting" chatbot, but an intelligent assistant that remembers everything across sessions.
💡 Tip: Hermes memory isn't simple text storage — it includes semantic retrieval, auto-classification, and user profile modeling. Honcho is Nous Research's dedicated user understanding engine.
📋 Prerequisites: Lesson 3 — Configuration Files
1. What You Will Learn
| # | Content |
|---|---|
| ❶ | Three-layer memory architecture |
| ❷ | Working memory mechanism |
| ❸ | Long-term memory and semantic retrieval |
| ❹ | Honcho user modeling |
| ❺ | Memory management commands |
2. Story
(1) Pain Point: Re-introducing Yourself Every Time
Bob chats with AI every day and always has to repeat: "I'm a frontend dev, I use React + TypeScript, prefer ESLint..." The AI never remembers.
(2) Solution: Agent Truly Remembers You
BASH
# Day 1
me: I'm Alice, backend developer, Python + FastAPI
Agent: ✅ Remembered! I'll keep your tech stack and preferences long-term.
# Day 30
me: Help me write an API
Agent: [Recall] You use Python + FastAPI, prefer type hints...
Here's the FastAPI version:
```python
from fastapi import FastAPI
app = FastAPI()
```
3. Three-Layer Memory Architecture
graph TD
A[User Input] --> B[Working Memory]
B -->|Auto-extract| C[Long-term Memory]
C -->|Deep modeling| D[User Model - Honcho]
D -->|Personalize| E[Response Output]
| Layer | Content | Lifetime | Capacity |
|---|---|---|---|
| Working Memory | Current conversation context, intent, entities | Single session | 50 entries |
| Long-term Memory | User preferences, project info, common patterns | Permanent | Unlimited |
| User Model | Behavioral profile, skill assessment, communication style | Permanent + auto-updated | Dynamic |
4. Working Memory
Working memory stores active context for the current conversation:
JSON
{
"session_id": "abc123",
"entities": [
{"name": "React Dashboard", "type": "project"},
{"name": "TypeScript", "type": "tech_stack"}
],
"intent": "code_review",
"context_window": [
"User asked to review React component",
"Component uses TypeScript"
]
}
5. Long-term Memory
(1) Auto Memory Extraction
BASH
me: I'm working on an e-commerce project using Next.js 14 + Prisma + PostgreSQL
# Hermes auto-extracts:
📝 Long-term memory updated:
- Project: E-commerce
- Tech stack: Next.js 14, Prisma, PostgreSQL
(2) Semantic Retrieval
BASH
me: Add a product listing page
Agent: [Memory retrieval] E-commerce project (Next.js 14 + Prisma)
Using your existing tech stack:
```tsx
// app/products/page.tsx
import { prisma } from '@/lib/prisma'
```
(3) /remember Command
BASH
/remember I need to submit a weekly report every Friday
/remember list
/remember delete 3
/remember export > my_memories.json
6. Honcho User Modeling
(1) What is Honcho?
Honcho is Hermes's user understanding engine — it doesn't just store preferences, it models behavioral patterns:
graph LR
A[Conversation History] --> B[Honcho Engine]
B --> C[Skill Assessment]
B --> D[Communication Style]
B --> E[Decision Preferences]
B --> F[Knowledge Graph]
(2) User Profile Dimensions
| Dimension | Example | Purpose |
|---|---|---|
| Technical skill | ⭐⭐⭐⭐ (Advanced) | Adjust explanation depth |
| Communication style | Concise & direct | Match response style |
| Code preference | Type-safety first | Code generation style |
| Learning mode | Practice-oriented | Teaching approach |
(3) View Your Profile
BASH
/honcho profile
# 🧑💻 User Profile
# Technical skill: ⭐⭐⭐⭐⭐ (Senior developer)
# Preferred languages: TypeScript > Python > Go
# Code style: Strict typing + functional
# Communication: Concise, no fluff
7. Memory Management Commands
| Command | Function |
|---|---|
/remember <content> |
Save memory |
/remember list |
List all memories |
/remember search <keyword> |
Semantic search memories |
/remember delete <id> |
Delete memory |
/remember export |
Export memories |
/honcho profile |
View user profile |
/honcho reset |
Reset user profile |
❓ FAQ
Q How much disk space does memory use?
A ~1-2 KB per entry (including embedding), 1000 entries ≈ 2 MB. Long-term use typically stays under 50 MB.
Q Where is memory data stored?
A Default
~/.hermes/memory/. Configurable, supports encrypted storage.Q How to clear all memory?
A
/remember delete --all or delete ~/.hermes/memory/ directory. Export backup first.Q Does Honcho leak privacy?
A Honcho data is fully local, zero uploads. User profiles are only used for personalization, never sent to third parties.
📖 Summary
- Three layers: Working Memory (session) → Long-term Memory (cross-session) → User Model (deep profile)
/rememberfor manual saves; Agent auto-extracts important information- Semantic retrieval, not keyword matching
- Honcho auto-models user behavior, continuously updated
- All data stored locally, zero privacy leakage
📝 Exercises
- Basic (⭐): Save 5 preferences with
/remember, verify recall in a new conversation. - Intermediate (⭐⭐): Observe how Honcho auto-updates your user profile, document 3 auto-update instances.
- Advanced (⭐⭐⭐): Design a memory classification system (by project/preference/habits/team norms), import into Hermes and verify retrieval.