I’m trying to understand expected behavior for LiveKit Cloud deployed agents on the Build plan when the agent is in the Sleeping state.
I’m aware of the documented cold-start behavior. The quotas/limits docs say Build-plan projects may shut down deployed agents after active sessions end, and that the agent should automatically start again when a new session begins. The docs mention this can add up to 10-20 seconds before the agent joins the room.
What I’m seeing is different: once the agent is Sleeping, I have not been able to get it to wake from CreateDispatch.
Flow:
- A backend service calls AgentDispatchService/CreateDispatch using the official Python SDK.
- The request includes:
- agent_name
- room
- JSON metadata
- The project setting “Automatically create rooms on participant join” is enabled.
- CreateDispatch succeeds immediately and returns a dispatch ID.
- The room exists and can be probed.
- The backend polls ListParticipants for 120 seconds.
- The room remains empty for the entire 120 seconds.
- No agent participant ever joins.
- No SIP participant is created; this failure happens before telephony.
- The deployed agent remains in Sleeping state.
I also tested a no-phone diagnostic dispatch using heartbeat-style metadata. Same result:
- CreateDispatch succeeds
- Room exists
- Participants stay at 0 for 60 seconds
- Agent remains Sleeping
When I try to fetch agent deploy logs after this, the CLI returns:
failed to get logs: The agent has shut down due to inactivity. It will automatically start again when a new session begins.
That message suggests a new session should wake the agent, but in practice CreateDispatch appears to create the dispatch/room without waking the deployed agent.
Earlier, before enabling auto-create rooms, CreateDispatch returned not_found: requested room does not exist. Enabling auto-create fixed that part: dispatch now succeeds on the first attempt. But it exposed this second problem, where successful dispatch does not wake the Sleeping agent.
Questions:
- On the Build plan, should CreateDispatch reliably wake a Sleeping deployed Cloud agent?
- Is there another documented API or workflow required to wake a Sleeping agent before dispatch?
- Is this expected Build-plan behavior, or should the agent join after the documented 10-20 second cold start?
- Are there project settings, quotas, or deployment states that can cause dispatches to be accepted but never assigned to a worker?
- Is the only reliable solution to upgrade to Ship for cold start prevention?
I can share project ID, agent ID, dispatch IDs, room names, and UTC timestamps privately with LiveKit staff if useful.