What problem does it solve?
Building workflows that must pause until an external event occurs—such as human approval, a webhook callback, or a signal from another agent—normally requires complex polling or state management. This Skill shows how to use Golem promises in Rust to durably suspend an agent, consuming no resources, until the promise is completed from outside.
Core Features & Use Cases
- Promise Creation and Awaiting: Create a promise with
create_promise, then block synchronously with blocking_await_promise or asynchronously with await_promise until it completes.
- JSON Helpers: Use
await_promise_json and complete_promise_json from golem_rust::json to exchange structured, serde-serializable data instead of raw bytes.
- External Completion via REST: Expose the promise's
oplog_idx so external systems can complete it through the Golem REST API endpoint /v1/components/{component_id}/workers/{agent_name}/complete.
- Use Case: Implement a human-in-the-loop approval workflow where an agent creates a promise, suspends, and resumes only after a human approves or rejects via an external UI or HTTP call.
Quick Start
Ask the AI to implement a Golem agent in Rust that creates a promise and waits for external approval before continuing its workflow.