Zhenfy

Sub-Agents

Sub-agents let one agent delegate tasks to another. The parent agent decides when to call a specialist and incorporates the result into its response.

How delegation works

  1. User sends a message to Agent A
  2. A's LLM decides this task needs specialist knowledge
  3. A sends a request to Agent B via the A2A (Agent-to-Agent) protocol
  4. B processes the request and responds
  5. A incorporates B's response and replies to the user

The user only talks to Agent A. The delegation to B happens transparently.

Rules

  • Directional: If A has B as a sub-agent, A can call B. B cannot call A unless you also configure A as B's sub-agent.
  • No cycles: A → B → A is not allowed. The platform enforces a directed acyclic graph at deployment time.
  • Max depth 10: Delegation chains are limited to 10 levels, enforced by the platform at deployment time.
  • Same owner: You can only use your own agents as sub-agents.