> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slng.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent regions

> Agent region codes, SLNG Managed and LiveKit Cloud hosting, runtimes, and how an agent's region is set and changed.

An agent's region is where its conversations run: the worker that holds the call,
and the regional gateway its Listen, Think, and Speak requests go through. The
agent's `region` field holds the agent region code. For why the region matters, see
[Regions](https://docs.slng.ai/concepts/whats-slng/regions.md).

## Agent region codes

SLNG Managed agent regions use the gateway codes in the speech and Context Router
base URLs, such as `us-east`. LiveKit Cloud agent regions have codes of their own,
which end in `-livekit`.

| Region | Agent `region` | Hosting | Runtimes |
| - | - | - | - |
| Netherlands | `eu-north` | SLNG Managed | LiveKit, Pipecat |
| Germany | `eu-west` | SLNG Managed | LiveKit, Pipecat |
| United States (East) | `us-east` | SLNG Managed | LiveKit, Pipecat |
| United States (West) | `us-west` | SLNG Managed | LiveKit, Pipecat |
| Australia | `au` | SLNG Managed | LiveKit, Pipecat |
| Brazil | `br` | SLNG Managed | LiveKit, Pipecat |
| United Kingdom | `gb` | SLNG Managed | LiveKit, Pipecat |
| Indonesia | `id` | SLNG Managed | LiveKit, Pipecat |
| Israel | `il` | SLNG Managed | LiveKit, Pipecat |
| India | `in` | SLNG Managed | LiveKit, Pipecat |
| Japan | `jp` | SLNG Managed | LiveKit, Pipecat |
| Singapore | `sg` | SLNG Managed | LiveKit, Pipecat |
| South Africa | `za` | SLNG Managed | LiveKit, Pipecat |
| United States | `us-east-livekit` | LiveKit Cloud | LiveKit |
| European Union | `eu-central-livekit` | LiveKit Cloud | LiveKit |
| India | `ap-south-livekit` | LiveKit Cloud | LiveKit |

* **SLNG Managed:** the agent runs on SLNG infrastructure in that region, with LiveKit
  or Pipecat as the runtime.
* **LiveKit Cloud:** the agent runs on LiveKit Cloud, with LiveKit as the runtime.

> [!NOTE]
>
> LiveKit Cloud's regions end in `-livekit`: `us-east-livekit` is the LiveKit Cloud
> option in the United States and `us-east` is the SLNG Managed one.
> `ap-south-livekit` (LiveKit Cloud) and `in` (SLNG Managed) are likewise two
> different India options. Retired codes fail with `422 AGENT_REGION_RENAMED`, and
> the error names the new code: `eu-central` and `ap-south`, LiveKit Cloud's codes
> before the suffix, and `us-east-slng`, SLNG Managed's US East before it took
> `us-east`.

> [!WARNING]
>
> `us-east` was LiveKit Cloud's US East before it became `us-east-livekit`. Code
> written before then that sends `us-east` for LiveKit Cloud now gets SLNG Managed's
> US East: send `us-east-livekit` instead.

To list the agent regions your organisation can use, call
[`GET /v1/agents/regions`](https://docs.slng.ai/api-reference/agents/list-agent-regions) with your API
key. Each row is one region and runtime, with its hosting and the place its agents
run in. A tool that builds agents can read the codes there instead of keeping its
own list. Filter with `orchestrator` or `world_part`.

```bash Request theme={null}
curl "https://api.agents.slng.ai/v1/agents/regions?orchestrator=pipecat" \
  -H "Authorization: Bearer $SLNG_API_KEY"
```

```json Response theme={null}
{
  "agent_regions": [
    {
      "code": "us-east",
      "label": "US East",
      "sort_order": 4,
      "is_default": false,
      "hosting": "slng",
      "orchestrator": "pipecat",
      "world_part_code": "us-east",
      "world_part_label": "United States (East)"
    }
  ]
}
```

## How an agent gets its region

The region and the runtime (`orchestrator`, `livekit` or `pipecat`) together pick
the worker connection the agent runs on. Both runtimes use the same models, so the
models you can pick depend on the region and language, not on the runtime.

> [tab] Dashboard
>
> On the **Configure your project** step, pick where the project lives under
> **Region**, and the runtime under **Orchestrator**. **Region** lists
> the gateway regions in [Region availability](https://docs.slng.ai/guides/regions/regions-map.md). A
> place where no agent of the selected runtime runs is listed but unavailable.
>
> SLNG then places the agent in an agent region at that place. The agent's
> `region` in the [Agents API](https://docs.slng.ai/api-reference/agents/get-agent.md) shows which one
> it got.

> [tab] API
>
> Set `region` in the create body to an agent region code, and `orchestrator` to
> the runtime. Pipecat runs in SLNG Managed regions only. A region where the
> runtime does not run, such as Pipecat in `eu-central-livekit`, fails with `422` on
> `region`.
>
> ```json agent.json highlight={3-4} theme={null}
> {
>   "name": "Support agent",
>   "region": "eu-west",
>   "orchestrator": "pipecat",
>   "language": "en"
> }
> ```
>
> The body above shows only the placement fields. See
> [Create an agent](https://docs.slng.ai/guides/get-started/create-a-project/create-agent.md) for a
> complete body. The agent stays in that region until you
> [change it](#change-an-agents-region).

An agent keeps the connection it has while that connection still runs its runtime
in its region. Saving other changes does not move it, and neither does SLNG
changing a region's default connection.

## Change an agent's region

Move the agent's project to change where future calls run.

> [tab] Dashboard
>
> 1. Open the project and go to **Project settings**.
> 2. Pick another place in **Region**. A place where no agent of the
>    project's runtime runs is listed but unavailable.
> 3. Confirm the move.
>
> The agent moves to an agent region at the new place, with its model
> configuration. The project's API keys work only at the new region's endpoints
> from then on. Future calls run in the new region, and calls in progress in the
> old one may drop.
>
> Changing **Orchestrator** in the same screen moves the agent to a connection
> for that runtime at the same place.

> [tab] API
>
> Send a new `region` in a partial update (`PATCH`) or a full replace (`PUT`)
> made with an API key to move the agent there.
> The project moves with the agent, to the place that region runs in:
>
> ```bash Request theme={null}
> curl -X PATCH https://api.agents.slng.ai/v1/agents/$AGENT_ID \
>   -H "Authorization: Bearer $SLNG_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"region": "in"}'
> ```
>
> To pick the place instead, send `world_part_code` with a gateway code from
> [Region availability](https://docs.slng.ai/guides/regions/regions-map.md). The agent moves to an
> agent region at that place. Send a new `region` or a `world_part_code`, not
> both.
>
> ```bash Request theme={null}
> curl -X PATCH https://api.agents.slng.ai/v1/agents/$AGENT_ID \
>   -H "Authorization: Bearer $SLNG_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"world_part_code": "eu-north"}'
> ```
>
> The response shows where the agent landed: its `region`, and its project's
> `world_part_code` and `world_part_label`.
>
> ```json Response theme={null}
> {
>   "id": "8f14e45f-ceea-467f-a0e5-9a3b6a8c1d2e",
>   "region": "eu-north",
>   "project_id": "45c48cce-2e2d-4fbd-a8b1-1d3c2f8e4a6b",
>   "world_part_code": "eu-north",
>   "world_part_label": "European Union (North)"
> }
> ```
>
> The response above shows only the placement fields. As in the Dashboard, the
> project's API keys work only at the new place's endpoints from then on, and
> calls in progress in the old region may drop. A move takes every agent in
> the project. If the runtime of any of them does not run at the new place,
> the move fails with `422`, names the field, and nothing moves.
> Sending the agent's current `region` changes nothing.
>
> A project created before this setting existed shows **Not connected** under
> **Region**. A new `region`, in a `PATCH` or a `PUT`, moves its agent and
> leaves the project unconnected. A `world_part_code` connects the project to
> that place.

Before you move an agent, check two things at the new region:

* **Models and voices.** Query the [catalog API](https://docs.slng.ai/guides/models/catalog-api.md#find-models-for-an-agent)
  with the new `agent_region` and the agent's language.
* **Phone connections.** A connection serves agents in its own region only. See
  [Telephony](https://docs.slng.ai/guides/agents/telephony/overview.md).

## Agent region and model hosting

An agent's region and the place a model is hosted can differ. A model can be
available to an agent in one region while its deployment runs in another. Use the
catalog's [region fields](https://docs.slng.ai/guides/models/catalog-api.md#region-fields) when a model
must run in a specific place.

## Next steps

> [card] [Find models for an agent](https://docs.slng.ai/guides/models/catalog-api.md)
>
> List the models and voices for an agent region and language.

> [card] [Create an agent](https://docs.slng.ai/guides/get-started/create-a-project/create-agent.md)
>
> Set the region, runtime, and models in one flow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.