Skip to main content

Module spawn_worker

Module spawn_worker 

Source
Expand description

spawn_worker tool: first-class coordinator-pattern delegation.

Unlike the lower-level sub_agent tool (which the LLM can use for arbitrary sub-tasks), spawn_worker is designed for the coordinator pattern where a lead agent explicitly delegates structured work to specialist workers.

Motivation: The old TeamOrchestrator approach required the LLM to write DELEGATE:<role>:<task> text strings, which were then parsed — a fragile, non-type-safe mechanism. spawn_worker gives the coordinator agent a proper JSON tool call to express delegation, eliminating text parsing entirely.

§Worker types

worker_typeSystem prompt focusTool access
generalGeneral-purposeFull (parent registry)
exploreRead-only researchread_file, list_dir, search_files, web_fetch
coderCode implementationFull
reviewerCode reviewread_file, list_dir, search_files
researcherExternal researchread_file, search_files, web_fetch

Structs§

SpawnWorkerTool
The spawn_worker tool — a first-class coordinator delegation mechanism.

Enums§

WorkerType
Named worker personality for coordinator-pattern delegation.