Hermes Agent Sessions Pruning Guide (Do This NOW)
Video summary
Companion notes
Hermes agent's SQLite state DB grows to ~384 MB after 1,000 sessions, and the new session pruning is the only official fix.
Why pruning matters on VPS
Hermes logs every chat, tool call, and reset into a local SQLite file. A typical install with "around a,000 sessions" hits 384 MB, which "slows down the FTS5 inserts" and makes /resume listings sluggish. On a 1 vCPU / 2 GB RAM VPS the creator uses, this bloat manifests as unexplained CPU and memory spikes that look like rate-limit issues.
What pruning does and doesn't do
Pruning only deletes ended sessions — explicitly closed or auto-reset ones. Active sessions and ongoing projects are skipped, so you do not lose work. Two entry points exist: the Hermes dashboard → Config → Agent → Auto Prune toggle, or the CLI.
Recommended settings
- Toggle Auto Prune ON in the dashboard. The creator considers the default retention of 7 days "a little bit too short" and recommends extending it to 30 or 90 days.
- Auto-prune "runs at startup and checks at almost like every 24 hours," so there is "zero performance hit while you're working."
- Enable vacuum after prune = true in
config.yaml(or the dashboard) to reclaim disk space, not just empty rows.
Manual CLI workflow
1. Run hermes sessions prune --dry-run to preview what gets deleted (default age is 90 days). The creator's preview listed four ended DeepSeek V4 Pro sessions. 2. To narrow the window, pass a threshold: hermes sessions prune --older-than 30 (days) or hermes sessions prune --newer-than 5 (hours). 3. Run the command without --dry-run once satisfied. Avoid querying the SQLite DB directly — "this quite inconvenient."
Memory offload alternative
If you use the Honcho memory provider instead of pure SQLite, much of this bloat is avoided upstream — but pruning still applies to the sessions table that remains local.
Watch on YouTube
Prefer the native player? Open it on YouTube: https://www.youtube.com/watch?v=-D_rim6Wd4U
