bright-librarian-45815
05/12/2026, 2:32 PMtall-airline-16756
05/12/2026, 2:32 PMtall-airline-16756
05/12/2026, 2:32 PMsession.shutdown(drain=True) for a graceful shutdown (lets in-flight work finish), or
◦ await session.aclose() (or equivalent ctx.aclose() / ctx.shutdown() in Node) to close immediately.
• This disconnects that agent session only; other participants remain in the room.
Removing a participant while keeping the room and other participants
• Use the Room/Server SDK method to remove a specific participant, e.g.:
◦ Python: await room_service_client.remove_participant(room_name="my-room", identity="participant-identity")
◦ Server SDK equivalents exist in other languages.
• Only the specified participant is disconnected; the room stays active unless configured to auto-delete when all non-agent participants leave.
Important notes
• The room is not automatically deleted just because an agent leaves. The room may be deleted if configured to do so or when the last non-agent participant leaves.
• If you want deterministic behavior around room lifetime, check room delete/config options (for example, disable auto-delete or explicitly call delete_room() when desired).
If you tell me which SDK/language you’re using (Node, Python, or server REST) and whether you want graceful shutdown or immediate removal, I’ll provide the exact code snippet to run.
Sources: Job lifecycle | LiveKit Documentation | Server lifecycle | LiveKit Documentation, with interactive elements