golem-configure-durability-rust

Configure durable, snapshot-based, or ephemeral agent persistence modes in Rust Golem projects.

1.5k|212|Updated Nov 24, 2023
One-click install
npx skills add https://github.com/golemcloud/golem --skill golem-configure-durability-rust
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-configure-durability-rust
Source: https://github.com/golemcloud/golem/tree/main/golem-skills/skills/rust/golem-configure-durability-rust
Command: npx skills add https://github.com/golemcloud/golem --skill golem-configure-durability-rust

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about golem-configure-durability-rust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure agent durability in a Rust Golem project?

Golem agents are durable by default with no configuration needed; state persists across invocations and failures via the oplog. To change behavior, add attributes to #[agent_definition], such as ephemeral for stateless agents or snapshotting for faster recovery.

When should I use ephemeral vs durable agents in Golem?

Use durable mode (the default) for stateful agents like counters, shopping carts, and workflow orchestrators. Use ephemeral mode for stateless, per-invocation agents such as pure functions, request handlers, or adapters where persistence adds unnecessary overhead.

How do I reduce oplog replay time for long-running Golem agents?

Add periodic snapshots with #[agent_definition(snapshotting = "every(10)")] or snapshotting = "periodic(30s)". Recovery then starts from the latest snapshot instead of replaying the full oplog, which matters for agents with heartbeats, polling, or recurring tasks.

Can I disable oplog writes for a durable Golem agent?

No, you cannot opt out of oplog writes for a durable agent because the oplog is how durability works. If oplog volume or replay cost is a concern, use durable mode with periodic snapshots instead of trying to skip persistence.

Does Golem durability require extra code in Rust agents?

No, durability is automatic for standard agents defined with #[agent_definition] and #[agent_implementation]. Every side effect is recorded in the oplog and the agent is transparently recovered by replaying it after failures, with no special code needed.