What problem does it solve?
Golem agents process invocations sequentially, so a single agent cannot run work in parallel. This Skill shows how to distribute concurrent work across multiple agent instances in a Rust Golem project and aggregate the results.
Core Features & Use Cases
- Child Agent Fan-Out: Spawn child agents via
AgentClient::get(id), dispatch work concurrently, and collect results using Join or TryJoin from the futures-concurrency crate.
- Promise-Based Coordination: Trigger fire-and-forget child agents and collect results asynchronously through Golem promises with
create_promise, await_promise, and complete_promise.
- Fork-Based Parallelism: Clone the current agent with
fork() so forked copies inherit state, then synchronize via promises for multi-way parallel execution.
- Error Handling Strategies: Short-circuit on the first failure with
TryJoin, or collect partial successes and failures per item with Join.
- Use Case: A coordinator agent receives a list of regions, spawns one worker agent per region to generate reports in parallel, and returns the combined results to the caller.
Quick Start
Ask the AI to implement a fan-out pattern in your Rust Golem project that spawns child agents for each work item and collects their results concurrently.