microscopic-dress-75199
10/20/2025, 3:26 PMtall-airline-16756
10/20/2025, 3:26 PMtall-airline-16756
10/20/2025, 3:26 PMmicroscopic-dress-75199
10/20/2025, 3:27 PMtall-airline-16756
10/20/2025, 3:28 PMtransfer_sip_participant API to directly transfer the call to another number. This method removes the agent from the call right after the transfer is initiated.
• DTMF-Triggered Transfers: Calls can be transferred based on DTMF input (like pressing numbers on the keypad). This is a handy way to route calls to specific departments.
• Warm Handoff: By using the create_sip_participant API, you can add a human agent to the call. The AI agent can stay on the call initially to provide helpful context before leaving.
• Advanced Warm Transfer: This involves a multi-step process where a supervisor room is used. The agent provides context to the human agent before the call is transferred, ensuring a smooth handoff.
• Function Tool-Based Transfers: You can create custom tools to handle transfer requests programmatically, tailoring the process to your needs.
Each of these methods has its own strengths, depending on whether you want to give the human agent some background or prefer a direct transfer. If you'd like, I’m happy to guide you through detailed steps for any of these options—just let me know!
Sources: agent.py | agent.py | telephony/warm_handoff.py | examples/warm-transfer/warm_transfer.py | Agent-assisted warm transfer | LiveKit Docsmicroscopic-dress-75199
10/20/2025, 3:31 PMtall-airline-16756
10/20/2025, 3:32 PMLIVEKIT_SIP_OUTBOUND_TRUNK="ST_abcxyz"
LIVEKIT_SUPERVISOR_PHONE_NUMBER="+12003004000"
3. Implement the Workflow:
◦ Start by placing the customer on hold with some background music to keep things pleasant.
◦ Create a supervisor room and dial the supervisor using the create_sip_participant API.
◦ Share a summary of the call with the supervisor using the conversation history to keep them in the loop.
◦ Then, move the supervisor into the customer room with the move_participant API.
◦ Finally, disconnect the AI agent once the supervisor has joined the call.
1. Deploy the Agent: Use the LiveKit CLI to deploy your agent with the right dispatch configuration.
2. Test the System: It’s always good to test! Use the Agent Playground to try out the warm transfer functionality and make sure everything is running smoothly.
If you’d like, I’m happy to provide detailed code snippets or help you with any of these steps. Just let me know!
Sources: Agent-assisted warm transfer | LiveKit Docs | examples/README.mdmicroscopic-dress-75199
10/20/2025, 4:17 PMtall-airline-16756
10/20/2025, 4:19 PMmicroscopic-dress-75199
10/20/2025, 4:20 PMtall-airline-16756
10/20/2025, 4:21 PMfunction_call for the tool call itself and function_call_output for the result.
To help you display tool calls in the Agent Playground chat interface, here are some friendly steps you can follow:
• Capture tool execution events such as FunctionToolsExecutedEvent, which give you all the details about the tool call and its output.
• Use callbacks to keep track of the tool calls as they happen and add them to the chat log in real-time.
• Integrate the tool call data from the chat context into your UI, so both the call and its output are clearly shown.
If you'd like, I’m here to help you implement this in your specific setup. Just share a bit about your Agent Playground environment and the kind of interface you're working with, and we can figure it out together!
Sources: agents/src/voice/agent_activity.ts | livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti...microscopic-dress-75199
10/20/2025, 4:24 PMtall-airline-16756
10/20/2025, 4:25 PMFunctionToolsExecuted event to catch tool calls and their outputs as they happen. For example:
session.on("function_tools_executed", (event) => {
event.functionCalls.forEach(call => displayToolCall(call));
event.functionCallOutputs.forEach(output => displayToolOutput(output));
});
2. Parse Chat Context Items: When you’re showing the chat history, keep an eye out for items with the types function_call and function_call_output. These help you display the tool calls and their results smoothly.
3. Track Tool Execution State: During tool execution, you can use the agent’s "thinking" state to show loading indicators. This way, users know something is happening behind the scenes.
If you’d like, I’m here to provide more detailed guidance or specific code examples tailored just for your playground setup. Just let me know!
Sources: examples/voice_agents/dynamic_tool_creation.py | agents/src/voice/agent_activity.ts