What problem does it solve?
Golem agents calling external APIs, LLMs, or shared resources can exceed rate limits, storage budgets, or connection capacity. This Skill shows how to define and enforce distributed resource quotas across all agents in a Golem deployment using the golem_rust::quota module.
Core Features & Use Cases
- Resource Definition in golem.yaml: Declare Rate, Capacity, and Concurrency limits per environment with reject, throttle, or terminate enforcement actions.
- QuotaToken Reservations: Acquire a QuotaToken once, then use with_reservation or manual reserve/commit to consume tokens, including variable-cost reservations such as LLM token usage.
- Token Splitting for Agent RPC: Split quota tokens to pass to child agents and merge returned tokens back, enabling quota-aware agent-to-agent calls.
- Use Case: An agent calling a third-party API limited to 100 requests per minute defines a Rate resource in golem.yaml, acquires a QuotaToken in its constructor, and wraps each API call in with_reservation so Golem enforces the limit across every running agent replica.
Quick Start
Add a rate-limited resource to my Golem Rust agent so calls to an external API never exceed 100 requests per minute.