explain difference between sid and identity
# ask-ai
t
explain difference between sid and identity
t
Thanks for reaching out, sergey. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
In LiveKit, the key difference between
sid
and
identity
is: • sid (Session ID): A unique identifier generated by the LiveKit server for a participant in a session. It is server-generated and used internally. • identity: A unique identifier that you (the developer) provide for a participant. It is application-provided and must be unique per room. If multiple participants with the same identity join a room, only the most recent one will remain connected. In version 2 of the LiveKit SDKs, some changes were made to improve clarity between these two concepts: • The participants map now uses
identity
as the key instead of
sid
. • They’ve added
Participant.Sid
and
Participant.Identity
inline value classes in Android to prevent accidentally using one in place of the other. Sources: SDK migration from v1 to v2 | LiveKit Docs | Core API primitives | LiveKit Docs
t
does LiveKit agent has sid?
t
Hey there! I totally get your question about LiveKit and sids. From what I understand, sids are usually connected to participants, rooms, and sessions. But I'm not quite sure what you mean by a "LiveKit agent" specifically. Could you tell me a bit more about what you're looking to do? I'd love to help you figure this out and make sure we're on the same page! 😊
t
does LiveKit agent participant have sid?
t
Hey there! Great question. Yes, every LiveKit agent participant does indeed have a sid. Think of it like a special name tag that LiveKit gives each participant—agents included—which helps keep track of who's who in the session. It's a unique identifier that the LiveKit server creates automatically, ensuring each participant can be easily identified. Hope this helps clarify things! Sources: Core API primitives | LiveKit Docs