Skip to main content
Handoffs let one agent transfer a conversation to a specialist agent based on the request.
The user describes their issue; the triage agent delegates to a specialist via a handoff tool call.
Handoffs are secure by default — the target agent only inherits tools shared with the source agent. See Handoff Tool Policy.

Quick Start

1

Pass agents directly

Pass specialist agents to handoffs and the routing agent gets a transfer tool for each.
2

Configure the handoff tool

Use handoff() to rename the transfer tool or steer when the agent should call it.

How It Works

When you set handoffs, PraisonAI converts each target into a transfer_to_<agent> tool, adds routing instructions to the agent’s prompt, and passes conversation history when control transfers.

Which Handoff Setup to Use?


Configuration Options

handoff() builds a configured transfer tool for a target agent.

Handoff Tool Policy — tool security boundary options

Common Patterns

Pattern 1 — Callback on handoff

Pattern 2 — Filter passed history

Pattern 3 — Type-safe handoff


Handoff Results

handoff_to() returns a HandoffResult describing the outcome.

Best Practices

A specialist with a focused role routes cleanly. Overlapping responsibilities make the routing agent’s tool choice ambiguous.
Pass input_filter=handoff_filters.remove_all_tools or handoff_filters.keep_last_n_messages(5) so the target agent gets only the context it needs.
When a specialist needs typed fields, use TypedHandoff(agent=..., input_schema=Model) — the framework validates the payload at the boundary.
Let the routing agent answer requests it cannot route rather than failing silently.

Handoff Tool Policy

Secure tool boundaries during handoff

Typed Handoffs

Schema-validated handoffs with Pydantic models