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

# Sandbox & lifecycle

> Execution modes, provisioned resources, and the running → sleeping → parked → destroyed lifecycle of a computer.

Every [computer](https://vetta.sh/docs/computer/index.md) is a real Linux micro-VM provisioned by Naive Managed Agents' compute layer with a fixed slice of vCPU, memory, and disk. This page covers how much you get, how to override it, and the states a computer moves through over its life.

> [!NOTE]
>
> A fully virtualized **V8-isolate** mode (`mode: "isolate"`) is **coming soon**. Today every computer is a micro-VM; everything below describes it.

## Resources

A computer is provisioned with an explicit slice of **vCPU, memory, and disk** — there are no fixed instance classes. Defaults match the platform default (**2 vCPU / 4 GiB**); raise them per workload up to the ceilings below. Resources are set at create time and priced per running-second on what you provisioned.

| Resource | Default | Range |
| - | - | - |
| vCPU | `2` | `1`–`16` |
| Memory | `4096` MiB (4 GiB) | `128`–`65536` MiB |
| Disk | service default | whole GiB, up to `100` |

```bash CLI theme={"system"}
vetta computer create --name box --vcpu 4 --memory-mb 8192 --disk-gb 40
```

```typescript TypeScript theme={"system"}
const computer = await vetta.computers.create({
  name: "box",
  vcpu: 4,
  memoryMb: 8192,
  diskGb: 40,
});
```

```bash cURL theme={"system"}
curl https://api.vetta.sh/v1/computers \
  -H "Authorization: Bearer $VETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "box", "vcpu": 4, "memory_mb": 8192, "disk_gb": 40 }'
```

## What it costs

There is **no creation fee**. A computer is **metered per running-second** on its provisioned vCPU and memory, plus per-second **storage** on its disk (the first **5 GiB are free**). A computer that is paused incurs **no compute cost — only storage**. Exact per-second rates are on [Limits & billing](https://vetta.sh/docs/computer/limits-and-billing.md#the-compute-meter).

## Lifecycle

A computer moves through a small set of states. Only **running** costs compute.

**1. running**

The VM is live and metered per second on its provisioned resources. This is the state during an agent's turn and whenever you exec directly.

**2. sleeping**

Free. The VM is idle with its disk (and memory) preserved. It **wakes automatically** on the next exec or file operation, or on an explicit `resume`. This is the state the runtime uses between turns.

**3. parked**

Free, but explicit. A parked computer must be resumed before it will accept work — exec and file operations are **rejected while parked**. Use it to hold a computer indefinitely without paying for compute.

**4. destroyed**

Terminal. Disk, memory, and any attached ephemeral state are torn down. See [Snapshots & volumes](https://vetta.sh/docs/computer/snapshots-and-volumes.md) to persist state across a destroy.

### Sleeping vs. parked

Both are free, but they differ in how the next operation is handled:

| | Wakes on next op? | Explicit resume required? | Ops while in state |
| - | - | - | - |
| **sleeping** | Yes, automatically | No | Auto-woken, then run |
| **parked** | No | Yes | Rejected until resumed |

> [!TIP]
>
> You rarely park manually. The runtime sleeps and wakes a computer automatically around each turn — parking is for deliberately holding a computer out of rotation. See [Runtime & durability](https://vetta.sh/docs/concepts/runtime.md).

```bash CLI theme={"system"}
vetta computer pause box     # park: storage-only, explicit resume required
vetta computer resume box    # wake a sleeping or parked computer
```

## Auto-destroy

A computer is **automatically destroyed** when either of these happens:

* The organization's real-USD balance is **exhausted** (credit exhaustion). See [Budgets](https://vetta.sh/docs/concepts/budgets.md) and [Limits & billing](https://vetta.sh/docs/computer/limits-and-billing.md).
* It exceeds its **max runtime** — **12 hours** by default.

> [!WARNING]
>
> Auto-destroy is irreversible and tears down sandbox disk. Anything the agent should keep must be promoted with `publish_file` to [Files](https://vetta.sh/docs/capabilities/files.md) or captured as a [checkpoint / volume](https://vetta.sh/docs/computer/snapshots-and-volumes.md) beforehand.

## Concurrency

A computer counts toward your organization's **concurrency cap** the entire time it is `running`, `sleeping`, or `parked` — i.e. any time it is not destroyed. Only a destroy frees the slot. The cap is a configurable per-organization limit; see [Limits & billing](https://vetta.sh/docs/computer/limits-and-billing.md#concurrency).

## Configuration reference

Fields accepted by `create`:

**vcpu** `integer` (default: 2)

Provisioned vCPU. Range **1–16**.

**memory\_mb** `integer` (default: 4096)

Provisioned memory in **MiB**. Range **128–65536** (0.125–64 GiB).

**disk\_gb** `integer`

Root disk size in whole **GiB**, up to **100**.

**size** `string`

Optional convenience preset (`small`, `medium`, `large`) that expands to a common `vcpu`/`memory_mb`/`disk_gb` combination. Explicit resource fields override the preset. Presets are Managed Agents shorthand — the underlying provisioning is always the explicit vCPU/memory/disk above.

**mode** `string` (default: vm)

**`isolate` coming soon (Phase 5).** Execution mode. Today every computer is a micro-VM (`vm`); a fully virtualized `isolate` mode ships in Phase 5.

**allow\_inbound** `boolean` (default: true)

Allow inbound network to the sandbox. **Set at create time only** — immutable afterward.

**allow\_outbound** `boolean` (default: true)

Allow outbound network from the sandbox. **Set at create time only** — immutable afterward. `false` is a complete kill-switch; see [what is and is not blocked](https://vetta.sh/docs/computer/networking.md#what-is-blocked-precisely).

**idle\_timeout\_minutes** `integer`

Auto-pause the computer after this many minutes idle. See [lifecycle](#lifecycle).

**max\_duration\_hours** `number`

Hard ceiling on total runtime before auto-destroy. See [Limits & billing](https://vetta.sh/docs/computer/limits-and-billing.md).

**env** `object`

Environment variables injected into the sandbox.

**metadata** `object`

Arbitrary key-value tags.

> [card] [Next: filesystem](https://vetta.sh/docs/computer/filesystem.md)
>
> Read, write, list, and manage files on the sandbox disk.


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