Workers Toolset¶
The Workers toolset creates tools that delegate tasks to other agents or teams in the pool. Each configured worker becomes an ask_<name> tool that the agent can use.
Overview¶
Workers allow building hierarchies where a manager agent can delegate specialized tasks to worker agents or teams. This is useful for:
- Task specialization: Different agents handle different domains
- Parallel processing: Delegate multiple tasks to workers
- Team coordination: Use entire teams as workers for complex tasks
Basic Usage¶
agents:
manager:
tools:
- type: workers
workers:
- name: code_reviewer
type: agent
- name: researcher
type: agent
pass_message_history: true
This creates tools ask_code_reviewer and ask_researcher for the manager agent.
Toolset Configuration¶
Workers Toolset¶
Configuration for worker agent tools.
Workers are agents or teams registered as tools for the parent agent. This provides a predefined set of worker tools based on configuration.
Worker Types¶
Agent Workers¶
Standard agents with history management options:
tools:
- type: workers
workers:
- name: helper_agent
type: agent
reset_history_on_run: true # Clear history before each run (default)
pass_message_history: false # Don't share parent's context (default)
| Option | Default | Description |
|---|---|---|
reset_history_on_run |
true |
Clear worker's conversation history before each run |
pass_message_history |
false |
Pass parent agent's message history to worker |
Team Workers¶
Use entire teams as workers:
Team workers return formatted output with all team member responses.
ACP Agent Workers¶
Use external ACP-compatible agents (Claude Code, Gemini CLI, etc.):
AG-UI Agent Workers¶
Use remote AG-UI protocol servers:
Worker Configuration Reference¶
Example: Manager with Specialized Workers¶
agents:
code_expert:
model: openai:gpt-4o
system_prompt: "You are a code review specialist."
research_expert:
model: openai:gpt-4o
system_prompt: "You are a research specialist."
manager:
model: openai:gpt-4o
system_prompt: "You coordinate tasks between specialists."
tools:
- type: workers
workers:
- name: code_expert
type: agent
- name: research_expert
type: agent
pass_message_history: true # Share context with researcher