syntax for updating an agent’s instructions please
# ask-ai
m
syntax for updating an agent’s instructions please
t
Thanks for reaching out, Alexander. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To update an agent's instructions in LiveKit, you can easily use the
update_instructions
method. Here are two simple ways to do it: • Direct Agent Method:
await agent.update_instructions("Your new instructions here")
This method accepts a single string with the new instructions and works smoothly for both realtime and standard LLM modes. • Activity Method:
await activity.update_instructions("New instructions...")
Both methods are asynchronous, so remember to await them when you call them. If you’d like, I’m here to help with more details or examples—just let me know! Sources: Agent Session & Client Integration | livekit/livekit_composite | DeepWiki | basics/change_agent_instructions.py | livekit-agents/livekit/agents/voice/agent_activity.py