many-forest-60185
12/28/2025, 7:29 AMtall-airline-16756
12/28/2025, 7:29 AMtall-airline-16756
12/28/2025, 7:29 AMAgentSession. Yes — there isn't a built‑in start_time property, but you can record the timestamp when the session actually starts and attach it to the session or JobContext.
A simple approach:
1. Capture the time in your entrypoint right before/when you call session.start().
2. Store it on the session (e.g., session.userdata["session_start_time"]) or log it via ctx for later use.
Example (Python):
import datetime
@server.rtc_session()
async def entrypoint(ctx: JobContext):
session_start_time = datetime.datetime.now(datetime.timezone.utc)
session = AgentSession(...)
session.userdata["session_start_time"] = session_start_time
await session.start(agent=MyAgent(), room=ctx.room)
await ctx.connect()
If you need higher precision or an event-based marker, emit a custom start event from the agent when the room connection completes or use your observability tooling to record the exact moment the connection is established.
Sources: Agents (Node.js) | livekit/livekit_composite | DeepWiki