Sub-Agents
Compose agents together for complex workflows
Use agents as building blocks within other agents. Sub-agents enable modular, reusable AI workflows.
How It Works
A sub-agent is any Fruxon agent invoked as a step in another agent's workflow:
- Parent agent calls sub-agent with parameters
- Sub-agent executes its workflow
- Sub-agent returns output to parent
- Parent continues with the result
Adding a Sub-Agent
- In Agent Studio, click + to add a node
- Select Sub-Agent
- Choose the agent to invoke
- Map parameters from your workflow
Access outputs in subsequent steps:
{{sub_agent_step.summary}}
{{sub_agent_step.result}}Composition Patterns
Sequential
Chain sub-agents one after another:
extract_text → summarize → analyze_sentimentParallel
Run multiple sub-agents concurrently:
┌─ sentiment_analyzer
input ├─ keyword_extractor → merge results
└─ language_detectorConditional
Route to different sub-agents based on logic:
If type == "technical" → technical_support
Else → general_supportBest Practices
- Single responsibility - Each sub-agent does one thing well
- Clear interfaces - Well-defined parameters and outputs
- Version pinning - Pin parent agents to specific sub-agent versions
- Test independently - Verify each sub-agent before composing
Next Steps
- Agent Studio - Visual workflow builder
- Versioning - Managing agent versions