square-activity-46232
08/12/2025, 9:39 PMtall-airline-16756
08/12/2025, 9:40 PMtall-airline-16756
08/12/2025, 9:40 PMAgent
class in LiveKit has a handy method called update_instructions()
that lets you update the system prompt whenever you need. It’s a great way to tweak the instructions guiding the agent’s behavior while your session is still running.
Here’s a quick example to show you how it works:
await agent.update_instructions("Your new system prompt here")
All you need to do is pass in a string with your new instructions, and the method will update the agent’s internal state for you. Easy, right?
Sources: Vision Agent Quickstart | LiveKit Docs | Vision Agent Quickstart | LiveKit Docs | Vision Agent Quickstart | LiveKit Docs | tools/server/public_simplechat/readme.md | livekit-agents/livekit/agents/voice/agent.py