Subagents
Subagents enable your agents to communicate and collaborate with each other. This allows complex tasks to be divided and specialized agents to be used for specific subtasks. Instead of using a single agent for all tasks, you create teams of specialized agents that work together: a coordinator agent receives requests and delegates them to specialist agents that process specific tasks and return results.
Use cases
In task specialization, different agents take on different roles – for example, a sales agent for sales questions, a support agent for technical problems, and a coordinator that forwards requests to the right specialist.
In multi-step processes, complex workflows are broken down into substeps: a request agent collects information, an analysis agent evaluates the data, and an action agent carries out the appropriate measures.
In quality control, one agent checks the work of another: a primary agent creates an answer, a quality assurance agent reviews and improves it.
Configuration
To use an agent within another, open the coordinating agent, switch to the Agents section, and add the other agent there.
Activation required
Subagents must always be activated in the agent's edit screen. An assigned subagent only takes effect when it is switched on there.
Best practices
Define a clearly delineated task for each agent – overlaps lead to confusion. The description of an agent should clearly state when it should be used so that the coordinating agent makes the right choice. Avoid too much nesting (agent calls agent calls agent), as this increases complexity and costs.
Avoid infinite loops
Make sure that agents do not call each other in a loop.
Example: Customer service team
A coordinator agent analyzes the customer request and forwards it to the right specialist – sales questions to the sales agent, technical problems to the support agent, billing questions to the accounting agent. It does not answer questions itself, but delegates them intelligently.
You are a coordinator for our customer service team.
Your task:
- Analyze the customer request
- Forward it to the right specialist:
* Sales questions → Sales agent
* Technical problems → Support agent
* Billing questions → Accounting agent
You do not answer questions yourself, but delegate them intelligently.
Benefits of collaboration
Each agent can be optimally configured for its task (specialization). Since each agent has only one role, the prompts remain simple and understandable (clarity). Changes affect only the relevant agent (maintainability), and new specialists can be added easily (scalability).