Hermes Agent — Memory Architecture

Persistent, composable, multi-layered memory system with built-in, holographic, and pluggable external providers

User Message Telegram/Discord/CLI/Cron MemoryManager .prefetch_all(query) query Built-in Memory (Always-On Context) Injected into system prompt every turn MEMORY.md ~/.hermes/memories/ 2,200 char limit Static, always injected USER.md ~/.hermes/memories/ 1,375 char limit User profile, prefs Also injected: SOUL.md, Skills, Config Holographic Memory (Structured Facts) HRR vectors + Trust scoring + Entity resolution • SQLite fact_store tool Actions: • add • search • probe • related • reason • contradict • update • remove • list fact_feedback Train trust scores helpful / unhelpful Rises good facts Sinks bad facts Storage: ~/.hermes/memory_store.db (SQLite + WAL) External Providers (Pluggable) Only ONE active at a time • MemoryProvider ABC Honcho honcho.dev Session-based Team memory Mem0 mem0.ai Graph-based Entity graphs Hindsight · RetainDB · Byterover OpenViking · Supermemory · Custom plugins Merged Prefetch Context LLM API Call System Prompt + Prefetch + History + Tools + Model Response / Tool Calls (fact_store...) MemoryManager.sync_all() Post-turn persistence user_msg + assistant_msg Built-in: Manual only (memory tool) Holographic: fact_store (no auto-sync) External: sync_turn() + on_session_end() Mirror: on_memory_ write() → facts Legend Built-in / Frontend Holographic / Database External / Security Backend / Sync Cloud / LLM Auth / Dashed Flow Security Group Region Boundary 📚 Official Documentation Memory → User Guide Configuration Reference Developer Guide GitHub Source Cron / Scheduler External Providers Holographic Plugin Source MemoryManager Source

Built-in Memory (MEMORY.md / USER.md)

  • • Static text files injected every turn
  • • Limits: 2,200 chars (MEMORY) / 1,375 (USER)
  • • Tool: memory (add/replace/remove)
  • • Path: ~/.hermes/memories/
  • • Survives session/service restarts
  • • Always-on context for identity, prefs, env facts
  • • Docs: Memory User Guide

Holographic Memory (fact_store)

  • • SQLite DB with HRR vectors + trust scoring
  • • Tool: fact_store (add/search/probe/reason)
  • • Tool: fact_feedback (helpful/unhelpful)
  • • Entity resolution, compositional queries
  • • Prefetch: top-k relevant facts per query
  • • Auto-extraction on session end (optional)
  • • Source: plugins/memory/holographic

External Providers (Pluggable)

  • • MemoryProvider ABC interface
  • • Only ONE active at a time
  • • Available: Honcho, Mem0, Hindsight, RetainDB, Byterover, OpenViking, Supermemory
  • • Configure: hermes memory setup
  • • Hooks: initialize, prefetch, sync_turn, on_session_end, on_memory_write
  • • Docs: External Providers

MemoryManager Orchestration

  • • Single integration point in run_agent.py
  • • prefetch_all(query) → merges all provider results
  • • sync_all(user, assistant) → post-turn persistence
  • • Handles context fencing + streaming scrubbing
  • • Source: agent/memory_manager.py
  • • Source: agent/memory_manager.py

Configuration (config.yaml)

  • • memory.memory_enabled: true
  • • memory.user_profile_enabled: true
  • • memory.memory_char_limit: 2200
  • • memory.user_char_limit: 1375
  • • memory.provider: holographic (or honcho, mem0, etc.)
  • • Plugin config: plugins.hermes-memory-store.*
  • • Docs: Configuration Reference

Data Flow Summary

  • 1. User message → MemoryManager.prefetch_all()
  • 2. Each provider returns relevant context
  • 3. Merged context → System prompt + History + Tools
  • 4. LLM responds (may call fact_store)
  • 5. MemoryManager.sync_all() persists turn
  • 6. External: sync_turn(), on_session_end()
  • 7. Mirror: built-in writes → holographic facts