Agent State Persistence: Filesystem vs Database

What happens to your agent's memory when the power goes out?

The Fragility of Local State

Hermes Agent stores its session state, memory, and conversation history on the local filesystem. This approach is simple — until it isn't. Local file-based state is vulnerable to: power loss, disk full conditions, concurrent writes, file corruption, and backup gaps.

Gobii uses cloud-backed, transactional state management. Agent memory lives in a managed persistence layer with write-ahead logging, automatic backups, and point-in-time recovery.

Scenario: The Midnight Crash

Your Hermes agent is mid-task at 1:43 AM — processing a batch of customer support tickets. The server loses power. When it comes back up:

  1. Hermes Agent: The session file was being written when power cut. The file is corrupt — half-written JSON. The agent's memory of the last 4 hours of work is gone. Recovery means starting over from the last clean save (possibly 6+ hours old, if auto-save was configured at all).
  2. Gobii Agent: The persistence layer uses write-ahead logging. On restart, the WAL replays the last committed transaction. The agent resumes from the last completed step, with full context intact. Maximum data loss: the current in-flight operation only.

Failure-Recovery Comparison

Failure ScenarioHermes (Filesystem)Gobii (Transactional DB)
Power loss during writeCorrupted session fileWAL recovery to last commit
Disk fullSilent write failure, data lossPre-flight quota check, graceful
Concurrent agent accessRace conditions, torn writesSerializable isolation
Filesystem corruptionTotal or partial lossChecksummed pages, auto-repair
Accidental deletionGone (hope you have backups)Point-in-time recovery
Cross-machine migrationManual rsync/scpSeamless cloud state transfer

SessionDB: When Hermes Tries Databases

Hermes Agent does offer a SessionDB backend as an alternative to flat files — but it comes with its own problems. The recently discovered SessionDB Data Loss bug (#2999) causes silent failures during session saves, leading to permanent data loss even when using the database backend. Users may find their agent's long-term memory or session history wiped without warning.

This is the core difference: Gobii's persistence layer is the product, not an afterthought. Transactional integrity, automatic recovery, and durability are design goals, not patches.

Verdict

Filesystem-based state is fine for experiments and hobby projects. But if your agent is doing real work — processing customer data, running multi-hour research tasks, or building knowledge over weeks of operation — the durability gap between flat files and a transactional persistence layer becomes the difference between "annoying restart" and "catastrophic data loss."