Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 25 additions & 20 deletions content/manuals/ai/sandboxes/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,7 @@ The first command adds Docker's `apt` repository to your system.
If you need to install `sbx` manually, download a binary directly from the
[sbx-releases](https://github.com/docker/sbx-releases/releases) repository.

`sbx login` opens a browser for Docker OAuth. On first login (and after `sbx
policy reset`), the CLI prompts you to choose a default network policy for your
sandboxes:

```plaintext
Choose a default network policy:

1. Open — All network traffic allowed, no restrictions.
2. Balanced — Default deny, with common dev sites allowed.
3. Locked Down — All network traffic blocked unless you allow it.

Use ↑/↓ to navigate, Enter to select, or press 1–3.
```

**Balanced** is a good starting point — it permits traffic to common
development services while blocking everything else. You can adjust individual
rules later. See [Policies](governance/local.md) for a full description of each
option.
`sbx login` opens a browser for Docker OAuth.

> [!NOTE]
> See the [FAQ](faq.md) for details on why sign-in is required and what
Expand Down Expand Up @@ -155,6 +138,28 @@ $ cd ~/my-project
$ sbx run --name my-sandbox claude
```

The first time you run a sandbox, the CLI prompts you to choose a default
network preset:

```plaintext
Initialize the global network policy for your sandboxes:

Applies to all sandboxes, current and future — change it later with
"sbx policy allow/deny/rm". Kits, including built-in agent kits, may
also add per-sandbox rules.

1. Open — All network traffic allowed, no restrictions.
❯ 2. Balanced — Default deny, with common dev sites allowed.
3. Locked Down — All network traffic blocked unless you allow it.

Use ↑/↓ or 1–3 to navigate, Enter to confirm, Esc to cancel.
```

**Balanced** is a good starting point — it permits traffic to common
development services while blocking everything else. You can adjust individual
rules later. See [Policies](governance/local.md) for a full description of each
option.

Replace `claude` with the agent you want to use — see [Agents](agents/) for the
full list.

Expand Down Expand Up @@ -201,8 +206,8 @@ when running several agents on one repository — use
## Control what the agent can reach

Isolation isn't only about the filesystem. You also control what the sandbox
can reach on the network. You chose a default policy when you signed in, and
you can inspect or adjust it at any time.
can reach on the network. You chose a default policy before the sandbox
started, and you can inspect or adjust it at any time.

Check which rules are in effect:

Expand Down
22 changes: 13 additions & 9 deletions content/manuals/ai/sandboxes/governance/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,22 @@ destination IP and port (for example, `sbx policy allow network "10.1.2.3:22"`).
UDP and ICMP are blocked at the network layer and can't be unblocked with policy
rules.

On first start, and after running `sbx policy reset`, the daemon prompts you
to choose a network preset:
If you haven't chosen a default preset, the CLI prompts you before it runs a
sandbox. Running `sbx policy reset` clears the preset and prompts you to choose
again:

```plaintext
Choose a default network policy:
Initialize the global network policy for your sandboxes:

Applies to all sandboxes, current and future — change it later with
"sbx policy allow/deny/rm". Kits, including built-in agent kits, may
also add per-sandbox rules.

1. Open — All network traffic allowed, no restrictions.
2. Balanced — Default deny, with common dev sites allowed.
2. Balanced — Default deny, with common dev sites allowed.
3. Locked Down — All network traffic blocked unless you allow it.

Use ↑/↓ to navigate, Enter to select, or press 1–3.
Use ↑/↓ or 1–3 to navigate, Enter to confirm, Esc to cancel.
```

| Preset | Description |
Expand Down Expand Up @@ -152,10 +157,9 @@ To remove all custom rules and start fresh with a new preset, use
$ sbx policy reset
```

This deletes the local policy store and stops the daemon. When the daemon
restarts on the next command, you are prompted to choose a new preset. Running
sandboxes stop when the daemon shuts down. Pass `--force` to skip the
confirmation prompt:
This deletes the local policy store, restarts the daemon, and prompts you to
Comment thread
dvdksn marked this conversation as resolved.
Comment thread
dvdksn marked this conversation as resolved.
choose a new preset. Running sandboxes stop when the daemon shuts down. Pass
`--force` to skip the confirmation prompt:

```console
$ sbx policy reset --force
Expand Down