AI Sub-Agent
Enable hierarchical multi-agent workflows through delegation, specialization, and orchestrated agent compositions.
Enables sophisticated multi-agent architectures by delegating execution to specialized agentflows, supporting hierarchical compositions, task specialization, and orchestrated workflows.
Configuration
Connections
| Direction | Link Types |
|---|---|
| Incoming | DEFAULT, HANDOVER |
| Outgoing | DEFAULT |
Input Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Agent | Reference | Yes | Reference to target agentflow |
Choose a specific version of another agentflow, ensuring consistent behavior even as the target workflow evolves.
Multi-Agent Orchestration Patterns
Sub-Agents enable sophisticated delegation strategies that scale beyond single-agent capabilities. For foundational concepts and comparisons, see Multi-Agent Orchestration.
Orchestration Patterns Quick Reference
| Pattern | Best For | Complexity | Level | Setup Time | Agents Needed | Use When |
|---|---|---|---|---|---|---|
| Router Pattern | Domain routing | 🟢 Low | Beginner | 30 min | 3-5 | Different specialist areas (support, sales, billing) |
| Pipeline Pattern | Sequential processing | 🟡 Medium | Intermediate | 1-2 hours | 3-6 | Multi-stage workflows (document processing) |
| Hierarchy Pattern | Complex delegation | 🟠 High | Advanced | 4-8 hours | 5-15 | Enterprise workflows with project management |
| Adaptive Pattern | Dynamic coordination | 🔴 Very High | Expert | 1-2 days | 5-20 | Real-time optimization and resource allocation |
Choose Your Orchestration Pattern
🔀 Router Pattern
Route to specialists • Simple delegation • Quick setup • Perfect for customer service
⛓️ Pipeline Pattern
Sequential processing • Data transformation • Linear flow • Great for document workflows
🏢 Hierarchy Pattern
Multi-level delegation • Complex projects • Team coordination • Enterprise-grade workflows
🔄 Adaptive Pattern
Dynamic coordination • Real-time adaptation • Advanced scenarios • Maximum flexibility
Pattern Comparison Matrix
| Aspect | Router | Pipeline | Hierarchy | Adaptive |
|---|---|---|---|---|
| Setup Complexity | ⭐ | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ |
| Decision Making | AI-driven | Predefined | Multi-level | Dynamic |
| Performance | Fast | Medium | Slow | Variable |
| Maintenance | Easy | Medium | Complex | Very Complex |
| Scalability | High | Medium | High | Very High |
| Error Handling | Simple | Moderate | Advanced | Sophisticated |
| Cost | Low | Medium | High | Variable |
The core orchestration patterns address different workflow complexity levels and specialization requirements:
Delegation Strategy Framework
Router Pattern (Dynamic Handoff) - Intent-Based Delegation
Difficulty: Beginner | Setup Time: 30 minutes | Agents Required: 3-5 | Complexity: Low
Route queries to domain-specific specialists based on classification:
Pipeline Pattern (Sequential Chaining) - Sequential Processing
Difficulty: Intermediate | Setup Time: 1-2 hours | Agents Required: 3-6 | Complexity: Medium
Chain agents for multi-stage processing workflows:
Hierarchy Pattern (Sub-Agent Delegation) - Multi-Level Delegation
Difficulty: Advanced | Setup Time: 4-8 hours | Agents Required: 5-15 | Complexity: High
Delegate to project managers who coordinate specialist teams:
Adaptive Pattern - Dynamic Coordination
Difficulty: Expert | Setup Time: 1-2 days | Agents Required: 5-20 | Complexity: Very High
Agents coordinate dynamically based on evolving requirements:
Implementation Patterns
Best Practices
Agent Selection Strategy
- Use descriptive version IDs that indicate the agent's purpose and version
- Maintain separate versions for different specializations
- Test agent combinations thoroughly before deployment
- Document the purpose and capabilities of each sub-agent
Orchestration Complexity
- Limit delegation depth to prevent overly complex chains
- Design clear handover protocols between agents
- Implement fallback mechanisms for failed delegations
- Monitor performance across the entire agent chain
Version Management
- Use semantic versioning for agent workflows (e.g., "support-agent-v2.1")
- Maintain backward compatibility when updating referenced agents
- Test version changes in staging before production deployment
Troubleshooting
Common Issues
Agent Not Found
- Verify the
agentVersionIdexists and is deployed - Check that the target agent is in the same environment
- Ensure proper permissions for agent access
Delegation Loops
- Avoid circular references between agents
- Implement maximum delegation depth limits
- Use clear termination conditions
Context Loss
- Ensure proper context passing between agents
- Use consistent variable naming across agents
- Test information flow through the delegation chain
Performance Optimization
- Minimize Delegation Depth: Keep agent chains as short as possible
- Parallel Processing: Use multiple sub-agents for independent tasks
- Caching: Implement caching for frequently delegated tasks
- Load Balancing: Distribute load across multiple instances of popular agents
Use Case Examples
E-commerce Platform
Software Development Support
Related Concepts
Within AI & Knowledge Ecosystem
- AI Agent - Core agentic loop architecture and tool selection strategies
- Knowledge Base - RAG implementation for specialized domain knowledge
- AI & Knowledge Overview - Ecosystem architecture and progressive complexity patterns
Next Steps:
- Foundation Knowledge: AI Agent for understanding single-agent architecture
- Enhanced Context: Knowledge Base for specialized knowledge integration
- Ecosystem Overview: AI & Knowledge Overview for workflow composition strategies