Skip to main content
Transfer an active call from one LiveKit AI agent to another specialized agent mid-conversation - without dropping the call.

View on GitHub

Clone and run the full working example

Getting started

Overview

A front-line agent handles the initial greeting and intent detection. When the caller needs specialized help (billing, support, etc.), the front-line agent passes control to a specialist agent. The handoff is seamless - the caller stays in the same room and hears no interruption.

How it works

  1. The reception agent greets the caller and determines their intent.
  2. Based on intent, the agent calls pass_control_to_billing or a similar tool.
  3. The reception agent leaves the room.
  4. The specialist agent joins the same room and takes over the conversation.
  5. The specialist receives context from the handoff payload.

Agent function tools

Environment variables

.env