A single agent with dozens of tools and schemas becomes slow, expensive and error-prone. AI Fusion 3 lets you split the work: a main agent owns the conversation, and sub-agents specialize in a domain — credit cards, loans, payroll — each with only the tools, skills and rules of that domain.
The main agent reaches a sub-agent in one of two ways:
task — the sub-agent works on a sub-task and returns its result to the main agent, which continues and writes the answer.delegate — the main agent hands the whole turn to the sub-agent, whose reply goes to the user as the final answer.Create a YAML file under the agent's Subagents/ folder (in Studio: New Sub-Agent…). It uses the same schema as agent.yaml:
AI/Agents/banking/
├── agent.yaml
└── Subagents/
├── credit-card.yaml
├── dda.yaml
└── loan.yaml
# Subagents/credit-card.yaml
description: "Credit cards — cards, statements, payments, transactions; tools: getCreditScore, updateCreditCardLimit, getAPRforCreditScore"
system_prompt: |
# Credit Card Specialist
You handle credit card questions and operations for one customer ...
constraints: |
Never set a credit limit above the maximum the customer's credit score allows.
hooks:
step_start: LoadCustomerScope
tools:
- query
- getCreditScore
- updateCreditCardLimit
- getAPRforCreditScore
skills:
- credit-card-schema:
auto_load: true
Folder sub-agents are discovered and enabled automatically. They inherit the parent's settings key by key (a value in the sub-agent wins). Planning is not available to sub-agents.
A top-level agent of another Data Product can be used as a sub-agent by linking it:
sub_agents:
- name: support
lu: customer_crm # a top-level agent in another LU
A linked agent runs with its own definition and settings (it does not inherit the caller's settings).
Use sub_agents: to change the discovered set:
sub_agents:
- name: payroll
enabled: false # mute a folder sub-agent
- name: credit-card
invoke: delegate # accept only whole-turn handoffs
- name: dda
invoke: task # accept only sub-tasks
invoke is both (default), task or delegate. Calling a sub-agent by a route it does not accept fails with a message that names the allowed route. Broken references — a missing file or an unknown Data Product — fail the run, and Studio reports them in the Problems panel.

The runtime adds an ## Available Sub-Agents section to the main agent's prompt, listing each enabled sub-agent with its description, its required inputs (taken from its hook flows), and a [task only] or [delegate only] marker when relevant. Write sub-agent descriptions as routing hints: what the specialist covers and which operations it can perform.
task(task_id, goal, agent?, lu?, args?)
goal describes what the sub-agent must achieve; args passes values such as customerId.agent, task runs a copy of the main agent itself on a focused goal — useful for parallelizable or isolated sub-problems.task is the right route when the main agent needs the result to continue: comparing data from several domains, or executing the steps of a plan.ask_user). By default the turn pauses, and the user's answer goes back to that sub-agent — see When a Sub-Agent Asks the User. The calling agent can instead answer the question itself, or not let its sub-agents ask — see Choosing Who Answers.task without agent) cannot ask the user: it is not offered ask_user, because nothing of its run is kept for an answer to resume.
delegate: true
delegate(agent, goal, lu?, args?)
ask_user), the question is shown to the user, and the next message resumes the same sub-agent — see When a Sub-Agent Asks the User.delegate is off by default and is offered only when delegate: true is set and at least one enabled sub-agent accepts the delegate route.Use delegate for a single, self-contained request that one specialist can complete end-to-end ("raise my card limit to 8,000"). Use task when the main agent must combine results or follow a plan.

From AI Fusion 3.0.9, any named sub-agent — on the task or the delegate route, at any nesting depth — and the planner can ask the user a question. This section describes the default behavior; for task sub-agents you can change it with subagent_questions (below). The answer goes back to the sub-agent that asked, which continues with its own history instead of starting again.
Requirements and fallbacks:
observability must be on (the default) for every agent in the chain, because the sub-agent's history is read back from the session.task route, the related to-do is marked failed.From AI Fusion 3.0.10, the top-level subagent_questions key of an agent decides what happens when a sub-agent it calls with task asks a question:
subagent_questions: answer # propagate (default) | answer | none
Use answer or none for an agent that has nobody to ask, such as an agent called through the REST API or from a flow. With the default, such a caller gets a question instead of a result.
Rules and limits:
ask_user — is stopped, and its to-do is marked failed. On the next turn the agent has to call a new sub-agent.task route. Sub-agents reached with delegate, and the planner, always ask the user. A copy of the agent run by task without a named agent never asks.answer.ask_user is independent: turning it off does not stop its sub-agents from asking.subagent_questions is a top-level key, so it is not inherited by folder sub-agents. A sub-agent that calls sub-agents of its own sets it in its own file.Two keys control what reaches the user, and they travel differently between agents:
Put style in response_prompt and hard rules in constraints. A rule written in the style section is dropped as soon as the turn is delegated.
Sub-agents usually need the same entity as the main agent. Their required inputs come from their hook flows (for example LoadCustomerScope declares customerId). The runtime fills them from:
args passed in the task or delegate call.initParams), which are forwarded automatically.Values passed by the LLM in args can override forwarded inputs. When a flow must rely on a value the LLM cannot change, read it with the AgentInitParams actor — see Hooks and Agent Inputs.
task result is read by the main agent; ask specialists to return facts and the IDs needed for the next step. Although a task sub-agent can ask the user, it is usually better for it to report a missing input (for example as a result that starts with MISSING:) and let the main agent, which owns the conversation, ask.enabled: false rather than deleting files while experimenting.Next article: Hooks and Agent Inputs
A single agent with dozens of tools and schemas becomes slow, expensive and error-prone. AI Fusion 3 lets you split the work: a main agent owns the conversation, and sub-agents specialize in a domain — credit cards, loans, payroll — each with only the tools, skills and rules of that domain.
The main agent reaches a sub-agent in one of two ways:
task — the sub-agent works on a sub-task and returns its result to the main agent, which continues and writes the answer.delegate — the main agent hands the whole turn to the sub-agent, whose reply goes to the user as the final answer.Create a YAML file under the agent's Subagents/ folder (in Studio: New Sub-Agent…). It uses the same schema as agent.yaml:
AI/Agents/banking/
├── agent.yaml
└── Subagents/
├── credit-card.yaml
├── dda.yaml
└── loan.yaml
# Subagents/credit-card.yaml
description: "Credit cards — cards, statements, payments, transactions; tools: getCreditScore, updateCreditCardLimit, getAPRforCreditScore"
system_prompt: |
# Credit Card Specialist
You handle credit card questions and operations for one customer ...
constraints: |
Never set a credit limit above the maximum the customer's credit score allows.
hooks:
step_start: LoadCustomerScope
tools:
- query
- getCreditScore
- updateCreditCardLimit
- getAPRforCreditScore
skills:
- credit-card-schema:
auto_load: true
Folder sub-agents are discovered and enabled automatically. They inherit the parent's settings key by key (a value in the sub-agent wins). Planning is not available to sub-agents.
A top-level agent of another Data Product can be used as a sub-agent by linking it:
sub_agents:
- name: support
lu: customer_crm # a top-level agent in another LU
A linked agent runs with its own definition and settings (it does not inherit the caller's settings).
Use sub_agents: to change the discovered set:
sub_agents:
- name: payroll
enabled: false # mute a folder sub-agent
- name: credit-card
invoke: delegate # accept only whole-turn handoffs
- name: dda
invoke: task # accept only sub-tasks
invoke is both (default), task or delegate. Calling a sub-agent by a route it does not accept fails with a message that names the allowed route. Broken references — a missing file or an unknown Data Product — fail the run, and Studio reports them in the Problems panel.

The runtime adds an ## Available Sub-Agents section to the main agent's prompt, listing each enabled sub-agent with its description, its required inputs (taken from its hook flows), and a [task only] or [delegate only] marker when relevant. Write sub-agent descriptions as routing hints: what the specialist covers and which operations it can perform.
task(task_id, goal, agent?, lu?, args?)
goal describes what the sub-agent must achieve; args passes values such as customerId.agent, task runs a copy of the main agent itself on a focused goal — useful for parallelizable or isolated sub-problems.task is the right route when the main agent needs the result to continue: comparing data from several domains, or executing the steps of a plan.ask_user). By default the turn pauses, and the user's answer goes back to that sub-agent — see When a Sub-Agent Asks the User. The calling agent can instead answer the question itself, or not let its sub-agents ask — see Choosing Who Answers.task without agent) cannot ask the user: it is not offered ask_user, because nothing of its run is kept for an answer to resume.
delegate: true
delegate(agent, goal, lu?, args?)
ask_user), the question is shown to the user, and the next message resumes the same sub-agent — see When a Sub-Agent Asks the User.delegate is off by default and is offered only when delegate: true is set and at least one enabled sub-agent accepts the delegate route.Use delegate for a single, self-contained request that one specialist can complete end-to-end ("raise my card limit to 8,000"). Use task when the main agent must combine results or follow a plan.

From AI Fusion 3.0.9, any named sub-agent — on the task or the delegate route, at any nesting depth — and the planner can ask the user a question. This section describes the default behavior; for task sub-agents you can change it with subagent_questions (below). The answer goes back to the sub-agent that asked, which continues with its own history instead of starting again.
Requirements and fallbacks:
observability must be on (the default) for every agent in the chain, because the sub-agent's history is read back from the session.task route, the related to-do is marked failed.From AI Fusion 3.0.10, the top-level subagent_questions key of an agent decides what happens when a sub-agent it calls with task asks a question:
subagent_questions: answer # propagate (default) | answer | none
Use answer or none for an agent that has nobody to ask, such as an agent called through the REST API or from a flow. With the default, such a caller gets a question instead of a result.
Rules and limits:
ask_user — is stopped, and its to-do is marked failed. On the next turn the agent has to call a new sub-agent.task route. Sub-agents reached with delegate, and the planner, always ask the user. A copy of the agent run by task without a named agent never asks.answer.ask_user is independent: turning it off does not stop its sub-agents from asking.subagent_questions is a top-level key, so it is not inherited by folder sub-agents. A sub-agent that calls sub-agents of its own sets it in its own file.Two keys control what reaches the user, and they travel differently between agents:
Put style in response_prompt and hard rules in constraints. A rule written in the style section is dropped as soon as the turn is delegated.
Sub-agents usually need the same entity as the main agent. Their required inputs come from their hook flows (for example LoadCustomerScope declares customerId). The runtime fills them from:
args passed in the task or delegate call.initParams), which are forwarded automatically.Values passed by the LLM in args can override forwarded inputs. When a flow must rely on a value the LLM cannot change, read it with the AgentInitParams actor — see Hooks and Agent Inputs.
task result is read by the main agent; ask specialists to return facts and the IDs needed for the next step. Although a task sub-agent can ask the user, it is usually better for it to report a missing input (for example as a result that starts with MISSING:) and let the main agent, which owns the conversation, ask.enabled: false rather than deleting files while experimenting.Next article: Hooks and Agent Inputs