Designing a routing graph
When designing how your sub-agents communicate, the shape of the graph significantly impacts the reliability and capability of the overall agent.
The golden rules of routing
- The entry agent must route: If the graph's entry sub-agent ends its very first turn with a plain answer instead of routing anywhere, the runner will nudge it to actually route (or ask one clarifying question) rather than accepting a fabricated direct answer.
- Ensure reachability: Design the handoff graph so every sub-agent is reachable from the default one. An unreachable specialist can never be routed to. Reachability may use either edge type, but prefer delegate edges unless ownership transfer is required.
- Avoid the transfer-mesh: Do not wire every sub-agent to be able to transfer to every other sub-agent. This leads to thrashing and confusion.
Typical shapes
A well-designed routing graph usually looks like a tree with a clear hierarchy:
- Triage → Specialist: A triage/router default sub-agent often TRANSFERS to one owner specialist based on the user's initial request.
- Specialist → Helper: Specialists DELEGATE to helpers (like a researcher or a calculator) to gather information, before returning a final answer.
Dealing with cross-agent references
A sub-agent that is really a different, externally-linked agent (a cross-agent reference) can only ever be a DELEGATION target, never a transfer target.
Common Pitfall: Transfer-first authoring (wiring every peer for transfer and leaving delegation empty) causes ownership thrash and oscillation. Always start with a delegate-first approach.
Related