golem-configure-durability-scala

Configure durable, ephemeral, and snapshot-based persistence modes for Scala Golem agents.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about golem-configure-durability-scala

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

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

Golem agents are durable by default with no extra code needed. To change the mode, use the @agentDefinition annotation with mode = DurabilityMode.Ephemeral for stateless agents, or add snapshotting parameters for long-running durable agents.

Durable vs ephemeral agents in Golem: which should I use?

Use durable mode (the default) for stateful agents like counters, carts, and workflow orchestrators where state must survive failures. Use ephemeral mode for stateless request processors and pure computations that do not need persistence.

How do I prevent oplog growth in long-running Golem agents?

Configure periodic snapshots with @agentDefinition(snapshotting = "every(10)") or "periodic(30s)". Recovery then starts from the latest snapshot instead of replaying the full oplog, keeping recovery fast for agents with heartbeats or polling loops.

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 is a concern, use durable mode with periodic snapshots instead of trying to skip persistence.

When should I use ephemeral mode for Golem agents?

Use ephemeral mode for stateless, per-invocation agents such as pure functions, request handlers, or adapters. State is discarded after each invocation and no oplog is maintained, reducing overhead when persistence is not needed.