Retention
What it is
Configured lifecycle rules for selected sessions, filesystem checkpoints, and cleanup categories.
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 selected stored data should stay before being pruned. Session transcripts, filesystem checkpoints, and generated cron files have different useful lifespans, so each needs an explicit policy instead of one invented decision-level TTL.
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.
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.
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/hermes_cli/config.py#<file>— Structural Source Map fallback for hermes_cli/config.py. A core source file in the Runtime Configuration structure within Entry Surfaces and Configuration.file:plugins/disk-cleanup/disk_cleanup.py— Explicit Source Map scope boundary: The disk-cleanup plugin is outside the approved Core source projection.
Workflows
- Slack Second Brain
Related articles
- No article currently mentions this concept by name/alias often enough to qualify (see mention-mining policy).
