What problem does it solve?
When a durable Golem agent crashes between two external side effects (like reserving inventory and charging a payment), recovery can leave the system in an inconsistent half-done state. This Skill explains how to use Golem's Rust durability APIs to group external effects for replay, control idempotency behavior, and manage oplog replication.
Core Features & Use Cases
- Atomic Blocks: Wrap multiple external side effects with
atomically or atomically_async so the whole group replays together after a crash.
- Idempotence Mode Control: Opt out of the default idempotent HTTP behavior with
with_idempotence_mode(false, ...) for non-idempotent calls.
- Oplog Commit and Idempotency Keys: Use
oplog_commit to wait for replica replication and generate_idempotency_key for exactly-once external API calls.
- Use Case: An order-processing agent must reserve inventory and charge a customer; wrapping both calls in
atomically ensures recovery re-runs both together instead of skipping the reservation.
Quick Start
Show me how to wrap an inventory reservation and a payment charge in an atomic block in my Rust Golem agent so both replay together after a crash.