can livekit agent have the same session but differ...
# ask-ai
s
can livekit agent have the same session but different SIP
✅ 1
t
Thanks for reaching out, Joshua. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — quick clarification so I answer precisely: by “same session” do you mean the same LiveKit Room/session ID with the agent joining multiple SIP endpoints simultaneously, or the same user/account switching between different SIP identities over time within one session? Also tell me: • Are you using LiveKit's SIP gateway or a custom SIP integration? • Do you need both SIP endpoints active at once, or just one active at a time?, with interactive elements
s
can livekit agent exist on different room at the same time ?
t
Thanks — regarding your question about an agent existing in different rooms at the same time: A single agent process/job can only join one LiveKit room at a time. To have the “same” agent present in multiple rooms simultaneously, run multiple instances (separate jobs/processes) of that agent. An agent server can host many concurrent jobs, and LiveKit dispatches a new job per room so you can scale horizontally by running multiple agent instances. Sources: Server lifecycle | LiveKit Documentation, with interactive elements
s
is this the dispatch ?
t
Yes — “dispatch” is the mechanism that assigns an agent job to a specific room. • When a room needs an agent, LiveKit (or your agent server) starts a new agent job/process and dispatches it to that room. • Each dispatched job is tied to one room, so to have the same logical agent in multiple rooms you run multiple dispatched instances (separate jobs/processes). • The dispatch system handles routing and starting those jobs so you can scale agents across many rooms. Would you like guidance on configuring your agent server to run multiple jobs or on how to identify/manage dispatched jobs? , with interactive elements
s
can agent exist on diffent room at the same time.
t
Short answer: No — a single agent process/job can only join one room at a time. You can have the same logical agent in multiple rooms simultaneously by running multiple instances (separate jobs/processes) of that agent. The dispatch mechanism starts a new job per room so you can scale horizontally. Would you like help with configuring your agent server to run multiple jobs or with identifying dispatched jobs? , with interactive elements
s
can it be done on livekit dashboard dispatch room
can it be done on livekit dashboard dispatch rule
t
Yes — the LiveKit Cloud dashboard lets you configure dispatch rules to control how agents are assigned to rooms. • You can create/edit dispatch rules under Telephony → Dispatch Rules to route calls, set a
room_name
or
room_prefix
, and specify an
agent_name
to be dispatched to that room. • However, a single agent process/job can only join one room at a time. To have the same logical agent present in multiple rooms simultaneously you must run multiple instances (separate jobs/processes) of that agent; dispatch rules and scaling your agent servers enable that. Would you like help creating a dispatch rule or guidance on scaling agent instances? , with interactive elements
s
how to scale agent
t
Thanks — I’ll walk you through how to scale agents so the same logical agent can handle many rooms. Quick answer • Run multiple agent instances (separate jobs/processes) with the same
agent_name
. Each process handles one room at a time, and the dispatcher distributes rooms across instances. How to scale (high level) 1. Horizontal scaling ◦ Start more agent server instances (or more worker processes) using the same
agent_name
. The dispatcher treats them as interchangeable workers and assigns new rooms to available instances. 1. Configure load management ◦ Use
load_fnc
and
load_threshold
on agent servers so the dispatcher knows capacity (default uses CPU; default threshold ~0.7). Tune thresholds to match your autoscaling policy. 1. Autoscaling ◦ Autoscale agent servers by CPU (or your chosen metric). Scale up at a lower threshold than
load_threshold
(e.g., scale up at 0.5 if threshold is 0.7) to avoid rejecting jobs under sudden load. 1. Capacity & resources ◦ Start with ~4 CPU cores and 8GB RAM per agent server as a baseline; one server typically handles ~10–25 concurrent jobs depending on workload. 1. Graceful draining ◦ When removing instances, allow existing jobs to complete (use SIGTERM/SIGINT handling and a 10+ minute grace period for voice apps). LiveKit Cloud vs self-hosted • LiveKit Cloud handles load balancing and elastic placement for you. • Self-hosted requires you to run multiple servers/processes and configure autoscaling and load thresholds. If you want, I can: • Give a sample deployment approach for Kubernetes or Docker. • Recommend specific autoscaling settings based on your expected concurrency and CPU profile. Which would you like next? Sources: Self-hosted deployments | LiveKit Documentation | Avoiding crosstalk when multiple developers share a LiveKit project | LiveK... | Voice Agent Architecture: STT, LLM, and TTS Pipelines Explained | LiveKit | Agents Framework | livekit/livekit_composite | DeepWiki | Deploy and scale agents on LiveKit Cloud | LiveKit, with interactive elements