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.
  • Avoid cycles: A → B → A is not detected or blocked by the platform. Sub-agent validation only checks that each sub-agent exists and is owned by you. A cyclic delegation chain is not rejected and can loop at runtime — it's on you to keep your sub-agent graph acyclic.
  • Max 5 sub-agents per agent: Each agent can list at most 5 direct sub-agents, enforced when the agent is created or updated. There is no enforced limit on total delegation-chain depth (A → B → C → ...), so keep chains shallow to avoid runaway delegation.
  • Same owner: You can only use your own agents as sub-agents.