prehistoric-horse-81038
11/13/2025, 11:54 AMtall-airline-16756
11/13/2025, 11:54 AMtall-airline-16756
11/13/2025, 11:54 AMtts_node in your agent or by building a reusable plugin.
Here’s a friendly overview of how you might create a reusable plugin:
• Inherit from livekit.agents.tts.TTS and implement the necessary methods like synthesize().
• Set up initialization parameters such as API keys, voice ID, and sample rate.
• Make sure to handle authentication securely and validate credentials properly.
• Declare the plugin’s capabilities, like streaming support, using tts.TTSCapabilities.
• Optionally, register your plugin so it can be reused across different projects.
LiveKit also offers examples of existing plugins (like Cartesia and ElevenLabs) that you can use as helpful templates. If you’d like, I’m here to guide you through the process or provide a starter template tailored to a specific TTS provider. Just let me know!
Sources: Pipeline nodes and hooks | LiveKit docs | livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/__init__.... | AI Agents Framework | livekit/livekit_composite | DeepWiki | Text-to-speech (TTS) models | LiveKit Docsprehistoric-horse-81038
11/13/2025, 11:55 AMtall-airline-16756
11/13/2025, 11:56 AMupdate_instructions() method. This is a great way to adjust the agent’s behavior during runtime by simply providing new instructions as a string.
Here’s a quick example:
await agent.update_instructions("You are now a helpful assistant speaking on the phone.")
This method works smoothly with both realtime and standard LLMs, making sure your instructions are refreshed in the current session or local chat context. If you’d like, I’m here to help with more details or examples—just let me know!
Sources: examples/voice_agents/llamaindex-rag/retrieval.py | Agent Session Management & Turn Detection | livekit/livekit_composite | Dee... | complex-agents/ivr-agent/README.mdprehistoric-horse-81038
11/13/2025, 12:01 PMtall-airline-16756
11/13/2025, 12:02 PMupdate_instructions() method. This is a great way to help the agent adjust its behavior on the fly while interacting with the user.
For instance, if the agent is already on a call and you want to change its instructions, you can do this:
await agent.update_instructions("You are now a helpful assistant speaking on the phone.")
How This Affects Context:
• For Realtime Models: The new instructions are sent directly to the server and take effect immediately during the ongoing session, without changing any previous chat context.
• For Standard LLMs: The instructions get updated in the local chat context. If there’s already an instruction message, it will be replaced; if not, a new instruction message is added right at the start of the context.
Here’s an Example Flow:
1. The agent begins a call with the instructions: "You are a general assistant."
2. During the call, the user mentions they’re on the phone, so you update the instructions to: "You are a helpful assistant speaking on the phone."
3. The agent quickly adjusts its behavior based on these new instructions.
4. For standard LLMs, these updated instructions become part of the context used to generate responses.
If you’d like me to walk you through this more or provide additional examples, just let me know—I’m here to help!
Sources: Agent Session Management & Turn Detection | livekit/livekit_composite | Dee... | livekit-plugins/livekit-plugins-ultravox/livekit/plugins/ultravox/realtime/... | plugins/openai/src/realtime/realtime_model.ts | basics/change_agent_instructions.py