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

# Cloud agents

> No browser, no box login: an API key in the environment

> [!NOTE]
>
> **When to use it.** A cloud agent, a CI job or any machine where no browser can open for `box login`

**1. Make a key**

On a machine where you are signed in

```bash theme={"system"}
box key create --name cloud-agent
```

The key is shown only once. Save it as a secret named `BOX_API_KEY` (or `BOX_TOKEN`) in the cloud agent’s environment settings; box reads either one and then needs no `box login`. Never paste a key into the chat or commit it

**2. Install in the cloud machine**

Add this to the agent’s setup script, or let it run it

```bash theme={"system"}
curl -fsSL https://xenoci.com/install.sh | sh
box status
```

**3. Keys you have**

```text theme={"system"}
$ box key list
box: no API keys (box key create makes one)
```

`box key list` shows ids and names, never the values. `box key delete <id>` turns a key off; anything still using it stops working

**4. What a run looks like**

The same as on your machine

```text theme={"system"}
$ box screenshot screen.png
box: queue: job bj_M0e9kfQmt9bDowhN (screenshot, ios, $0.05/min) submitted
…
[box] 19:21:40 screenshot box-out/screen.png
box: status: succeeded
box: results: saved to ./.box/out/bj_M0e9kfQmt9bDowhN/ (build.log, screen.png)
box: bj_M0e9kfQmt9bDowhN succeeded, 120s billed, $0.10
```

![The picture box returned to the agent: Hello from box with a counter](https://mintcdn.com/xenoci/ZFKGlbE4Q2bw14Om/images/docs-agents-screen.png?fit=max\&auto=format\&n=ZFKGlbE4Q2bw14Om\&q=85\&s=57a2bab0b30da73118373c050fedae7c)


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