is there session id in AgentSession?
# ask-ai
b
is there session id in AgentSession?
t
Thanks for reaching out, Aleh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Regarding your question about AgentSession: AgentSession does not include a
session_id
field. If you need a session identifier for tracking or correlating events, what are you trying to link it to (plugins like Amazon Transcribe, analytics, or your own telemetry)? I can suggest alternatives for each case. Sources: Amazon Transcribe plugin guide | LiveKit Docs | Analytics API | LiveKit docs | Agent session | LiveKit docs | Models | LiveKit Docs
b
i need to get identifier of conversation with user
t
Thanks — to help you get the right conversation identifier, which of these fits your setup? • Are you using LiveKit AI Agents, SIP telephony integration, or standard LiveKit Rooms/SDKs? • Do you need the ID server-side (SDK) or client-side (browser/mobile)? • Do you mean a whole conversation/session ID, a chat message ID, or a call/SIP ID? If you tell me which option applies, I’ll show exactly which field to read and how to access it.
b
LiveKit AI Agents, SIP telephony integration server side whole conversation
t
Use
ctx.job.id
from the agent's
JobContext
as the unique identifier for the whole conversation session. You can also include
ctx.room.name
and
ctx.participant.identity
for extra correlation, and SIP-specific fields like
sip.callID
or
sip.phoneNumber
from
ctx.participant.attributes
if you need telephony-level identifiers. Would you like a short code example in your language (TypeScript or Python)? Sources: Agent session | LiveKit docs | Job lifecycle | LiveKit docs | SIP participant | LiveKit docs