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

100%
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:

100%
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


📝 Exercises

  1. Basic (⭐): Save 5 preferences with /remember, verify recall in a new conversation.
  2. Intermediate (⭐⭐): Observe how Honcho auto-updates your user profile, document 3 auto-update instances.
  3. Advanced (⭐⭐⭐): Design a memory classification system (by project/preference/habits/team norms), import into Hermes and verify retrieval.
Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏