golem-retry-policies-rust

Configures composable retry policies for Rust Golem agents via manifest, SDK, and CLI.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Transient failures in HTTP calls, RPC, and database operations require consistent retry behavior, and this Skill shows how to define, apply, and manage semantic retry policies for Rust Golem agents without redeploying code.

Core Features & Use Cases

  • Manifest-Based Policies: Define named retry policies with priorities, predicates, and composable strategies (exponential, fibonacci, jitter, countBox, timeBox) in golem.yaml per environment.
  • Runtime SDK Control: Build and apply policies from agent code using golem_rust::retry, including scoped usage with with_named_policy and querying active policies.
  • Live CLI Management: Create, update, list, and delete retry policies at runtime with the golem retry-policy commands, taking effect immediately.
  • Use Case: An agent making outgoing HTTPS requests can apply a policy that retries only transient 5xx responses with exponential backoff clamped to [100ms, 5s] and 15% jitter, while a catch-all policy handles everything else.

Quick Start

Ask the AI to configure a retry policy in golem.yaml that retries transient HTTPS errors up to 5 times with exponential backoff and jitter for a Rust Golem agent.

Frequently Asked Questions about golem-retry-policies-rust

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

FAQPage Schema
How do I configure retry policies in Golem for a Rust agent?

Define named policies under retryPolicyDefaults in golem.yaml with a priority, predicate, and policy tree, or build them at runtime with golem_rust::retry using Policy::exponential and combinators like clamp, with_jitter, and max_retries.

How do I retry HTTP requests based on status codes in Golem?

Create a policy whose predicate explicitly references the status-code property, such as propIn with values [500, 502, 503, 504]. Status-code retries are opt-in, so catch-all policies with a true predicate are intentionally excluded.

Can I change Golem retry policies without redeploying my agent?

Yes, use the golem retry-policy CLI commands to create, update, get, list, and delete policies at runtime. Changes take effect immediately for running agents in the current environment.

What is the default retry policy in Golem when none is defined?

Golem activates a built-in catch-all policy named default with priority 0 and a true predicate. It retries up to 3 times with exponential backoff at factor 3.0, delays clamped to [100ms, 1s], and 15% jitter.

Why is my status-code retry policy not applying to trap errors?

Predicates only match properties present in the current error context. The status-code property exists only for outgoing HTTP responses, so trap contexts silently skip that policy; design separate policies per context.