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

# Suparagent

> Give a Suparagent agent a boxd machine as its cloud computer, with a shell, files and a Linux desktop.

![The Suparagent logo and wordmark inside the boxd card.](https://mintcdn.com/azin/dHnCWKHpUuh2LxK7/images/boxd-x-suparagent.png?fit=max\&auto=format\&n=dHnCWKHpUuh2LxK7\&q=85\&s=fa9d5d6bb20900474dbfe8719504df62)

[Suparagent](https://suparagent.ai) is an open-source workspace for AI coworkers. You create named agents, give each a job and a workspace, and approve what they do. An agent can also get its own computer, so its commands and file edits run there and not on your laptop.

boxd is one of the cloud choices for that computer ([pull request](https://github.com/Anil-matcha/suparagent/pull/232)). Each computer is one boxd machine running Ubuntu 24.04.

> [!NOTE]
>
> The boxd provider is in Suparagent's releases since v0.8.8. This page uses v0.8.9, the latest release.

## Set up

You need Node.js 22 or newer, [uv](https://docs.astral.sh/uv/), and Claude Code installed and signed in. It is the engine Suparagent supports for cloud computers. The Desktop app also asks you to sign in to a Suparagent account.

**1. Clone Suparagent and set it up**

```bash theme={"theme":"github-dark"}
git clone --branch v0.8.9 https://github.com/Anil-matcha/suparagent.git
cd suparagent/desktop
npm run setup
npm run build
```

**2. Add the boxd SDK**

```bash theme={"theme":"github-dark"}
cd ../backend
uv sync --locked --extra boxd
cd ../desktop
```

Run this after `npm run setup`. Running setup again removes the SDK, so repeat this step if you do.

**3. Create an API key**

```bash theme={"theme":"github-dark"}
boxd auth keys create suparagent --org <your-org>
```

Machines are created and billed in the key's organization.

**4. Give an agent a computer**

```bash theme={"theme":"github-dark"}
npm run app
```

Sign in, then open an agent's computer settings. Under **Location**, pick **Cloud · boxd**, paste the key, choose a shell or a desktop, and click **Give it a computer**.

Suparagent keeps the key encrypted in its Desktop profile. Only the local backend reads it. It is never placed on the machine or sent to the model.

## Try it without the app

This script calls the same provider the app uses, with no account and no model. It makes a desktop computer, runs a command, writes a file, opens a browser, takes a screenshot, hibernates and wakes the machine, then deletes it. Save it as `backend/boxd_demo.py`:

```python boxd_demo.py theme={"theme":"github-dark"}
import os
import tempfile
import time
import uuid
from dataclasses import replace
from pathlib import Path

from cryptography.fernet import Fernet

from app.computers.boxd_provider import BOXD_IMAGE, BoxdProvider
from app.computers.docker_cli import Spec
from app.desktop import boxd_credentials, profile


def text(result):
    return result["content"][0]["text"]


with tempfile.TemporaryDirectory() as folder:
    # The Desktop app sets these up itself. The key is encrypted in this folder.
    profile.activate(profile.DesktopProfile(
        data_dir=Path(folder),
        origin="http://127.0.0.1:8000",
        encryption_key=Fernet.generate_key().decode(),
    ))
    boxd_credentials.get_store().set(os.environ["BOXD_API_KEY"])

    provider = BoxdProvider()
    spec = Spec(
        computer_id=1,
        instance=uuid.uuid4().hex,
        image=BOXD_IMAGE,
        workspace="/workspace",
        kind="desktop",
        provider_generation=uuid.uuid4().hex,
    )

    started = time.monotonic()
    spec = replace(spec, container_id=provider.create(spec).container_id)
    try:
        print("machine:", spec.container_id)
        print("start:", provider.start(spec).state)
        print(text(provider.tool(spec, "exec", {"command": ". /etc/os-release; echo $PRETTY_NAME; pwd"})))
        print(text(provider.tool(spec, "write_file", {"path": "/workspace/hello.txt", "content": "hello from Suparagent\n"})))

        browser = '. ~/.config/boxd/agent-browser.env; nohup "$AGENT_BROWSER_EXECUTABLE_PATH" --no-first-run https://example.com >/dev/null 2>&1 &'
        provider.tool(spec, "exec", {"command": browser})
        provider.tool(spec, "wait", {"seconds": 8})
        png = provider.screenshot(spec)
        Path("boxd-screen.png").write_bytes(png)
        print("screenshot:", len(png) > 1000 and png.startswith(b"\x89PNG"))

        print("stop:", provider.stop(spec).state)
        print("start:", provider.start(spec).state)
        print("after wake:", text(provider.tool(spec, "read_file", {"path": "/workspace/hello.txt"})).strip())
    finally:
        provider.delete(spec)
    print("after delete:", provider.status(spec).state)
    print(f"took {time.monotonic() - started:.0f}s")
```

```bash theme={"theme":"github-dark"}
cd ../backend
export BOXD_API_KEY=bxd_...
.venv/bin/python boxd_demo.py
```

We ran it against boxd with Suparagent v0.8.9 on 30 November 2026:

```text theme={"theme":"github-dark"}
machine: <machine-id>
start: running
exit code: 0
--- stdout ---
Ubuntu 24.04.5 LTS
/home/boxd/workspace
Wrote 22 bytes to /workspace/hello.txt.
screenshot: True
stop: stopped
start: running
after wake: hello from Suparagent
after delete: missing
took 13s
```

`boxd-screen.png` shows the browser open on example.com. The file written before the stop is still there after the wake.

## How it works

| Suparagent | boxd |
| - | - |
| Create | A new machine with the computer's name and `suparagent/*` labels |
| Start | Wakes or starts the machine, then makes `/home/boxd/workspace` |
| Stop | [Hibernates](https://docs.boxd.sh/guides/suspend-resume.md) the machine and keeps its memory and disk |
| Recreate, remove | Deletes the machine and its disk. A machine whose labels don't match is left alone |
| Commands | Run as user `boxd` in `/home/boxd/workspace`, which the agent sees as `/workspace` |
| Screen | A 1280x800 display, driven with `xdotool` and captured as screenshots |

Every computer call follows the agent's approval mode, like a call on your own computer.

## Limits

* **Desktop app only.** A self-hosted Suparagent server can't use boxd computers.
* **No size or network settings.** Machines use your organization's default size and the default image, and have internet access.
* **Screenshots only.** The app shows the desktop as screenshots. There is no take-control view.
* **Files stay on the machine.** They are not synced with your local workspace. File tools reach the workspace and `/tmp`.
* **Not isolated in v0.8.9.** This release creates normal boxd machines, not [isolated](https://docs.boxd.sh/use-cases/sandboxes.md) ones. Code an agent runs there can reach your boxd account and your other machines, so only give a computer to agents you trust. Suparagent's main branch already creates isolated machines, and the next release will too.
* **Billing.** Suparagent stops an idle computer after 30 minutes by default, but only while the app is running. If you close the app, the machine keeps billing until boxd's own idle auto-hibernate stops it.
* **Changing the key.** Remove all boxd computers before you change or remove the saved key, and before you reset the Desktop profile.

## Read more

* [boxd cloud computers](https://github.com/Anil-matcha/suparagent/blob/main/docs/COMPUTERS.md#boxd-cloud-computers) in Suparagent's docs
* [The boxd provider](https://github.com/Anil-matcha/suparagent/blob/main/backend/app/computers/boxd_provider.py)
* [Suparagent on GitHub](https://github.com/Anil-matcha/suparagent)
* [Sandboxes on boxd](https://docs.boxd.sh/use-cases/sandboxes.md)


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