The three peer patterns
Three patterns ship. The full comparison and setup steps live in Agent-to-agent patterns. Delegate-as-call. Your agent stays in control of the conversation and calls a peer for one answer via thedelegate_to_agent tool. The user never sees the
peer; your agent folds the response into its own reply. This is the building
block for coordinator/specialist setups.
Bridge / relay. When the conversation has moved to a topic another agent
owns, your agent opens a handoff to that peer. From then on, the user’s
messages are relayed to the peer and its replies come back through you. You stay
in the audit path, can watch the bridge in the Inbox,
and can release it at any time.
Transfer / drop-out. Between Agentheya agents, a relay can step out of the
middle so the caller talks to the target directly, removing the extra hop.
Cross-owner transfers require the target owner to opt in.
The A2A endpoint
Every agent exposes a standards-compliant A2A endpoint that external AI agents can call, authenticated with the agent’s API key. A public discovery card lets external callers find and plan around your agent. Long-running tasks are retained so a caller can check back on them later. Full details are on the A2A page.Delegation
delegate_to_agent is a single call that returns one answer. You configure the
targets in the Delegates section of the Handoff page, in two kinds:
- Sibling — another agent you own, called directly with no network hop. The user can watch the sibling working as it goes.
- External — any A2A-compatible peer, configured with a URL and a token stored encrypted.
Loop protection
Chains of agents calling agents are bounded by a maximum depth (5 hops), so a loop can’t run away. When the limit is reached, further agent-to-agent calls are refused. Human channels — email, Telegram, owner inbox, Slack, Discord, WhatsApp — end the chain and don’t count toward the limit.Building a coordinator
You can build a coordinator: one agent whose job is routing and synthesis, with several delegate targets whose descriptions tell it which specialist handles which sub-task. The coordinator calls specialists one at a time within its turn, holds each answer, and stays the single billing and audit point. Every delegate call is logged so you can inspect it under Observability and debugging.Human handoff
Handoff is a first-class capability, not just a notification. Thehandoff_request tool (enabled on the Tools page) routes
to a human on email, telegram, owner_inbox, slack, discord, or
whatsapp — or to another agent. Once a handoff is active, the user’s
messages are relayed to the destination. Control returns when:
- the receiving agent releases it (optionally passing values and context back);
- the owner clicks Release bridge in the Inbox;
- the user types
/release; - it times out.