elegant-television-86674
09/21/2025, 6:55 AMtall-airline-16756
09/21/2025, 6:55 AMtall-airline-16756
09/21/2025, 6:56 AMagent_name field in WorkerOptions if you want explicit dispatch. Keep in mind, if you use agent_name, the agent won’t be automatically dispatched to newly created rooms.
If you have a particular scenario in mind or need a bit more clarity, please don’t hesitate to ask—I’m here to help you every step of the way!
Sources: examples/src/multi_agent.ts | examples/agent_dispatch.py | Dispatching agents | LiveKit Docs | examples/voice_agents/README.mdtall-airline-16756
09/21/2025, 6:57 AMmulti-user-transcriber.py agent creates individual sessions for each participant in a room. Plus, you can test how well it scales using the agent-load-test utility available in the LiveKit CLI.
If you'd like, I'm here to help with more details or guide you through setting this up. Just let me know!
Sources: Deploy and scale agents on LiveKit Cloud | Going beyond a single-core | examples/other/transcription/multi-user-transcriber.py | README.mdelegant-television-86674
09/21/2025, 6:57 AMtall-airline-16756
09/21/2025, 6:58 AMagent_name in LiveKit. Just follow these simple steps:
1. Set the agent_name in WorkerOptions: Make sure to specify the same agent_name for all instances that you want to include in the same pool. For example:
opts = WorkerOptions(
agent_name="test-agent",
)
1. Run multiple instances: Launch several agent worker instances. Each one will register with LiveKit using the same agent_name.
2. Automatic load balancing: LiveKit will then distribute incoming jobs for that agent_name across all your available instances seamlessly.
3. Explicit dispatch: If you want to dispatch agents to rooms explicitly, you can use the AgentDispatchService API or CLI like this:
lkapi = api.LiveKitAPI()
dispatch = await lkapi.agent_dispatch.create_dispatch(
api.CreateAgentDispatchRequest(
agent_name="test-agent",
room=room_name
)
)
1. Scaling: Feel free to scale your instances up or down based on your workload. LiveKit takes care of registration and load balancing automatically, so you don’t have to worry.
This setup lets you easily scale your agent processing capacity horizontally while keeping a single agent_name for your clients to connect to. If you have any questions or need more help, just let me know—I’m here for you!
Sources: Dispatching agents | LiveKit Docs | Agent dispatch | LiveKit Docs | Deployment and scaling | LiveKit Docselegant-television-86674
09/21/2025, 7:00 AMtall-airline-16756
09/21/2025, 7:01 AMagent_name but with different agent IDs, this setup will work smoothly. LiveKit is designed to automatically balance the incoming jobs for that agent_name across all the registered instances. Each agent will have its own unique ID, yet they’ll work together to manage the workload for the shared agent_name.
Your dispatch code looks spot on for explicitly assigning agents with the agent_name to a specific room. If you’d like, I’m here to help clarify anything further or assist you with the next steps!elegant-television-86674
09/21/2025, 7:11 AMtall-airline-16756
09/21/2025, 7:11 AMagent_name! LiveKit makes this process really smooth by automatically handling their registration and load balancing. Let me walk you through how it works:
• Registration: Each time an agent instance starts, it registers itself with LiveKit. When several instances share the same agent_name, they’re grouped together into a pool for that name.
• Load Balancing: LiveKit thoughtfully distributes incoming jobs or tasks for that shared agent_name across all the instances in the pool. This way, no single instance gets overwhelmed while others are waiting around.
• Scaling: If you add or remove agent instances, LiveKit smoothly adjusts the pool and keeps balancing the load for you—no need to step in manually.
This handy automation lets you focus on what matters most—your application logic—while LiveKit takes care of the behind-the-scenes work of scaling and balancing agent workloads. If you have any more questions or need further help, I’m here for you!elegant-television-86674
09/21/2025, 7:24 AMtall-airline-16756
09/21/2025, 7:25 AMagent_name, and LiveKit will take care of balancing the load across all 10 instances for you.
If you'd like, I’m here to help you automate this process or answer any other questions you might have. Just let me know!elegant-television-86674
09/21/2025, 7:26 AMtall-airline-16756
09/21/2025, 7:27 AMload_fnc and load_threshold settings in WorkerOptions.
2. Hardware Recommendations: A good starting point is 4 CPU cores and 8GB of memory per worker. Usually, this setup can handle about 10-25 concurrent jobs, depending on how complex the agent’s tasks are.
3. Load Testing: I recommend using the LiveKit CLI’s lk perf agent-load-test command to simulate multiple concurrent rooms and see how your setup performs under real conditions. Here’s an example:
lk perf agent-load-test \
--rooms 5 \
--agent-name test-agent \
--echo-speech-delay 10s \
--duration 5m
1. Cloud Deployments: If you’re using LiveKit Cloud, it’s great because it automatically scales agent instances based on load, so you won’t need to worry about manually adjusting capacity.
By running these load tests and keeping an eye on performance, you’ll get a clear sense of when it’s time to add more agents to keep up with demand. If you’d like, I’m here to help you set up those load tests or configure your agents—just let me know!
Sources: Worker options | LiveKit Docs | Deploying to custom environments | LiveKit Docs | pkg/loadtester/agentloadtester.go | Deploy and scale agents on LiveKit Cloudelegant-television-86674
09/21/2025, 7:29 AMtall-airline-16756
09/21/2025, 7:29 AMlk perf agent-load-test command, the agents aren’t actually speaking or processing real audio. Instead, this tool creates a simulated environment with participants and agents to help measure how your system performs under load. So, it doesn’t include the extra processing work involved in things like noise cancellation, speech-to-text, or other AI tasks.
If your agents are handling resource-heavy tasks like real-time audio processing or AI-driven interactions, it’s important to keep that extra load in mind when figuring out your system’s capacity. You might want to try running some custom tests with real workloads to get a clearer picture of what your system can handle. I’m here to help if you’d like some guidance on setting those up!elegant-television-86674
09/21/2025, 7:30 AMtall-airline-16756
09/21/2025, 7:31 AMlisten_to_agents=True in RoomInputOptions or by including AGENT in participant_kinds. Here’s a quick example:
room_io = RoomIO(
session,
room=ctx.room,
input_options=RoomInputOptions(
listen_to_agents=True # Allows agents to hear each other
)
)
• Text-to-Speech (TTS): Make sure both agents have TTS set up so they can produce audible responses.
• Permissions: Double-check that both agents have the rights to publish and subscribe to audio tracks within the room.
• Load Balancing: LiveKit takes care of distributing agents across worker instances automatically to keep things running efficiently.
With these configurations, your two agents will be able to interact seamlessly in the same room—perfect for automated conversations or testing scenarios. If you’d like, I’m here to help you walk through the setup or answer any questions you might have!
Sources: Anatomy of an Agent | LiveKit Docs | How to Enable Agent-to-Agent Speech Detection in LiveKit | Agent Testing & Evaluation | livekit/livekit_composite | DeepWiki | An open source stack for real-time multimodal AI | Deployment and scaling | LiveKit Docselegant-television-86674
09/22/2025, 3:29 AMtall-airline-16756
09/22/2025, 3:30 AMelegant-television-86674
09/22/2025, 3:31 AMtall-airline-16756
09/22/2025, 3:32 AMelegant-television-86674
09/22/2025, 3:43 AMtall-airline-16756
09/22/2025, 3:43 AMelegant-television-86674
09/22/2025, 3:45 AMtall-airline-16756
09/22/2025, 3:45 AMelegant-television-86674
09/22/2025, 3:48 AMtall-airline-16756
09/22/2025, 3:48 AM