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 you through selecting and configuring durable, ephemeral, or snapshot-based durability for MoonBit agents so persistence behavior matches your workload.
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: Add
#derive.agent(snapshotting="every_n(10)") so recovery starts from the latest snapshot instead of replaying the full oplog, ideal for long-running agents with heartbeats or polling loops.
- Ephemeral Agents: Use
#derive.agent("ephemeral") for stateless, per-invocation handlers where persistence is not needed.
- Use Case: You have a long-running workflow orchestrator whose oplog has grown so large that recovery is slow. This Skill shows you to keep durable mode but enable periodic snapshots, then rebuild with
golem build.
Quick Start
Ask the AI to switch my MoonBit Golem agent to ephemeral mode or add periodic snapshots, then rebuild the project with golem build.