many-forest-60185
11/17/2025, 5:51 AMtall-airline-16756
11/17/2025, 5:51 AMtall-airline-16756
11/17/2025, 5:51 AMupdate_instructions(). For instance, if you want to switch from a support tone to a sales tone, this method has got you covered.
• Update Tools: Need to add or tweak tools? update_tools() lets you update the agent’s capabilities right when you need it.
• Update Chat Context: Sometimes the conversation needs a fresh context. You can replace or adjust the conversation history with update_chat_ctx() so the agent stays relevant and responsive.
• Update Model Options: Want to change parameters like voice, temperature, or noise reduction? update_options() is the way to go. Just a heads-up, some changes might require restarting the session depending on your provider.
These handy updates work seamlessly across popular AI providers like OpenAI, Google Gemini, and Ultravox. If you'd like, I’m here to help with specific implementation details or examples—just let me know!
Sources: pipeline-tts/tts_comparison/README.md | livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/real... | Real-time AI Models & Streaming | livekit/livekit_composite | DeepWiki | Agent Session Management & Turn Detection | livekit/livekit_composite | Dee...many-forest-60185
11/17/2025, 5:52 AMtall-airline-16756
11/17/2025, 5:53 AMupdate_options() to tweak settings on the fly without needing to restart the session.
• LiveKit Inference: This lets you use unified model identifiers to adjust the session dynamically, making it easier to switch between models.
Just a heads-up: directly swapping STT models within the same agent instance during runtime isn’t supported yet, so using agent transfer is your best bet for a seamless experience. If you'd like, I’d be happy to share a code example or help you out further—just let me know!
Sources: examples/src/comprehensive_test.ts | docs/index.yaml | Introducing LiveKit Inference: A unified model interface for voice AImany-forest-60185
11/17/2025, 5:54 AMtall-airline-16756
11/17/2025, 5:54 AMTransferSIPParticipant API:
• First, create a TransferSIPParticipantRequest with details like the participant identity, room name, and the destination number (for example, tel:+123456789).
• If you want, you can set play_dialtone to true so a dial tone plays during the transfer.
• Then, execute the transfer using the LiveKit API client: await livekit_api.sip.transfer_sip_participant(transfer_request).
This is often triggered by DTMF input, like pressing "1" to reach a specific department.
Warm Transfer
Now, a warm transfer is a bit more involved because the agent stays on the line to give a quick summary to another agent or supervisor before connecting them to the caller. Here’s how it usually goes:
• Place the caller on hold and play some hold music to keep things smooth.
• Dial the supervisor using create_sip_participant() and wait for them to answer.
• Briefly summarize the conversation to the supervisor so they’re in the loop.
• Use the move_participant() API to connect the supervisor to the caller’s room.
• Once everything’s set, disconnect the original agent to complete the transfer.
Keep in mind, warm transfers need two agent sessions and a SessionManager to coordinate everything nicely. This approach is great when it’s important to keep context and ensure a smooth handoff.
If you’d like, I’m happy to provide code examples or dive deeper into any part of this process—just let me know!
Sources: Agent-assisted warm transfer | LiveKit docs | agent.py | sip-refer/agent.py | livekit-agents/livekit/agents/job.py | Agents telephony integration | LiveKit Docsmany-forest-60185
11/17/2025, 5:56 AMtall-airline-16756
11/17/2025, 5:57 AMsession.update_agent() to swap out the current agent with your new one.
Here’s a little example to guide you:
class ShortAgent(Agent):
def __init__(self):
super().__init__(
instructions="You are a helpful agent. Be as brief as possible.",
stt="assemblyai/universal-streaming",
llm="openai/gpt-4.1-mini",
tts="cartesia/sonic-2",
vad=silero.VAD.load()
)
@function_tool
async def change_agent(self):
"""Change the agent to a different configuration."""
self.session.update_agent(LongAgent())
This way, you can smoothly switch agents without losing the flow of your conversation. If you’d like, I’m here to help with more details or examples—just let me know!
Sources: examples/warm-transfer/warm_transfer.py | docs/index.yaml | Agent-assisted warm transfer | LiveKit docs | agent.py