# Sandboxes for AI agents

An agent that writes code needs somewhere to run it that isn't your laptop or your production
server. A 639 Shell sandbox is a full Linux machine made for that: its own kernel, root, a shell
and files, created in seconds and deleted on time with everything in it.

## What makes it a sandbox

- **It deletes itself.** A new sandbox gets one hour; the agent or you can change that, or keep it.
- **Nothing on the internet can connect to it.** No public IPv4 or IPv6, no open ports (web links
  you make for it still work: they go through us).
- **It's on no private network** with your other machines.
- **Outbound internet can be cut** to just what the code needs: `set_network` with the internet off
  and a short allow list (GitHub, package registries, model APIs, or named hosts).

Everything else is an ordinary machine: files in and out, commands with live output.

## From an agent

Over MCP, an agent calls `create_machine` with `sandbox: true`, runs code with `exec`,
and lets the lifetime clean up. From Python:

```python
from cloud639 import Client

c = Client()  # reads CLOUD639_API_KEY
with c.create("s1", "ubuntu", sandbox=True, delete_on_exit=True) as m:
    print(m.exec("python3 untrusted.py").stdout)
```

## Try it with no sign-up

```sh
ssh try@shell.639cloud.com github:<your-github-username> 'python3 -c "print(6*7)"'
```

A trial machine for an hour, reaching only GitHub and package registries. Connect with an SSH key
that's on your GitHub account. 639 Shell is an alpha; compute is free for testers.

More: [Sandboxes](/docs/sandboxes) · [Agents and MCP](/docs/agents-mcp) · [Benchmarks](/docs/benchmarks)
