On the build plan, the agent session concurrency l...
# ask-ai
m
On the build plan, the agent session concurrency limit is 20. What I want to know is that is if that is only for agents deployed to LiveKit Cloud, or if I deploy my agents to Render, if I'm still limited to those 20
t
Thanks for reaching out, Jackson. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking whether the Build plan's 20-agent session concurrency limit applies only to agents on LiveKit Cloud or also to agents you deploy on Render. The 20-session concurrency limit applies only to agents running on LiveKit Cloud. If you deploy agents to Render (or your own infrastructure), that LiveKit Cloud concurrency limit does not apply — your concurrency is governed by your deployment's resources and scaling (e.g., autoscaling,
load_fnc
/
load_threshold
on AgentServer, and Render/Kubernetes settings). Would you like guidance on configuring autoscaling or
load_threshold
for a Render deployment? Sources: Agent server options | LiveKit docs | Deploying to custom environments | LiveKit docs | Quotas and limits | LiveKit docs
m
If I were hitting concurrency rate limits for agent sessions, what would be the behavior that I would anticipate happening with my agents?
t
You're asking what you'll see happen if you hit agent session concurrency limits. Expect the following: • New agent sessions will fail to start immediately — attempts to create or join an agent-backed session will be rejected. • Requests are rejected (not queued or delayed); callers will see errors/timeouts when trying to establish a session. • Job dispatches to agents will fail when the account-level cap is reached, so agents won't receive new assignments. • Dashboard/metrics will show active agent sessions at or near the concurrency limit; logs may show JobRequest failures or dispatch timeouts. • Normal recovery occurs once concurrent sessions drop below the limit; new sessions can then be created. If you want, I can help you detect this in logs/metrics or suggest monitoring thresholds and autoscaling settings to avoid hitting the cap. Sources: Quotas and limits | LiveKit docs | Agent server | LiveKit docs | Agents Framework | livekit/livekit_composite | DeepWiki | Analytics API | LiveKit docs
m
Yeah, go ahead and do
t
I'll help you set up detection, monitoring, and mitigation so you can spot and avoid hitting agent session concurrency limits. 1) Detecting limit hits • Watch for failed session creation errors in your agent and server logs (errors indicating concurrency limit exceeded or JobRequest failures/dispatch timeouts). • Dashboard: monitor active agent session count reaching the plan limit. • Instrument metrics: track a gauge for
active_agent_sessions
and a counter for
agent_session_failures
. 2) Monitoring & alerts • Create alerts when
active_agent_sessions
≥ 80–90% of your plan limit (e.g., for a 20 limit, alert at 16–18). • Alert on spikes in
agent_session_failures
or dispatch timeouts (e.g., >5 failures/min). • Send alerts to your existing channels (PagerDuty, Slack, email). 3) Short-term mitigation • Return a clear error to callers when session creation fails so clients can surface a friendly message and optionally retry after backoff. • Implement client-side exponential backoff with a max retry window and user-facing messaging indicating capacity is full. 4) Long-term mitigation • Scale your own agent workers (for Render/Kubernetes): add instances and configure autoscaling policies based on
active_agent_sessions
or CPU/memory. • Tune AgentServer
load_fnc
/
load_threshold
so workers accept jobs only when under desired load. • If using LiveKit Cloud and you consistently hit limits, consider plan upgrade to raise account-level concurrency. 5) Suggested metrics to collect • active_agent_sessions (gauge) • agent_session_attempts (counter) • agent_session_failures (counter) • agent_dispatch_latency (histogram) • agent_worker_load (gauge) 6) Next steps I can help with • Draft alert rules for your monitoring stack (Prometheus/Cloud Monitoring) and example queries. • Example log patterns to search for in your logging system. • Suggested
load_threshold
values and autoscaling rules for Render or Kubernetes. Which of those would you like first — alert rules, log search patterns, or autoscaling/load_threshold examples?