Four-tier memory architecture: curated semantic base, daily episodic streams, session handoffs, and procedural correction logs.
MEMORY πΎ Semantic Base
Curated, durable long-term facts, environment constants, and verified rules distilled from logs.
Purpose
Single source of truth for facts that persist across sessions and survive context compression.
Structure
memory:
user_preferences:
- model: "nvidia/nemotron-3-ultra-550b-a55b:free"
- fallback: "owl-alpha+openrouter/free"
- dashboard: "svelte-flexiboards + Discord"
environment_facts:
- hugo_path: "~/hugo-llm-wiki/"
- cron_env_isolation: true
- duckduckgo_blocked: true
verified_rules:
- "Always source ~/.hermes/.env in cron jobs"
- "Load skill before answering when relevant"
- "Patch skills immediately when issues found"Write Protocol
- Trigger β User correction, explicit βremember thisβ, discovered environment fact
- Validate β Cross-reference with existing memory; reject contradictions
- Condense β Single declarative fact, no instructions
- Persist β
memory(action='add', target='memory', content=...)
Read Protocol
- Injected automatically into every turn
- Compact format:
key: valuepairs - Priority: user preferences > environment facts > procedural rules
YYYY-MM-DD π Episodic Stream
Daily chronological append-only scratchpads capturing volatile session context and tool traces.
Format
~/hugo-llm-wiki/content/evolving/YYYY-MM-DD.md
Content Types
| Type | Prefix | Example |
|---|---|---|
| Session start | ## Session | ## Session 2026-06-07 14:32 |
| Tool trace | ### Tool | ### Tool: terminal β hugo build |
| Decision | ### Decision | ### Decision: Use Svelte 5 runes |
| Observation | ### Obs | ### Obs: Vite HMR caches stale files |
| Error | ### Error | ### Error: 429 rate limit on OpenRouter |
| Session end | ## Summary | ## Summary: Deployed v0.6.0 |
Retention
- Hot (0-7 days): Full detail, injected in context
- Warm (8-30 days): Summarized, searchable via
session_search - Cold (30+ days): Archived, only major decisions retained
Automation
Daily cron (llm-wiki-evolve) appends Research β Build β Deploy trace.
SESSION_LOG π Handoff Record
Summarized session records, commit pointers, and namespace metadata appended post-task.
Purpose
Enable seamless handoff between sessions, subagents, and human operator.
Format
## Session Log: <session_id>
**Goal**: <one-line objective>
**Duration**: <turns> turns, <minutes> min
**Outcome**: β
Complete / β οΈ Partial / β Failed
### Key Actions
- <action 1 with verifiable handle>
- <action 2 with verifiable handle>
### Artifacts Created
- File: `/path/to/file` (verified)
- PR: `#123` (merged)
- Deploy: `https://llm-wiki.0rk.de` (live)
### Memory Updates
- Added: <fact>
- Corrected: <fact>
### Blockers / Open Questions
- <blocker description>
- <question for next session>Storage
- Primary:
~/.hermes/logs/sessions/<session_id>.md - Index:
~/.hermes/state.db(SQLite, session_search FTS5)
FEEDBACK-LOG π Procedural Corrections
Tracked mistakes, stylistic fixes, and lessons learned to prevent error looping.
Entry Schema
feedback_entry:
id: "FB-YYYYMMDD-XXX"
timestamp: "2026-06-07T14:32:00Z"
category: "tool_usage | communication | logic | workflow | config"
severity: "critical | high | medium | low"
mistake: "What went wrong"
correction: "What to do instead"
trigger: "What caused the mistake"
prevention: "Systemic fix (skill patch, memory add, checklist update)"
verified: false # Set true after next successful applicationCategories
| Category | Examples |
|---|---|
| tool_usage | Wrong tool, missing flags, background without notify |
| communication | Verbose, wrong tone, missed clarification |
| logic | False assumption, missed edge case, circular reasoning |
| workflow | Skipped skill load, forgot memory write, no verification |
| config | Wrong model, missing env, bad cron schedule |
Loop Prevention
- On error β Create FEEDBACK-LOG entry immediately
- On skill use β Check FEEDBACK-LOG for relevant entries first
- On session start β Review last 5 feedback entries
- Monthly β Audit unresolved entries; escalate patterns
Memory Flow Diagram
βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ
β SESSION ββββββΆβ YYYY-MM-DD ββββββΆβ SESSION_LOG ββββββΆβ MEMORY β
β (volatile) β β (episodic) β β (handoff) β β (semantic) β
βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ
β β β β
βΌ βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FEEDBACK-LOG β
β (cross-cutting correction layer) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Cross-References
- Identity Anchors β SALIENCE prioritizes what enters MEMORY
- Orchestration β AGENTS reads SESSION_LOG for handoff
- Autonomic β HEARTBEAT prunes YYYY-MM-DD on schedule
- Spec-Driven β PLAN derives from SESSION_LOG outcomes
Mutable Memory is the only layer designed for continuous automatic evolution. The system rewrites itself daily.