Skip to main content

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โ€‹

SettingTypeDefaultDescription
enabledboolfalseEnable the delegation provider
verbosebooltrueInclude detailed behavioral guidance in tool description and system prompt
include_in_promptbooltrueInject delegation instructions into the system prompt
extra_instructionsstr or nullnullAppend additional delegation guidance
tool_descriptionstr or nullnullFully replace the default tool description
allow_llm_selectionboolfalseLet the agent pick the target agent's LLM by name, within its allowed names
sub_agent_approvalsask, decline, runaskWhat a delegated agent does with a tool call that needs the user's approval, see Approvals in delegated agents

The delegate Toolโ€‹

When enabled and agents are available, the provider exposes a single tool:

ToolDescription
delegateRoute 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.

ParameterTypeDescription
agentstring (enum)The name of the agent to delegate to
descriptionstringA short (3โ€“5 word) label for the task
promptstringA detailed, self-contained task description
llm_configuration_namestring (optional)Named LLM configuration for the target agent; present only when allow_llm_selection is on

The target agent runs in isolated context: it receives the task prompt and what the user attached to the chat (documents, tags, the file open next to the Office panel), 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โ€‹

SourceCLI nameDescription
In-Memory Agentsin-memory-agentsStatic 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โ€‹

SettingTypeDefaultDescription
agentslist[DelegableAgent][]The list of agents available for delegation

Each agent entry has:

FieldTypeDescription
agent_identifierstrThe identifier used to create the agent
namestrShort display name shown to the LLM in the enum
descriptionstrOne-line description of the agent's specialization
bot_paramsdict or nullRuntime bot_params passed to the agent factory
allow_llm_selectionbool or nullPer-agent override of the provider's allow_llm_selection
sub_agent_approvalsask, decline, run or nullPer-agent setting, which can only be stricter than the provider's

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 the task prompt and what the user attached to the chat, not the parent conversation.
  • By default a delegated agent gets no delegate tool, and delegate and task share one budget per turn, counted across every agent the turn starts: see Sub-Agent Limits.
  • Protected parameters (tenant, auth headers, index configuration) are carried through automatically.

Approvals in delegated agentsโ€‹

A delegated agent's tool call can need the user's approval (see Tool rules). sub_agent_approvals decides what happens:

ValueEffect
ask (default)The approval card appears in the user's chat and the delegated agent waits for the decision
declineThe call is declined and the delegated agent is told no approval is available
runThe call runs without asking

Order of strictness is run, ask, decline. A delegation can only tighten the setting: a per-agent value looser than the provider's is ignored, and an agent a delegated agent delegates to is at least as strict as its parent. sub_agent_approvals comes from the agent setup only; a request's bot_params cannot set it. The task tool has the same setting.

Looking for anonymous sub-agents?

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.