<#C088ZNU7QQ5|> so i have a shell script which wil...
# ask-ai
s
#C088ZNU7QQ5 so i have a shell script which will start 4 agents. if i host in the livekit cloud will that work?? this is the script i have #!/bin/bash set -e # Export all environment variables for child processes export LIVEKIT_URL="${LIVEKIT_URL}" export LIVEKIT_API_KEY="${LIVEKIT_API_KEY}" export LIVEKIT_API_SECRET="${LIVEKIT_API_SECRET}" export GOOGLE_API_KEY="${GOOGLE_API_KEY}" export MANAGER_API_URL="${MANAGER_API_URL}" export MANAGER_API_SECRET="${MANAGER_API_SECRET}" echo "Environment variables exported for workers" echo "LIVEKIT_URL: ${LIVEKIT_URL}" echo "Starting Cheeko Agent Worker on port 8081..." python workers/cheeko_worker.py dev & echo "Starting Math Tutor Agent Worker on port 8082..." python workers/math_tutor_worker.py dev & echo "Starting Riddle Solver Agent Worker on port 8083..." python workers/riddle_solver_worker.py dev & echo "Starting Word Ladder Agent Worker on port 8084..." python workers/word_ladder_worker.py dev &
t
Thanks for reaching out, Karthik. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your question about whether that shell script (starting four agent processes with
dev
) will work if you host it on LiveKit Cloud. Short answer: No — that script will not work as-is on LiveKit Cloud. Why: • Running agents with
python ... dev
is for local testing only and does not register the agent with LiveKit Cloud’s dispatch/orchestration. • LiveKit Cloud expects agents to be deployed as managed, containerized services (one agent per deployment) so they can be registered, scaled, and load-balanced. • Running multiple agents in a single container via a shell script causes isolation and scaling issues and won’t integrate with LiveKit Cloud’s agent management. What you can do (recommended): • Package each agent so it can be deployed separately and register under its own name. • Use the LiveKit CLI commands to create and deploy agents, for example: a. Create an agent:
lk agent create --agent-name=cheeko-agent --secrets-file .env
b. Deploy it:
lk agent deploy --agent-name=cheeko-agent .
c. Repeat for
math-tutor-agent
,
riddle-solver-agent
,
word-ladder-agent
. • Let LiveKit Cloud scale instances for each agent as needed rather than starting multiple background processes in one container. If you want, I can help with: • How to refactor your repo so each worker is a separate deployable agent. • Example Dockerfile / entrypoint for a single agent. • Writing the `lk agent create`/`deploy` commands for your environment and secrets. Which would you like to do next? Sources: Agents Framework | livekit/livekit_composite | DeepWiki | Simple Call Answering Agent | LiveKit docs | Examples | livekit/livekit_composite | DeepWiki