fierce-jordan-44682
09/17/2025, 2:33 AMtall-airline-16756
09/17/2025, 2:33 AMtall-airline-16756
09/17/2025, 2:34 AMtall-airline-16756
09/17/2025, 2:34 AMdeparture_timeout setting for a room in LiveKit. Just a heads-up, this setting can’t be changed after the room is created—it needs to be set right when the room is first made. So, if you want a longer timeout, you’ll want to specify it during the initial CreateRoom request using the SDK or CLI you’re working with.
If you’d like, I’m here to help! Just let me know which SDK or tool you’re using, and I can walk you through some examples to make the process easier.
Sources: packages/livekit-server-sdk/src/RoomServiceClient.ts | lib/livekit/proto/livekit_room_pb.rb | livekit-api/src/services/room.rs | cmd/lk/room.go | livekit/livekit_room.pb.gofierce-jordan-44682
09/17/2025, 2:37 AMtall-airline-16756
09/17/2025, 2:38 AMdeparture_timeout period, participants who have left the room are no longer considered active. Their status changes to DISCONNECTED, which means they don't count towards the active participant metrics or any costs related to active time in the room. The good news is, the room stays open during this timeout, giving a chance for participants to reconnect or for new ones to join.
Right now, there isn’t a direct way to check if a room is active specifically during the departure_timeout period. But here’s a helpful approach: you can keep an eye on how many participants are in the room and note the time since the last person left. By comparing that time with your set departure_timeout value, you can get a good idea if the room is still within that timeout window.
If you’d like, I’m here to help you implement this logic or assist with a particular SDK or API you’re working with. Just let me know, and we can figure it out together!
Sources: protobufs/livekit_models.proto | livekit-ffi/protocol/room.proto | livekit-rtc/livekit/rtc/room.py | pkg/rtc/room.go | livekit-protocol/livekit/protocol/room.pyifierce-jordan-44682
09/17/2025, 6:48 AMtall-airline-16756
09/17/2025, 6:49 AMdeparture_timeout period. Usually, in LiveKit, charges are based on active participants and media usage. Since participants are in a DISCONNECTED state during this timeout, they’re not counted as active, so there shouldn’t be any extra costs for the agent or participants during this time.
If you’re worried about pricing or resource usage, I’d be happy to help! You might also find it useful to check out LiveKit’s pricing documentation, or feel free to share more details about your setup so I can assist you further.
Sources: livekit-api/src/services/room.rs | protobufs/livekit_room.protofierce-jordan-44682
09/17/2025, 6:54 AMtall-airline-16756
09/17/2025, 6:54 AMdeparture_timeout period, the agent stays in the room and is still considered active. The room will remain open until the timeout finishes or the room is explicitly deleted. If a participant happens to re-enter the room during this time, the agent won’t need to rejoin since it’s already there.
If you'd like to make sure the agent doesn’t stay in the room, you can simply delete the room when the participant leaves. I hope this helps clarify things for you!
Sources: livekit/livekit_models.pb.go | pkg/rtc/room.gofierce-jordan-44682
09/18/2025, 8:16 AMtall-airline-16756
09/18/2025, 8:17 AMdeparture_timeout period. You can use the ListRooms API for this—it returns all rooms that are currently open.
To check if a room is active during the departure_timeout period, here’s a simple way to do it:
• First, use ListRooms to get the list of active rooms.
• Then, look at the num_participants field in the room details. If it shows 0 but the room still appears in the list, that means it’s within the departure_timeout period.
• Just so you know, the departure_timeout value (measured in seconds) is part of the room's configuration and tells you how long the room stays open after the last participant leaves.
If you’d like, I’m here to help you implement this using a specific SDK or tool—just let me know, and I can share some examples to make it easier for you.
Sources: protobufs/livekit_models.proto | packages/livekit-server-sdk/src/RoomServiceClient.ts | src/main/kotlin/io/livekit/server/RoomServiceClient.kt | autocomplete/fish_autocompletefierce-jordan-44682
09/18/2025, 8:18 AMasync with LiveKitAPI() as lkapi:
res = await lkapi.room.list_rooms()
i thought the positional argument is optional?tall-airline-16756
09/18/2025, 8:19 AMlist_rooms() method in the LiveKit Python SDK expects a ListRoomsRequest object as an argument, even if you just want to list all rooms without any filters. This argument is required, so it can’t be left out.
No worries though! To fix this, you can simply pass an empty ListRoomsRequest object like this:
from livekit import api
from livekit.protocol.room import ListRoomsRequest
# Initialize the SDK
lkapi = api.LiveKitAPI()
# List all rooms
rooms_response = await lkapi.room.list_rooms(ListRoomsRequest())
print(rooms_response.rooms)
If you’d like to filter by specific room names, you can include them inside the ListRoomsRequest object like this:
rooms_response = await lkapi.room.list_rooms(ListRoomsRequest(names=["room1", "room2"]))
print(rooms_response.rooms)
Please feel free to reach out if you have any more questions or need a hand with anything else—I’m here to help!
Sources: examples/api.py