When I use LiveKit cloud I notice that using the C...
# ask-ai
e
When I use LiveKit cloud I notice that using the CLI to deploy means that I only have one agent-id. I probably need to have one for livekit-agent-staging and livekit-agent-production - how would I manage this to ensure that we have proper separation? Can LiveKit CLI specify an agent name?
t
Thanks for reaching out, Arthur. 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 having separate agent IDs for staging and production and whether the LiveKit CLI can specify an agent name. Short answer: the CLI does not let you set an “agent name” for environment separation. Use separate LiveKit Cloud projects for staging and production so each environment gets its own agent ID, API keys, and subdomain. How to do that: 1. Create two projects (e.g., myapp-staging, myapp-prod). 2. Switch CLI context to the target project: ◦
lk project list
◦
lk project set-default "myapp-staging"
(or
"myapp-prod"
) 1. Deploy the agent in that project (
lk agent create
/
lk agent deploy
). Each project will get a distinct
agent_id
recorded in
livekit.toml
. Notes: • The
agent_name
field is for dispatch routing (to identify agent types like
voice-assistant
), not for separating environments. • Best practice: keep staging and production in separate projects and avoid sharing API keys or agent IDs across them. If you’d like, tell me your project names and which CLI command you’ll run next and I’ll outline the exact commands and what to expect in
livekit.toml
. Sources: Deploying to production | LiveKit Docs | Agent dispatch | LiveKit docs | Agents Framework | livekit/livekit_composite | DeepWiki