> ## Documentation Index
> Fetch the complete documentation index at: https://agentheya.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-agent orchestration

> How your agent works with other agents and with humans — three peer patterns, an A2A endpoint, delegation, and human handoff.

Your agent can work with other agents and hand off to humans. This page is the
map of what's possible; the pages it links to carry the detail.

## The three peer patterns

Three patterns ship. The full comparison and setup steps live in
[Agent-to-agent patterns](/peer-patterns).

**Delegate-as-call.** Your agent stays in control of the conversation and calls
a peer for one answer via the `delegate_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](/sidebar-menu/conversations),
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](/a2a) 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](/a2a).

## 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.

Each delegate call is time-bounded and returns one answer, so your agent always
knows whether the peer answered before it replies. You can restrict which tools
a sibling may use during a delegation. Sibling work bills to you normally;
external calls carry a flat per-call charge (the peer bills its own compute).
Delegation is available on Pro and Business plans.

There's no parallel or fire-and-forget delegation — every call blocks until the
peer answers, so your agent stays the single point that decides and replies.

## 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](/runtime/observability).

## Human handoff

Handoff is a first-class capability, not just a notification. The
`handoff_request` tool (enabled on the [Tools](/sidebar-menu/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.

Auto-escalation rules (keyword or unresolved-turn triggers) can start a handoff
without the model asking.
