golem-parallel-workers-ts

Distribute independent work across Golem agent instances and collect results.

Updated May 17, 2026
One-click install
npx skills add https://github.com/Rust-soham/golem-claw --skill golem-parallel-workers-ts-rust-soham
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-parallel-workers-ts
Source: https://github.com/Rust-soham/golem-claw/tree/main/packages/golem/.agents/skills/golem-parallel-workers-ts
Command: npx skills add https://github.com/Rust-soham/golem-claw --skill golem-parallel-workers-ts-rust-soham

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of slow, sequential agent execution by showing how to distribute independent work across multiple concurrent agent instances and then gather results.

Core Features & Use Cases

  • Child-agent fan-out / fan-in: Spawn multiple agent workers, run them concurrently (e.g., with Promise.all), and aggregate outputs into a single result set.
  • Chunked concurrency control: Batch many spawned workers to limit load while still achieving parallel throughput.
  • Durable async fan-out with promise collection: Use Golem promises to dispatch long-running work and collect results reliably.
  • fork()-based parallelism: Clone the current agent at the current execution point to run additional logic concurrently with shared state.

Quick Start

Ask an AI to show TypeScript Golem code that fans out a list of items to multiple worker agent instances in parallel, then aggregates all returned results into one array.

Frequently Asked Questions about golem-parallel-workers-ts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run parallel agent workers in TypeScript using a fan-out fan-in pattern?

You can implement parallel agent workers by spawning multiple Golem agent instances concurrently using Promise.all, then collecting and aggregating all returned outputs into a unified result set for fan-out fan-in workflows.

What is the best way to handle errors when spawning concurrent child agents?

The best way to handle errors in concurrent child agents is using Promise.allSettled for error isolation. This allows the parent workflow to collect results from all spawned workers without failing entirely if one child agent encounters an error.

How does fork-based parallelism work for shared agent state?

Fork-based parallelism works by cloning the current agent at its current execution point to run additional logic concurrently. This allows multiple branches to execute in parallel while maintaining access to the shared state of the original agent.

Can I use Golem promises to manage long-running concurrent workflows?

Yes, you can use Golem promises to manage long-running concurrent workflows by dispatching work with PromiseId-based trigger and await patterns. This provides durable async fan-out with reliable result collection and correct synchronization to avoid deadlocks.

How do I limit concurrency load when batching many spawned agent workers?

You can limit concurrency load through chunked concurrency control, which batches multiple spawned workers to restrict active instances while still achieving parallel throughput and aggregating outputs efficiently.