Documentation Index
Fetch the complete documentation index at: https://orbit-docs.devotel.io/llms.txt
Use this file to discover all available pages before exploring further.
Agent handoff targets
A multi-agent setup typically has one routing / triage agent and several specialised agents (billing, support, sales, returns). When the routing agent decides “this is a billing question, hand off”, you want the destination to be a small explicit set — not “any agent in this org”.handoff_targets is that allowlist.
What it gates
Settinghandoff_targets on agent A declares: “Agent A may hand off ONLY to the agents listed here.”
The allowlist is enforced in two places:
- Runtime — the
transfer_to_agenttool in the agent runtime refuses any target not on the source agent’s allowlist. The LLM never receives the option in its tool list. - Internal handoff API (
POST /internal/handoffs) — even with a valid internal token, a handoff is rejected with403 FORBIDDENif the target is not on the source agent’s allowlist. This protects the audit ledger and theagent.handoff.occurredwebhook from forged entries.
Configure on agent create
Configure on agent update
handoff_targets is persisted under the agent’s config.handoff_targets so the runtime can read it on every executor rebuild.
Update semantics
| Body | Behaviour |
|---|---|
"handoff_targets": ["agent_a", "agent_b"] | Replaces the current list with the supplied array. |
"handoff_targets": [] | Explicitly clears the list. The agent can no longer hand off. |
| Field omitted from PATCH | Leaves the existing list untouched. |
What a runtime handoff looks like
The router agent’s LLM seestransfer_to_agent in its tool list ONLY when handoff_targets is non-empty. The tool’s target_agent_id parameter is enumerated against the allowlist — the LLM cannot fabricate a target that isn’t on the list.
A successful handoff:
- Persists an
agent_handoffsrow. - Fans out a webhook event
agent.handoff.occurredto the tenant’s subscription endpoint withsource_agent_id,target_agent_id,conversation_id,reason, andsummary. - Re-enters the runtime with the target agent’s executor, carrying the conversation history forward.
What a refused handoff looks like
If a caller (most commonly an internal automation invokingPOST /internal/handoffs directly) tries to record a handoff to an agent that isn’t on the source agent’s list:
agents.handoff_allowlist_violation with the source / target / allowlist size, so you can monitor for abuse.
Patterns
One-way fan-out (router → specialists)
Two-way (specialists can return to router)
Mesh
Common pitfalls
- Forgetting to set
handoff_targets— the LLM never sees thetransfer_to_agenttool. Symptom: the agent responds itself even when it should escalate. - Listing an agent that doesn’t exist — the runtime ignores unknown ids; effectively the same as omitting them.
- Listing the agent’s own id — allowed but pointless. The runtime handles
transfer_to_agentwith the same agent as a no-op. - Cross-tenant ids — every id is tenant-scoped. You cannot hand off to an agent in a different organisation.
See also
- Creating Agents — full agent-create reference.
- Cost controls —
max_cost_per_run_cents/max_cost_per_conversation_cents. - Webhooks → Events —
agent.handoff.occurredpayload.