What problem does it solve?
Choosing the wrong persistence mode for a Golem agent leads to unbounded oplog growth, slow recovery from failures, or unnecessary overhead for stateless workloads. This Skill guides you through selecting and configuring the right durability mode for Scala agents.
Core Features & Use Cases
- Durable Agents (Default): State persists across invocations and failures via automatic oplog recording and replay, with no extra code required.
- Periodic Snapshots: Configure
snapshotting = "every(10)" or "periodic(30s)" so long-running agents with heartbeats or polling loops recover from the latest snapshot instead of replaying the full oplog.
- Ephemeral Agents: Use
DurabilityMode.Ephemeral for stateless, per-invocation agents like request handlers and pure computations where no oplog is maintained.
- Use Case: You have a long-running Scala agent that polls an external API every 30 seconds. Instead of letting the oplog grow forever, apply periodic snapshotting so recovery stays fast while durability guarantees remain intact.
Quick Start
Ask the assistant to configure durability mode for a Scala Golem agent, for example by making a heartbeat agent durable with periodic snapshots every 30 seconds.