sparse-summer-58707
05/20/2026, 4:56 PMtall-airline-16756
05/20/2026, 4:56 PMtall-airline-16756
05/20/2026, 4:56 PMdelete_room_on_close = True for the session. That causes the room to be deleted when the agent leaves, so no further dispatch will target it.
• Or explicitly delete the room via the server API (for example, call deleteRoom) after the agent exits. Deleting the room disconnects remaining participants and prevents further dispatch to that room.
Also review your dispatch rules to ensure only a single agent is intended per session (explicit dispatch or one‑agent rules) so automatic dispatch won’t send replacements.
Which method do you prefer or are you using a specific SDK/language so I can give exact code/snippet?
Sources: Server lifecycle | LiveKit Documentation | https://docs.livekit.io/agents/logic/sessions.md| | Agent session | LiveKit Documentation | Job lifecycle | LiveKit Documentation | Agent dispatch | LiveKit Documentation, with interactive elementssparse-summer-58707
05/20/2026, 4:57 PMtall-airline-16756
05/20/2026, 4:58 PMagent_name when assigning the agent). If an agent is explicitly dispatched, LiveKit will not auto-reassign another agent when that agent disconnects.
• Do not set delete_room_on_close = True. That would delete the room when the agent session ends.
• Have the agent perform a graceful disconnect (e.g., session.shutdown() or ctx.shutdown() / disconnect API). This removes the agent but leaves the room active for remaining participants.
If you’d like, tell me which SDK/language you’re using (Node, Python, Go, etc.) and I’ll provide the exact snippet to call for a clean exit.
Sources: Agent dispatch | LiveKit Documentation | Job lifecycle | LiveKit Documentation | Server lifecycle | LiveKit Documentation, with interactive elements