what's the recommended way to deploy multiple agen...
# ask-ai
h
what's the recommended way to deploy multiple agents?
t
Thanks for reaching out, Xiaohan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The recommended way to deploy multiple agents depends on your specific use case. Here are the key approaches: 1. Dispatching Multiple Agents to a Single Session: • SIP Calls: Use SIP inbound calls to explicitly specify agents. This allows multiple agents within a single project. Define agents using the
room_config.agents
field in SIP dispatch rules. • Participant Connection: Include multiple
RoomAgentDispatch
entries in
RoomConfiguration
to dispatch multiple agents. 2. Scaling Agent Deployment Across Workers: • Worker Pool Model: LiveKit Agents use a worker pool model, ideal for container orchestration systems like Kubernetes. Each worker registers with the LiveKit server, which balances job dispatch across available workers. • Deployment Requirements: Use a simple
Dockerfile
ending with
CMD ["python", "agent.py", "start"]
and deploy on a platform that scales your worker pool based on load. 3. Recommended Deployment Platforms: • LiveKit Cloud Agents Beta: Run your agent on the same network and infrastructure as LiveKit Cloud, with builds, deployment, and scaling handled for you. • *Render.com:* A user-friendly platform for deploying and autoscaling workers. • Kubernetes: Ideal if you already have a running Kubernetes cluster. 4. Best Practices for Multiple Agent Deployment: • For high reliability, run multiple servers for each
agent_name
, avoid running other applications on the same server, and implement load balancing and auto-scaling. • Use separate LiveKit instances for staging, production, and development environments to avoid processing real user traffic during development. Let me know if you need further details on any of these points!