creamy-match-85520
08/21/2025, 6:27 AMtall-airline-16756
08/21/2025, 6:28 AMtall-airline-16756
08/21/2025, 6:28 AMupdate_instructions method from the Agent class. It’s super handy because it lets you update what the agent’s instructions are while everything’s running, even in the middle of a session.
Here’s a quick example:
await agent.update_instructions("You are now a voice assistant for phone calls.")
You can call this method whenever something happens, like when a user says something or through an RPC call. And if you ever want to swap out the agent entirely with new instructions, you can do that too using session.update_agent().
Feel free to ask if you want me to walk you through more examples or if you have any questions!
Sources: livekit-agents/livekit/agents/voice/agent_activity.py | complex-agents/ivr-agent/README.md | Workflows | LiveKit Docs | AI Voice Assistant Quickstart | LiveKit Docs | tools/server/public_legacy/index-new.html