bright-plumber-93445
05/13/2025, 7:05 AMtall-airline-16756
05/13/2025, 7:06 AMtall-airline-16756
05/13/2025, 7:06 AMclose()
method:
// Close the RealtimeModel
await realtimeModel.close();
• If you are working with an agent session in a JobContext, use the shutdown()
method:
# Disconnect from the room
ctx.shutdown(reason="Session ended")
Note: If you need to end the session for all participants, you can use the server API's deleteRoom
method instead of just disconnecting the agent.
Sources: RealtimeModel | LiveKit Agents | Job lifecycle | LiveKit Docs