How to Configure Delegation
๐ง Tools ยท ๐ Prompt
The delegation provider gives the agent a delegate tool for routing tasks to named specialized agents. Each delegation source contributes a set of available agents the LLM can choose from.
List and Enable Delegation Sourcesโ
za agents capabilities delegation-sources list
za agents capabilities delegation-sources configure <source-name>
Configure Provider Settingsโ
za agents capabilities delegation-sources settings
Provider Configurationโ
| Setting | Type | Default | Description |
|---|---|---|---|
enabled | bool | false | Enable the delegation provider |
verbose | bool | true | Include detailed behavioral guidance in tool description and system prompt |
include_in_prompt | bool | true | Inject delegation instructions into the system prompt |
extra_instructions | str or null | null | Append additional delegation guidance |
tool_description | str or null | null | Fully replace the default tool description |
The delegate Toolโ
When enabled and agents are available, the provider exposes a single tool:
| Tool | Description |
|---|---|
delegate | Route a task to a named specialized agent. The target agent runs in a fresh context and returns a text result. |
The LLM sees an enum of available agent names and picks the right one based on the user's request.
| Parameter | Type | Description |
|---|---|---|
agent | string (enum) | The name of the agent to delegate to |
description | string | A short (3โ5 word) label for the task |
prompt | string | A detailed, self-contained task description |
The target agent runs in isolated context โ it receives only the task prompt, not the parent conversation. It executes with its own tools and returns a single text result. The user cannot see the delegated agent's output directly; the calling agent must relay it.
Delegation Sourcesโ
| Source | CLI name | Description |
|---|---|---|
| In-Memory Agents | in-memory-agents | Static list of named agents defined in configuration |
In-Memory Agentsโ
A static list of named agents defined directly in configuration.
za agents capabilities delegation-sources configure in-memory-agents
Configurationโ
| Setting | Type | Default | Description |
|---|---|---|---|
agents | list[DelegableAgent] | [] | The list of agents available for delegation |
Each agent entry has:
| Field | Type | Description |
|---|---|---|
agent_identifier | str | The identifier used to create the agent |
name | str | Short display name shown to the LLM in the enum |
description | str | One-line description of the agent's specialization |
bot_params | dict or null | Runtime bot_params passed to the agent factory |
Write descriptions that include trigger phrases โ the LLM uses them to decide when to delegate:
{
"agent_delegation_provider_configuration": {
"enabled": true
},
"in_memory_delegable_agents_source_configuration": {
"enabled": true,
"agents": [
{
"agent_identifier": "research-agent",
"name": "research_agent",
"description": "Performs deep literature research with citations. Use for 'find papers about...', 'literature review', or 'what does the research say about...'"
},
{
"agent_identifier": "data-analyst",
"name": "data_analyst",
"description": "Analyzes datasets, creates charts, and computes statistics. Use for 'analyze this CSV', 'plot the trend', or 'summarize this data'."
}
]
}
}
How Delegation Worksโ
- The LLM sees the enum of available agents with their descriptions and picks the right one based on the user's request.
- Delegated agents run in isolated context โ they receive only the task prompt, not the parent conversation.
- Delegated agents can themselves delegate to other agents if they have delegation configured โ there is no hard recursion limit.
- Protected parameters (tenant, auth headers, index configuration) are carried through automatically.
The task tool (spawning anonymous sub-agents for parallel work) comes from the sub-agent tool source, not the delegation provider. See Tools โ Sub-Agent.