Persistent Memory: Cross-Session Recall and User Modeling

9 min read Module 4 of 9 Topic 10 of 25

What you'll learn

  • Explain why cross-session memory is not the same as a longer context window
  • Describe how FTS5 recall and LLM summarization work together in Hermes' memory system
  • Inspect and manage what Hermes has stored about you
  • Recognize the difference between memory and skills as two distinct forms of persistence
Building this at your company? For enterprise and company teams taking this to production: book a 30-minute session with our AI engineers for architecture guidance, code review, and a rollout plan for your use case.
Book a Team Session

The Problem Session-Only Chat Has

A stateless chatbot forgets everything the moment a session ends. Even a long-context model that remembers everything within one very long conversation still starts from zero the next time you open a new session. Neither approach gives you an agent that actually gets to know you and your work over weeks and months.

Hermes solves this with a persistent memory store, separate from and complementary to the conversation context window you configured in Lesson 6.

How It Works: Two Mechanisms Working Together

flowchart TB
    SESSIONS["Every session's\nconversation"] --> STORE[("SQLite FTS5 store\n(full-text search)")]
    STORE --> RETRIEVE["Fast keyword/phrase\nrecall on demand"]
    STORE --> SUMMARIZE["Periodic LLM\nsummarization"]
    SUMMARIZE --> USERMODEL[("Durable user model:\npreferences, recurring\ncontext, working style")]
    RETRIEVE --> ORCH["Orchestration layer\n(Lesson 3)"]
    USERMODEL --> ORCH

    style SESSIONS fill:#EEF0F7,stroke:#6366F1,color:#0F172A
    style STORE fill:#fff7ed,stroke:#f59e0b,color:#0F172A
    style RETRIEVE fill:#f0fdf9,stroke:#0D9488,color:#0F172A
    style SUMMARIZE fill:#f0fdf9,stroke:#0D9488,color:#0F172A
    style USERMODEL fill:#fff7ed,stroke:#f59e0b,color:#0F172A
    style ORCH fill:#EEF0F7,stroke:#6366F1,color:#0F172A

FTS5 recall uses SQLite’s full-text search extension to index everything from past sessions, letting the orchestration layer pull specific, relevant facts on demand rather than replaying entire transcripts. Ask about “the staging deployment issue” three weeks later, and Hermes searches its memory store for that phrase rather than requiring you to re-explain context.

LLM summarization runs periodically to distill accumulated raw history into a more durable, higher-level user model, the kind of dialectic modeling that captures “this person works primarily in Python and prefers terse explanations” rather than storing every individual message where that preference showed up. This keeps the memory store useful and searchable even as raw history grows large.

Together, these mean the orchestration layer can inject exactly the relevant slice of memory into a given request (Lesson 3’s step 1), instead of either ignoring history entirely or drowning every request in irrelevant past context.

Inspecting and Managing Memory

hermes sessions list          # see every past session
hermes sessions show <id>      # review what happened in a specific one

Within a chat, you can ask the agent directly what it remembers, since memory retrieval is part of its normal operation, not a hidden background process:

What do you remember about my current project?

If you need to correct or remove something, the same conversational interface works, tell the agent it was wrong about a fact, or that a project has ended and its context should be dropped, and that becomes part of what gets recalled (or not recalled) going forward.

Common pitfall: assuming memory means Hermes has access to information you never told it. Memory only stores what happened in sessions Hermes was actually part of. It is not a general knowledge base and it does not scrape information about you from anywhere else, everything in it originated in a conversation you had with the agent.

Memory vs. Skills: Two Different Kinds of Persistence

It’s worth being precise about the distinction before the next lesson, because they’re easy to conflate:

MemorySkills (Lesson 11)
StoresFacts, preferences, contextReusable procedures
Answers”What does the agent know about me?""What can the agent do, reliably, that it’s done before?”
Grows viaOrdinary conversationExplicit teaching (/learn) or the agent’s own skill-writing
LocationSQLite FTS5 store~/.hermes/skills/ (plain files)

Both are part of the “closed learning loop” from Lesson 1’s architecture diagram, but they answer different questions. Memory is about knowing; skills are about doing. You’ll build with skills directly in the next lesson.

Exercise: have a short conversation with Hermes about a real project you’re working on, mentioning at least one specific preference (e.g. “always show me diffs before applying changes”). Start a new session (hermes fresh, not --continue) and ask “what do you know about my project and how I like to work?” Confirm it recalls what you told it, that round trip is the entire memory system working as intended.

Knowledge Check

3 questions to test your understanding

1 Why isn't 'just use a model with a huge context window' a substitute for Hermes' persistent memory system?

2 What is the practical difference between FTS5 cross-session recall and LLM summarization within Hermes' memory system?

3 You ask Hermes to forget everything it has learned about a specific project. Is this a memory operation or a skills operation?

Go further with expert guidance

Ready to build production AI?
Talk to our R&D team.

These courses give you the foundation. Our embedded AI teams take you from prototype to production in 30–90 days, with your team, your codebase, your goals. Book a free strategy call to see how we can accelerate your AI initiative.

30 minutes · No obligation · Expert AI engineers, not sales reps

AI Architecture Review

Audit your current stack and identify high-impact improvements

Project Review

Get expert feedback on your AI implementation and codebase

Team Mentoring

Upskill your engineers with hands-on AI coaching sessions

AI Strategy

Define your AI roadmap, prioritization, and implementation plan