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

# Regions

> Run an agent's sandbox and session state closer to your users

By default, an agent's sandbox runs wherever capacity is available, usually in
the United States. To run sessions closer to your users or systems, set
`region` in the agent's `opencomputer.toml` and deploy again:

```toml theme={null}
schema = 1
id = "support"
name = "Support"
region = "au"
```

## Allowed values

`region` takes one of the values below.
OpenComputer places the agent's sandbox in that region, and creates session
state in the nearest Cloudflare location:

| `region` | Sandbox runs in | Session state placed near |
| - | - | - |
| omitted | wherever capacity is available, usually the United States | the first request |
| `"us"` | anywhere in the United States | eastern North America |
| `"eu"` | anywhere in the European Economic Area | western Europe |
| `"ap"` | anywhere in Asia-Pacific | Asia-Pacific |
| `"us-east"`, `"us-central"`, `"us-south"` | that part of the United States | eastern North America |
| `"us-west"` | western United States | western North America |
| `"ca"` | Canada | eastern North America |
| `"mx"` | Mexico | western North America |
| `"eu-west"`, `"eu-south"` | that part of Europe | western Europe |
| `"eu-north"` | northern Europe | eastern Europe |
| `"uk"` | United Kingdom | western Europe |
| `"ap-northeast"`, `"ap-southeast"`, `"ap-south"` | that part of Asia-Pacific | Asia-Pacific |
| `"jp"` | Japan | Asia-Pacific |
| `"au"`, `"ap-melbourne"` | Australia | Oceania |
| `"me"` | Middle East | Middle East |
| `"sa"` | South America | South America |
| `"af"` | Africa | Africa |

A broad region (`us`, `eu`, `ap`) lets the sandbox run anywhere inside it, so
it starts sooner when capacity is tight. A narrow region pins it more
precisely.

* Values are lowercase and exact. `"AU"` and cloud zone names such as
  `"ap-southeast-2"` or `"us-east-1"` are rejected.
* The value must be a quoted string. `region = au` is rejected.
* To go back to the default, remove the `region` line and deploy again.

An unsupported value stops the deploy before anything is uploaded:

```text theme={null}
opencomputer.toml region "us-east-1" is not supported; use one of: us, eu, ap, us-east, …
```

The API rejects it too, with `400 unsupported_region`, if you call
`POST /v1/deployments` directly.

## What the region covers

* **Sandbox.** The agent's sandbox, where `sandbox_exec` and other tools run,
  is created in the region. Its outbound traffic leaves from that region too.
* **Session state.** Session state is created near the region. This placement
  is best effort.
* **Not moved.** Account-level data, such as project and deployment records,
  stays where it is.

## Changing the region

A region change applies to sessions started after the deploy. Existing
sessions stay where they started. Each agent in a project has its own
`opencomputer.toml`, so agents in one project can run in different regions.

## Cold starts

The first session after you deploy to a new region is slower to start. The
agent's sandbox image has to be pulled into that region, and the first tool
call can take a few minutes. Later sessions reuse the cached image and start
much faster. To take the cold start before your users do, start one session
that runs a command after the deploy. The sandbox starts only on the first tool
call, so a session that only chats does not warm it:

```sh theme={null}
opencomputer session "Run: echo ready"
```


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