flaky-scooter-85113
09/24/2025, 1:26 PMtall-airline-16756
09/24/2025, 1:26 PMtall-airline-16756
09/24/2025, 1:27 PM@livekit/rtc-node library to keep things smooth.
2. Create a consultation room: Next, generate a token for the supervisor so they can join a private consultation room and connect seamlessly.
3. Dial the supervisor: Use the SipClient to call the supervisor into this consultation room.
4. Brief the supervisor: It’s helpful to share the conversation history with the supervisor through a TransferAgent session, so they’re up to speed.
5. Move the supervisor to the caller's room: Then, smoothly transfer the supervisor into the customer’s room using the MoveParticipant API.
6. Complete the transfer: Finally, stop the hold music, introduce the supervisor to the caller, and disconnect the agent sessions to wrap things up nicely.
If you’d like to dive deeper, the warm transfer documentation and the Node.js voice agent starter project in the LiveKit resources have some fantastic detailed code examples and extra context. Feel free to explore those anytime!
Sources: Agent-assisted warm transfer | LiveKit Docs | LiveKit Docs | SIP overview | LiveKit Docsflaky-scooter-85113
09/24/2025, 1:38 PMtall-airline-16756
09/24/2025, 1:39 PMAgent. It’s important to pass the conversation history from the original agent session to the supervisor so they’re fully up to speed. Here’s a simple example to illustrate this:
class TransferAgent extends Agent {
constructor(prevCtx) {
let prevConvo = "";
const contextCopy = prevCtx.copy({
excludeEmptyMessage: true,
excludeInstructions: true,
excludeFunctionCall: true,
});
for (const msg of contextCopy.items) {
if (msg.role === "user") {
prevConvo += `Customer: ${msg.text_content}\n`;
} else {
prevConvo += `Assistant: ${msg.text_content}\n`;
}
}
super({
instructions: `You are a supervisor receiving a warm transfer. Here is the conversation history: ${prevConvo}`,
});
}
}
1. Create a consultation room: Next, generate a unique room name (something like customerRoomName + "-supervisor") and create a new room instance. Then, create an authentication token for the TransferAgent with the right permissions to join this consultation room. Finally, connect the agent to the room using this token.
2. Dial the supervisor: Use the SipClient to call the supervisor into the consultation room. Once they’re connected, the TransferAgent will brief them on the conversation history, so they’re ready to assist.
3. Move the supervisor: When everything is set, you can use the MoveParticipant API to transfer the supervisor from the consultation room over to the caller’s room.
If you’d like to see a full implementation, I highly recommend checking out the warm transfer documentation along with the LiveKit examples repository—they have detailed code samples that can really help clarify things.
Sources: examples/README.md | Agent-assisted warm transfer | LiveKit Docsflaky-scooter-85113
09/24/2025, 1:40 PMtall-airline-16756
09/24/2025, 1:41 PMTransferAgent permission to join the consultation room. Make sure this token includes permissions for room join, publishing, subscribing, and updating metadata. Don’t forget to specify the consultation room name and the agent identity (for example, "transfer-agent").
2. Connect the TransferAgent: Next, use the token you generated along with the LiveKit server URL to connect the TransferAgent to the consultation room by using the connect() method.
3. Dial the supervisor: Then, use the CreateSIPParticipant API to call the supervisor into the consultation room. You’ll need to provide the outbound trunk ID, the supervisor’s contact number, and the consultation room name so they join the same room as the TransferAgent.
Once both the TransferAgent and supervisor are in the consultation room, the agent can take a moment to summarize the call. When everything is set, you can use the MoveParticipant API to transfer the supervisor to the original caller’s room, completing the warm transfer smoothly.
If you’d like, there’s a complete example of this warm transfer process available in the LiveKit resources that you might find really helpful.
Sources: Agent-assisted warm transfer | LiveKit Docsflaky-scooter-85113
09/24/2025, 1:44 PMtall-airline-16756
09/24/2025, 1:45 PMTransferAgent the right permissions to join the consultation room. This includes permissions for room join, publishing, subscribing, and updating metadata. Don’t forget to specify the consultation room name and the agent identity (like "transfer-agent").
2. Connect the TransferAgent: With the token ready, use it along with the LiveKit server URL to connect the TransferAgent to the consultation room using the connect() method.
3. Pass conversation context: It’s important to initialize the TransferAgent with the conversation history from the original agent session. This helps the agent to effectively summarize the call for the supervisor.
Once everything’s set up and connected, the TransferAgent can communicate with the supervisor in the consultation room. When you're ready, simply use the MoveParticipant API to transfer the supervisor to the original caller’s room, completing the warm transfer smoothly.
If you'd like more details or examples, feel free to check out the warm transfer example available in the LiveKit resources. We're here to help if you have any questions along the way!
Sources: Agent-assisted warm transfer | LiveKit Docs | examples/warm-transfer/warm_transfer.py | Web and mobile frontends | LiveKit Docsflaky-scooter-85113
09/24/2025, 1:46 PMtall-airline-16756
09/24/2025, 1:46 PMflaky-scooter-85113
09/24/2025, 1:54 PM