crooked-tiger-31253
10/31/2025, 10:12 PMtall-airline-16756
10/31/2025, 10:12 PMtall-airline-16756
10/31/2025, 10:12 PMkind field in the ParticipantInfo object. When it shows AGENT, that means the participant is a LiveKit agent. And if you’re using SDKs like Swift, you can also check the isAgent property for a quick confirmation.
Sources: Community & Support | livekit/livekit_composite | DeepWiki | Rooms, participants, and tracks | LiveKit docs | Core Platform Architecture & Authentication | livekit/livekit_composite | D... | livekit/livekit_models.pb.go | livekit-protocol/src/livekit.rscrooked-tiger-31253
10/31/2025, 10:38 PMtall-airline-16756
10/31/2025, 10:38 PMListParticipants API. This handy API gives you a list of ParticipantInfo objects for everyone currently in the room. Just make sure your token has the roomList grant so you can access this feature smoothly.
Now, if you want to tell agents and customers apart, you can look at the kind field in each ParticipantInfo object:
• AGENT: These are your server-side agents coming from the LiveKit Agents Framework.
• STANDARD: These represent regular end-users or customers.
Here’s a quick example in Python to help you get started:
agents = [p for p in participants.participants if p.kind == "AGENT"]
customers = [p for p in participants.participants if p.kind == "STANDARD"]
And if you’re using the Swift SDK, it’s even simpler—you can directly grab the agents with the agentParticipants property like this:
let agentParticipants = room.agentParticipants
If you have any questions or need more help, feel free to ask. We're here to make sure everything goes smoothly for you!
Sources: Managing participants | LiveKit docs | Core Platform Architecture & Authentication | livekit/livekit_composite | D... | Sources/LiveKit/Agent/Room+Agent.swiftcrooked-tiger-31253
10/31/2025, 10:40 PMtall-airline-16756
10/31/2025, 10:40 PMListParticipants API in LiveKit! Here's a simple way to get started:
Python Example:
from livekit import api
# Initialize the API client
lkapi = api.LiveKitAPI()
room_service = lkapi.room
# List participants in a room
list_request = ListParticipantsRequest(room="room-name")
response = await room_service.list_participants(list_request)
# Access the participants
participants = response.participants # List[ParticipantInfo]
Just a quick note: Make sure your token has room_admin=True privileges for the room you're querying to access this information.
About the ParticipantInfo Object: Each participant includes these helpful details:
• sid: Unique ID for the participant.
• identity: The unique identity they used to connect.
• state: Their current state (like JOINING, JOINED, ACTIVE, or DISCONNECTED).
• kind: The type of participant (such as STANDARD or AGENT).
• metadata: Any user-specified metadata.
• joined_at: When they joined the room.
• tracks: The list of tracks they've published.
If you'd like, I’m here to help with more details or examples for other SDKs—just let me know!