The default: handoffs on the agent
Each entry in config.handoffs becomes one tool the model can call, named
handoff_to_<name>, and the model routes on that entry’s description. Write
the description as what belongs at that desk — “invoices, refunds, payment
questions” — not as an instruction to the model.
When to split one agent into several
Split when the desks genuinely differ:- A shorter prompt per agent. One prompt covering billing, returns and technical support is three policies the model holds at once and picks from badly. Three prompts each hold one.
- Different models or voices per desk. A cheap fast model on the front desk and an expensive one on the desk that reasons about a refund. A different language, a different voice.
- Tools scoped to the desk that needs them. The refund tool is on the billing agent and nowhere else, so the front desk cannot call it by mistake.
What crosses, and what does not
A handoff is a change of agent inside one session, so:userdatacrosses. It is session state every agent on the call shares — see userdata.varsvalues cross. One bag per session reaches every agent, each merged over its own declared defaults — see variables.- The conversation crosses as far as the edge’s
contextpolicy says, and that is the decision worth the most care: context policies. - The transcript and the call record are one call throughout. The whole thing reads back as one conversation with the handover marked in it, and every item says which agent produced it.
Next
Handoffs
Every field on a handoff entry, and the rules validation enforces.
Context policies
What the next agent starts from, and what each choice costs.
Teams on a call
A cast assembled for one request, where
members[0] answers.Patterns
Front desk to specialists, handing back, and routing on a lookup.