Cua SDK
Build agentic applications and workflows on isolated Linux, Windows and macOS desktops, on your machine or in the cloud.
Build agentic applications and workflows on isolated Linux, Windows and macOS desktops, on your machine or in the cloud.
Build agentic apps and workflows on real desktops. Cua SDK gives your application isolated Linux, Windows and macOS machines, locally or in the cloud, runs the agents you already use inside them, and streams everything back so your users can watch, take over or teleport work in and out. Cua Driver is how the agents drive each desktop.
The same code runs on your machine (local=True, the default) or in the cloud
(local=False). Any OCI image works; commands, services, readiness probes,
public URLs and port forwards behave the same on both.
from cua_sandbox import Image, Sandbox, http
async with Sandbox.ephemeral(
Image.from_registry("python:3.12-slim"),
command=["python", "-m", "http.server", "8000"],
services={"web": 8000},
wait_for=http("web", "/"),
local=True,
) as sb:
print((await sb.service("web").request("GET", "/")).status_code) # 200Local (local=True) | Cloud (local=False) | |
|---|---|---|
| Runs on | Docker or Podman (gVisor when installed), QEMU, or Lume on this machine | Cua cloud at run.cua.ai: gVisor containers, KubeVirt VMs |
| Setup | cua runtime doctor, cua runtime setup | cua auth login |
| Architecture | The host's (other architectures run emulated) | amd64 |
| macOS | Lume VMs on Apple silicon | Not available |
| Details | Local runtimes | Cloud sandboxes |
For named pools, fixed warm capacity or Terraform, see Cua Fleets.
| Language | Package |
|---|---|
| Python | cua-sandbox (from cua_sandbox import Sandbox), over the cua SDK (import cua) |
| TypeScript | @trycua/cua |
| Rust | cua-sdk crate (git dependency), see Rust crates |
| Swift | Cua (SwiftPM) |
| CLI | cua sb ..., see Cua CLI |
The SDK is one Rust core with generated bindings, running in your process or
in cua daemon. It starts local runtimes itself and reaches the cloud through
the Fleet gateway. Nothing needs to run inside the image; images that ship
cua-spacesd (such as Image.linux()) also get the
computer interfaces: sb.shell, sb.files, sb.screen, sb.mouse,
sb.keyboard. See How sandboxes work.
To control the machine you are on instead of a sandbox, use Cua Driver.
Next: Your first sandbox.