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 management and URL routing. This Skill shows how to generate temporary public webhook URLs and durably suspend a Scala agent until the external system POSTs back.
Core Features & Use Cases
- Webhook Creation: Generate a one-time public URL via
HostApi.createWebhook() backed by a Golem promise.
- Durable Suspension: The agent consumes no resources while waiting and survives failures, restarts, and updates.
- Flexible Awaiting: Use
awaitBlocking() for synchronous flows or await() for Future-based async patterns.
- Payload Decoding: Decode POST bodies as JSON with
zio.blocks.schema.Schema or access raw bytes.
- Use Case: Register a callback URL with a payment gateway, suspend the agent, and resume processing when the payment confirmation POST arrives.
Quick Start
Add a webhook to my Scala Golem agent that creates a callback URL, shares it with an external service, and waits for the POST payload.