Your cloud
Sandboxes and Spaces in your own AWS, Google Cloud or Modal account: connect, check, and sweep what Cua created there.
Sandboxes and Spaces in your own AWS, Google Cloud or Modal account: connect, check, and sweep what Cua created there.
Create a sandbox or Space with on="aws", "gcp" or "modal" once the cloud is connected. Each cloud uses its own CLI sign-in; Cua stores only the profile, region, project or environment names. The guest dials out to the cua.ai relay, so nothing listens on the internet. cloud_test creates nothing; cloud_sweep deletes only what Cua tagged and recorded.
Methods of Spaces.
Spaces.cloud_status#Your clouds: found credentials, the connected account and region,
what each can run at what hourly cost, and what Cua created there.
provider narrows it to one cloud.
async def cloud_status(self, provider: Optional[str]) -> CloudStatus| Parameter | Type | Default |
|---|---|---|
provider | Option<String> | required |
Returns CloudStatus ยท Async ยท Raises CuaError
Spaces.cloud_connect#Connects a cloud account (after the checks cloud_test runs). With
make_default, Spaces are created there when no location is given.
ttl_hours (default 8, 0: never) deletes each Space there after
that long.
async def cloud_connect(self, target: CloudTarget, make_default: bool, ttl_hours: Optional[int]) -> CloudConnected| Parameter | Type | Default |
|---|---|---|
target | CloudTarget | required |
make_default | bool | required |
ttl_hours | Option<u32> | required |
Returns CloudConnected ยท Async ยท Raises CuaError
Spaces.cloud_test#Checks a cloud account without creating anything.
async def cloud_test(self, target: CloudTarget) -> CloudTestReport| Parameter | Type | Default |
|---|---|---|
target | CloudTarget | required |
Returns CloudTestReport ยท Async ยท Raises CuaError
Spaces.cloud_disconnect#Forgets a connected cloud (nothing in it is deleted).
async def cloud_disconnect(self, provider: str) -> CloudDisconnected| Parameter | Type | Default |
|---|---|---|
provider | String | required |
Returns CloudDisconnected ยท Async ยท Raises CuaError
Spaces.cloud_sweep#What Cua left in your clouds (expired Spaces, resources whose Space
is gone; with all, everything Cua created there). Deletes it
unless dry_run. Only resources tagged and recorded as Cua's are
ever touched.
async def cloud_sweep(self, provider: Optional[str], dry_run: bool, all: bool) -> CloudSweepReport| Parameter | Type | Default |
|---|---|---|
provider | Option<String> | required |
dry_run | bool | required |
all | bool | required |
Returns CloudSweepReport ยท Async ยท Raises CuaError
CloudTarget record#Where in a cloud account Spaces go. Credentials are never here: each cloud uses its own CLI sign-in.
| Field | Type | Default | Description |
|---|---|---|---|
provider | String | aws, gcp or modal. | |
profile | Option<String> | None | AWS or Modal profile. |
region | Option<String> | None | AWS or GCP region. |
zone | Option<String> | None | GCP zone. |
project | Option<String> | None | GCP project. |
environment | Option<String> | None | Modal environment. |
CloudStatus record#cloud_status.
Returned by Spaces.cloud_status.
| Field | Type | Default | Description |
|---|---|---|---|
default_on / defaultOn | String | default.on, for example aws. | |
providers | Vec<CloudProvider> | ||
resources | Vec<CloudResource> |
CloudProvider record#One cloud as cloud_status lists it.
| Field | Type | Default | Description |
|---|---|---|---|
name | String | aws, gcp, modal. | |
title | String | AWS, Google Cloud, Modal. | |
tier | String | vm or sandbox. | |
connected | bool | ||
default | bool | Whether it is the default location (default.on). | |
credentials | CloudCredentials | ||
account | String | The account, project or workspace (after a test or connect). | |
profile | String | ||
region | String | ||
zone | String | ||
project | String | ||
environment | String | ||
label | String | "AWS ยท us-west-2". | |
ttl_hours / ttlHours | u32 | Hours after which a Space there deletes itself (0: never). | |
kinds | Vec<CloudKind> |
CloudKind record#What a cloud can run for one image family, and the estimated cost.
| Field | Type | Default | Description |
|---|---|---|---|
image | String | linux, linux-slim, windows, omarchy, macos. | |
kind | String | container or vm. | |
supported | bool | ||
reason | String | Why not, or how it runs (one line). | |
machine_type / machineType | String | The machine type Cua picks (t3.medium, e2-medium). | |
usd_per_hour / usdPerHour | f64 | Estimated on-demand US dollars per hour while it runs. |
CloudCredentials record#Where a cloud's credentials were found on this machine (never a secret).
| Field | Type | Default | Description |
|---|---|---|---|
found | bool | ||
source | String | "~/.aws profile default", "gcloud account ada@x.io". |
CloudResource record#One thing Cua created in a cloud.
| Field | Type | Default | Description |
|---|---|---|---|
provider | String | ||
id | String | The cloud's id. | |
resource_type / resourceType | String | instance, security_group, firewall, sandbox, ... | |
sandbox | String | The sandbox it belongs to (aws:<name>), empty for shared resources. | |
machine | String | The relay machine the sandbox joined as (its Space is relay:<machine>). | |
region | String | ||
state | String | ||
created | String | RFC 3339. | |
expires | String | RFC 3339, empty: never. | |
expired | bool |
CloudConnected record#cloud_connect: the connected cloud and the checks it passed.
Returned by Spaces.cloud_connect.
| Field | Type | Default | Description |
|---|---|---|---|
provider | CloudProvider | ||
checks | Vec<CloudCheck> |
CloudCheck record#One check cloud_test ran.
| Field | Type | Default | Description |
|---|---|---|---|
name | String | ||
ok | bool | ||
detail | String |
CloudTestReport record#cloud_test.
Returned by Spaces.cloud_test.
| Field | Type | Default | Description |
|---|---|---|---|
provider | String | ||
ok | bool | ||
account | String | ||
checks | Vec<CloudCheck> |
CloudDisconnected record#cloud_disconnect.
Returned by Spaces.cloud_disconnect.
| Field | Type | Default | Description |
|---|---|---|---|
provider | String | ||
disconnected | bool | ||
left | Vec<CloudResource> | Resources Cua still records there. |
CloudSweepReport record#cloud_sweep.
Returned by Spaces.cloud_sweep.
| Field | Type | Default | Description |
|---|---|---|---|
dry_run / dryRun | bool | ||
resources | Vec<CloudSweepItem> |
CloudSweepItem record#One row of cloud_sweep.
| Field | Type | Default | Description |
|---|---|---|---|
resource | CloudResource | ||
action | String | delete (dry run), deleted, keep or failed. | |
reason | String |