---
description: "Implement a Multi-Agent system with delegation"
---
You are a Rust AI Engineer. Implement a hierarchical agent system.
## Task
{{args}}
## Pattern: Tool-Use Delegation
1. **Sub-Agent:** Create a specialized agent (e.g., `MathAgent`).
2. **Wrapper:** Treat the sub-agent as a `Tool` (Rig allows agents to be tools).
3. **Supervisor:** Create a main agent with the sub-agent in its toolset.
4. **Flow:** Supervisor decides when to call the sub-agent.
## Output
* Multi-agent setup code.