Skip to main content

handoff_to

Method
This is a method of the Agent class in the agent module.
Programmatically hand off a task to another agent. This is the unified programmatic handoff API that replaces delegate(). It uses the same Handoff mechanism as LLM-driven handoffs but can be called directly from code.

Signature

Parameters

Agent
required
The agent to hand off to
str
required
The task/prompt to pass to target agent
Optional
Optional additional context dictionary
Optional
Optional HandoffConfig for advanced settings

Returns

'HandoffResult'
HandoffResult with response or error

Usage

Uses

  • Handoff
  • HandoffConfig
  • handoff_obj.execute_programmatic

Source

View on GitHub

praisonaiagents/agent/agent.py at line 2333

Handoffs Concept

Handoffs Feature