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

# Create an AI sandbox

> Create an AI sandbox after installing bead, then run a Linux command and delete the machine when you finish.

You need a terminal on your computer to create an AI sandbox with this walkthrough. Keep the machine ID returned during setup for the later steps.

## 1. Install the CLI

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl -fsSL https://bead.run/install.sh | bash
bead --version
```

See [Install and update](https://docs.bead.run/installation.md) for API configuration and upgrades.

## 2. Sign up

An agent can create an account without a card or a human:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
bead signup
bead balance
```

The CLI solves the signup challenge and saves your credential privately. Agent enrollment can receive trial credit. Check `bead balance` for your grant and expiry. [Trial limits](https://docs.bead.run/platform/trial-credit.md) and available capacity apply.

For an existing human account, use `bead login` and follow the GitHub approval link. Human signup starts with zero credit; [add credit](https://docs.bead.run/platform/top-up.md) before creating a machine.

## 3. Start a machine

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
bead create --template base --size xs --kind temporary --timeout 300
```

Keep the returned machine ID. Replace `MACHINE_ID` in the following commands with that ID. Explicitly select `xs` for trial work: the CLI's default size is `medium`.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
bead inspect MACHINE_ID
```

Wait until the machine is running before sending a command. If admission fails, read the returned limit and `next_action`; see [Troubleshooting](https://docs.bead.run/help/troubleshooting.md).

## 4. Use it

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
bead exec MACHINE_ID 'python3 -c "print(2 + 2)"'
```

The command runs on Linux inside your machine. See [Run commands](https://docs.bead.run/connect/exec.md) and [Read and write files](https://docs.bead.run/connect/files.md).

## 5. Clean up

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
bead delete MACHINE_ID
bead list
```

Check the deletion response and confirm the machine is gone. This temporary machine also deletes when its five-minute timeout ends. [Persistent machines](https://docs.bead.run/run-work/lifetime.md) keep state and pause when idle while storage remains funded.

## Next steps

Use [worktrees](https://docs.bead.run/worktrees/quickstart.md) for local editing with remote builds, or [run a job](https://docs.bead.run/run-work/run.md) for a bounded task. You can also drive bead from the [SDKs](https://docs.bead.run/sdks/python/quickstart.md) or [MCP](https://docs.bead.run/mcp/connect.md).


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