Skip to content

Route Handoff

POST
/api/agents/route-handoff

Route a task handoff from one agent to another.

Facilitates smooth task transitions between agents while preserving conversation context and state.

Request Body: AgentHandoffRequest with from_agent, to_agent, and context

Returns: AgentHandoffResponse confirming handoff execution

Raises: HTTPException 503: If communication hub is not available HTTPException 404: If target agent is not available HTTPException 500: For unexpected errors

AgentHandoffRequest

Agent task handoff request model.

Represents a request to hand off an ongoing task or conversation from one agent to another more suitable agent. Includes full conversation context and handoff reasoning for seamless transitions.

Fields: from_agent: Agent initiating the handoff to_agent: Agent receiving the handoff conversation_context: Full conversation history and state handoff_reason: Explanation for why handoff is occurring priority: Handoff priority level (default: “medium”) handoff_time: Timestamp when handoff was requested

Used By: - POST /api/agents/handoff endpoint - Agent handoff workflow coordination - boot coordinator orchestrator for optimal agent selection - Handoff history and analytics tracking - Multi-agent conversation management

object
fromAgent
required
Fromagent
string
toAgent
required
Toagent
string
conversationContext
required
Conversationcontext
object
key
additional properties
Any of:
string
handoffReason
required
Handoffreason
string
priority
Priority
string
default: medium
handoffTime
Handofftime

Handoff timestamp

string format: date-time

Successful Response

AgentHandoffResponse

Agent handoff execution response model.

Provides handoff status, tracking identifier, and execution results for controlled agent handoffs with context preservation.

Fields:

  • status: Handoff execution status (success/failed)
  • handoff_id: Unique tracking identifier for handoff
  • result: Handoff execution success flag
  • message: Human-readable handoff status message
object
status
required
Status

Handoff execution status

string
handoffId
required
Any of:
string
result
required
Result

Handoff execution result (success/failure)

boolean
message
required
Message

Handoff status message

string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object