What problem does it solve?
Choosing the wrong persistence mode for a Golem agent leads to unnecessary oplog overhead, slow recovery from failures, or lost state. This Skill guides Rust developers through selecting and configuring durable, snapshot-based, or ephemeral agent modes so state management matches the workload.
Core Features & Use Cases
- Durable Agents by Default: Explains how Golem automatically records every side effect in an oplog and transparently recovers agents by replaying it, with no extra code required.
- Periodic Snapshots: Shows how to add
snapshotting = "every(10)" or snapshotting = "periodic(30s)" to the #[agent_definition] attribute so long-running agents with heartbeats or polling loops recover from the latest snapshot instead of replaying the full oplog.
- Ephemeral Agents: Demonstrates the
#[agent_definition(ephemeral)] attribute for stateless, per-invocation agents like request handlers and pure functions where no persistence is needed.
- Use Case: You have a long-running workflow agent that polls an external API every minute. Instead of letting its oplog grow unboundedly, you configure periodic snapshots so recovery stays fast while durability guarantees remain intact.
Quick Start
Ask the AI to configure my Rust Golem agent to use durable mode with periodic snapshots every 30 seconds because it runs a recurring polling task.