aloof-scooter-47164
09/12/2025, 1:16 AMtall-airline-16756
09/12/2025, 1:16 AMtall-airline-16756
09/12/2025, 1:16 AMuser_away_timeout
setting. Unfortunately, this state can’t be set manually or overridden through code.
However, if you’re looking to indicate when a user is away or manage their status more flexibly, a great option is to use custom participant metadata or keep track of user states within your own application. I’d be happy to walk you through how to set this up if you’re interested—just let me know!
Sources: livekit-agents/livekit/agents/voice/agent_activity.py | Events and error handling | LiveKit Docs | State synchronizationaloof-scooter-47164
09/12/2025, 1:40 AMtall-airline-16756
09/12/2025, 1:41 AMawait agent.update_instructions("New system instructions here")
to update your instructions on the fly.
• JavaScript SDK: You can call await session.updateInstructions("New system instructions here")
to send the updated instructions through the session.update
event.
Just a quick note about how this works depending on your provider:
• OpenAI: You’re in luck! It supports smooth mid-session updates without needing to restart.
• Google (Gemini): You might need to restart the session to see the changes take effect.
• Ultravox: It’s important to mark the session for restart when you update instructions.
If you have any questions or want me to walk you through the implementation, please don’t hesitate to ask. I’m here to help!
Sources: agents/src/llm/realtime.ts | livekit-agents/livekit/agents/llm/realtime.pyaloof-scooter-47164
09/12/2025, 1:43 AMtall-airline-16756
09/12/2025, 1:44 AMupdate_chat_ctx
method with an empty ChatContext
. This will gently reset the conversation history for your session, giving you a fresh start.
Here’s a friendly example in Python to guide you:
from livekit.agents.llm import ChatContext
# Assuming you have a reference to your RealtimeSession
await realtime_session.update_chat_ctx(ChatContext.empty())
This method works smoothly across various providers like OpenAI, Google, AWS, and Ultravox. If you’d like, I’m here to help you with any part of the implementation or answer any questions you have!
Sources: livekit-agents/livekit/agents/voice/agent_activity.py | plugins/google/src/beta/realtime/realtime_api.ts