What problem does it solve?
Receiving asynchronous callbacks from external services (payment gateways, CI/CD systems, GitHub, Stripe) inside a durable Golem agent normally requires manual promise handling and public URL plumbing. This Skill shows how to generate a temporary public webhook URL, share it with an external system, and durably suspend the agent until the callback arrives.
Core Features & Use Cases
- Webhook Creation: Use
create_webhook() from the golem_rust crate to create a promise-backed webhook and obtain its public URL via WebhookHandler::url().
- Durable Suspension: Await the
WebhookHandler to suspend the agent with zero resource consumption until an external service POSTs to the URL.
- Payload Decoding: Decode the incoming POST body as JSON with
WebhookRequestPayload::json::<T>() or access raw bytes with raw_data().
- URL Customization: Configure webhook URL prefixes via
webhookUrl in golem.yaml and suffixes via webhook_suffix on #[agent_definition].
- Use Case: Build an order agent that registers a callback URL with a payment gateway, suspends until the payment confirmation POST arrives, then records the event.
Quick Start
Add a webhook to my Rust Golem agent that creates a callback URL, waits for an external service to POST a JSON event to it, and stores the received payload.