Memory

Retention

Rules for how long knowledge, transcripts, files, and memory should remain available.

Retention

What it is

Rules for how long knowledge, transcripts, files, and memory should remain available.

In plain terms

Different shelves in a fridge carry different expiration dates - milk a week, leftovers a few days, preserves for months. Hermes treats its own storage the same way: a scratch file, a cron job’s output log, and a finished chat session are each timed to expire on their own schedule rather than sitting around forever by default.

Why it matters

Privacy asks what’s allowed to be kept; retention asks a different question — how long it should stay before getting pruned. Transcripts, memory records, and generated files each need their own answer, since a cron job’s daily log has nothing like the useful lifespan of a curated long-term memory fact. Skip explicit retention policy and a personal wiki or memory store simply grows without bound, eventually undermining the selectivity curation was supposed to provide.

How it works

A dedicated disk-cleanup plugin (plugins/disk-cleanup/disk_cleanup.py) tracks ephemeral files by category and age: test files are deleted at session end, temp files after 7 days, cron output after 14 days, and research downloads older than 30 days are flagged for review except the 10 most recently added, which are left alone - all scoped strictly to HERMES_HOME plus /tmp/hermes-*, never touching logs. Separately, config settings govern longer-lived state: the filesystem-checkpoint feature (off by default) defaults its retention_days to 7 with auto-pruning on once a user enables it, while sessions.retention_days defaults to 90 but auto-pruning there is off by default, since session history feeds search recall and silently deleting it could surprise a user. Curated memory itself follows neither clock - it is bounded by the character limit described under knowledge curation, not by age.

A concrete example

A cron job writes its daily output to cron/output/ and that file is auto-deleted once it passes 14 days old. A finished chat session sits in state.db past the 90-day retention_days mark, but nothing happens to it unless the user has explicitly turned on sessions.auto_prune - Hermes never silently discards conversation history. Meanwhile a fact in MEMORY.md about the user’s preferred deploy process just stays put, since it is governed by curation and a char budget rather than an expiry date.

How it connects

This note belongs to the Memory family. Its closest neighboring concepts are: Knowledge Curation, Privacy, Agent Runtime, Personal OS.

Source evidence

  • vendor/hermes-agent/agent/memory_manager.py:505-515#MemoryManager.prefetch_all — Verified Source Map evidence for MemoryManager. MemoryManager calls prefetch on each registered provider in order, skips empty results, isolates individual provider failures, and merges the remaining text.

Workflows

  • Slack Second Brain
  • No article currently mentions this concept by name/alias often enough to qualify (see mention-mining policy).