After some idle time, my agent goes to "Sleeping" ...
# ask-ai
n
After some idle time, my agent goes to "Sleeping" status. If using auto dispatch, is it going to wake up the agent? I'm currently seeing "agent dispatch error" when new session created while the agent is sleeping
t
Thanks for reaching out, Yuhan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding about whether a sleeping agent will be woken by auto-dispatch and why you see an “agent dispatch error” when a new session is created while the agent is sleeping. • Yes — an agent in "Sleeping" will be automatically woken when a new session arrives (a cold start). • The “agent dispatch error” you see is likely caused by the wake-up delay: the system must scale the agent back up and initialize it before it can accept the new session, so the initial dispatch can fail if the session attempts to connect before wake completes. • To reduce failures and improve reliability: ◦ Deploy multiple agent worker instances for redundancy so a cold start on one instance doesn’t block dispatch. ◦ Consider keeping at least one warm replica (if your plan/ops allow) to avoid cold starts for critical flows. ◦ If you can tolerate a short delay, implement retry logic on session creation to retry dispatch after a brief backoff. Would you like suggestions for retry timings or help checking your current agent replica/scaling settings? Sources: Deploying to production | LiveKit Docs | Agent deployment CLI reference | LiveKit docs | Agents Framework | livekit/livekit_composite | DeepWiki
n
if I use the paid plan, can it prevent the agent from falling asleep?
t
Yes — upgrading to a paid plan prevents agents from entering the "Sleeping" state. Paid plans keep agent instances warm and ready, eliminating cold-start delays and the related dispatch errors you’re seeing. Would you like help picking a plan or guidance on verifying your current plan and replica settings? Sources: Quotas and limits | LiveKit docs | Deploying to production | LiveKit Docs | LiveKit Pricing | Deploy and scale agents on LiveKit Cloud | Deploy and scale agents on LiveKit Cloud
n
Do I need to update any configs to keep agent instances warm and ready, after I upgrading to a paid plan
t
You're asking whether any config changes are required to keep agents warm after upgrading to a paid plan. No config changes are needed. On paid LiveKit Cloud plans agents remain warm and ready automatically, so they won't enter "Sleeping" and you won't need to modify settings or
livekit.toml
. If you'd like, I can help verify your current plan or review your replica/agent status—would you like that? Sources: Deploy and scale agents on LiveKit Cloud | Deploy and scale agents on LiveKit Cloud | Deploy and scale agents on LiveKit Cloud | Quotas and limits | LiveKit docs | Deploying to production | LiveKit Docs