Skip to main content

Agent deployment

Configure and manage agent deployments across multiple regions.

Overview

When you deploy an agent on LiveKit Cloud, you assign it to a specific region. The region determines where the agent's compute resources run and can't be changed after creation. By default, users connect to the deployment closest to them, which minimizes network latency and keeps interactions responsive.

For global apps, you can deploy the same agent to multiple regions. This provides redundancy and lets users connect to a nearby deployment for lower latency. You can also control region assignment explicitly using agent dispatch to route users to specific regional deployments based on your app's requirements.

Deployment regions

Each agent deployment runs in a single region, which you select when you first deploy the agent. You can't change an agent's region after creation, but you can deploy it to multiple regions. For the current list of available regions, see Agent deployment regions.

Agents created with Agent Builder deploy by default to the agent hosting region mapped to your project data region. The project data region is fixed when the project is created. When you deploy with the CLI, use the --region flag to choose the region for each agent.

EU data residency

Deploying to eu-central keeps agent compute in the EU, but this is only one part of configuring a project for EU data residency. To configure EU data residency across every layer of the stack, see EU data residency.

The project data region, which determines where session analytics and agent observability data are stored, is fixed when the project is created. To keep that data in the EU, create a new project with the EU data region.

Deploying to the EU with a non-EU data region

If the project data region is outside the EU, the CLI warns you when you deploy an agent to an EU region. The warning explains that session audio recordings, transcripts, and traces for the agent are stored outside the EU, and asks you to confirm before deploying. In non-interactive mode, the CLI prints the warning and proceeds without confirmation.

Multi-region deployments

To deploy an agent in multiple regions, use lk agent create once per region. To keep track of the deployments, add the region to the configuration filename. For instance, these commands deploy a new agent to both us-east and eu-central regions:

lk agent create --region us-east --config livekit.us-east.toml
lk agent create --region eu-central --config livekit.eu-central.toml

Now you can deploy the agent to each region as needed by specifying the appropriate configuration file:

lk agent deploy --config livekit.us-east.toml
lk agent deploy --config livekit.eu-central.toml

By default, users connect to the agent in the region closest to them. In some cases, if agents are at capacity, users may connect to an agent in a different region. For fine-grained control over which regions users connect to, set a separate agent name for each region and use explicit dispatch to directly assign users to the appropriate agent.

Moving an agent to a new region

To move an existing agent to a new region, you should follow the preceding steps for multi-region deployments to add a deployment in the new region. Then, you can delete the agent in the old region using lk agent delete, specifying the old agent's ID or configuration file.