the way to finish agent session from user
# ask-ai
b
the way to finish agent session from user
t
Thanks for reaching out, RikuKomiya. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To wrap up an agent session from the user's side, you have a few helpful options to choose from: • You can call
session.aclose()
or
session.shutdown()
programmatically to gracefully end the session. • There’s also
RoomInputOptions.close_on_disconnect
, which is set to close the session automatically when the participant leaves—this is actually enabled by default to make things easier for you. • If you'd like the room to be deleted once the session ends, you can enable
delete_room_on_close
in
RoomInputOptions
. • And on the server side, you have the
deleteRoom
API, which lets you end the session for all participants at once. Please feel free to reach out if you’d like me to walk you through any of these options or if you have any other questions—I’m here to help! Sources: examples/voice_agents/llamaindex-rag/chat_engine.py | Job lifecycle | LiveKit Docs | complex-agents/drive-thru/frontend/components/session-view.tsx