Version 0.3.0 · updated 17 November 2026
The awx command line, SDKs, API and MCP
Use awx from your own code: a command line tool, a Python SDK, a TypeScript SDK, and the HTTP API they all use. They make computers, run commands, move files, share links and talk to the built-in agent.
Get access
You need one thing: an API key. Sign in at box.awanbox.com, open Account, then API keys, and make a key. It starts with bx_ and is shown once. Keep it like a password, give each place its own key, and revoke one you no longer use on the same page.
Most things you can do in the dashboard you can do here, on your own account and no more. Your own domain on a link needs the paid plan.
Want an AI agent such as Claude Code to do it for you? Give it the prompt in For LLM agents: use awx from your terminal.
Install
Both packages are small and need nothing else but httpx (Python 3.10 or newer) or the standard fetch (TypeScript, Node 18 or newer). They are not on PyPI or npm yet, so install them from this site.
pipx install https://awanbox.com/sdk/awx-0.3.0-py3-none-any.whl # the awx command
npm install https://awanbox.com/sdk/awx-0.2.0.tgz
Use pipx for the command: many systems refuse a plain pip install outside a virtual environment ("externally-managed-environment"). To use the Python SDK in your own project, run pip install https://awanbox.com/sdk/awx-0.3.0-py3-none-any.whl inside that project's virtual environment.
The TypeScript package is still version 0.2.0; it needs no change to work with a key alone.
All files and their checksums are listed at awanbox.com/sdk/. The Python package installs the awx command and the awx module. The TypeScript package is an ES module with type declarations.
Command line
Sign in once. The address and key are saved in ~/.config/awx/config.json, readable only by you. Or set AWX_API_KEY in the environment instead (and AWX_URL only if you use another server).
awx login --key bx_... # the address defaults to https://api.awanbox.com
awx whoami
A computer is called a sandbox in the command (computer and box work too). Most commands take the computer's name or its id.
awx sandbox create --name demo --size small # small or large
awx sandbox rename demo my-site # new name; id, links and files stay
awx sandbox exec my-site -- python3 -c "print(6*7)" # exits with the command's exit code; --timeout 85 for longer
awx sandbox upload my-site ./app.py /home/agent/app.py
awx sandbox download my-site /home/agent/out.csv ./out.csv
awx sandbox preview my-site --port 8000 # a public https link, up to 1 hour on the Free plan
awx sandbox name my-site blog --port 8080 # blog.awanbox.com, kept until removed
awx sandbox schedule my-site --days mon-fri --from 09:00 --to 18:00 --tz Asia/Kuala_Lumpur
awx sandbox resize my-site large # files stay
awx sandbox tags my-site team:ml env:dev # replaces all tags; --clear removes them
awx sandbox shot my-site # the desktop as my-site.png
awx sandbox view my-site --control # a link to take over the desktop
awx chat ask "build a hello page and share it" --size large
awx chat rename ch_1234abcd Planning notes
awx workspace list
awx notices --unread
Add --json before the command to get JSON instead of tables. awx --help and awx sandbox --help list every command. For a step-by-step start, read How to run awx computers from your terminal.
Python SDK
from awx import Client, AwxError
with Client("https://api.awanbox.com", api_key="bx_...") as awx:
box = awx.sandboxes.create(name="demo", size="small")
awx.sandboxes.rename(box["id"], "my-site")
print(awx.sandboxes.shell("my-site", "python3 -c 'print(6*7)'")["stdout"])
awx.sandboxes.write_file("my-site", "/home/agent/hello.txt", "hi")
link = awx.sandboxes.create_preview("my-site", port=8000)
answer = awx.chats.ask("find the largest file in /usr and tell me its size",
computer="my-site", on_approval=lambda a: "deny")
awx.sandboxes.delete("my-site")
Every call returns plain dictionaries (or bytes for files and screenshots). A refusal raises AwxError with .status, .code and .message. The main groups:
| Group | What it covers |
|---|---|
sandboxes | create, get, list, start, stop, delete, rename, resize, set_tags, set_keep_alive, set_auto_start, set_schedule, shell and execute, list_files, read_file, write_file, screenshot, computer (mouse and keyboard), live_view, create_preview, previews, add_name, names, own domains, agents, logs, metrics |
chats | the built-in agent: create, send, messages, wait, ask, stop, rename, update, delete, decide (answer its questions) |
workspaces | list, create, rename, delete |
mcp_servers | your own MCP servers for the agent |
notices | notifications and one webhook |
TypeScript SDK
import { Client, AwxError } from "awx";
const awx = new Client({ baseUrl: "https://api.awanbox.com", apiKey: "bx_..." });
const box = await awx.sandboxes.create({ name: "demo", size: "small" });
await awx.sandboxes.rename(box.id, "my-site");
console.log((await awx.sandboxes.shell("my-site", "python3 -c 'print(6*7)'")).stdout);
const reply = await awx.chats.ask("say hello", { computer: "my-site", onApproval: () => "deny" });
await awx.sandboxes.delete("my-site");
It has the same groups as the Python SDK, with the same names in camel case (setTags, createPreview, addOwnDomain). Errors are AwxError with status and code.
HTTP API
The SDKs are thin wrappers over a JSON API. Every call carries your key.
curl https://api.awanbox.com/v2/sandboxes \
-H "Authorization: Bearer bx_..."
curl -X PATCH https://api.awanbox.com/v2/sandboxes/my-site \
-H "Authorization: Bearer bx_..." -H "Content-Type: application/json" \
-d '{"name": "new-name"}'
The same key also connects Claude Code (or another MCP client) to https://mcp.awanbox.com/mcp:
claude mcp add --transport http awx https://mcp.awanbox.com/mcp \
--header "Authorization: Bearer bx_..."
/v1 and /v2 are the same API. A computer is /sandboxes/{name or id}; files, commands, previews, names, schedules and the screen are below it. A chat is /chats/{id}.
Errors and limits
- Errors come back as
{"error": {"code": "...", "message": "..."}}with the status. Common codes:not_found,conflict(a name is taken),quota_exceeded,unauthorized,forbidden. - A command run through the API lasts at most 85 seconds. Start longer jobs in the background and check on them.
- You can have up to three computers running at once. See Pricing for the limits of each plan.
- A wrong or revoked key answers 401.
- Rate limits: 600 requests a minute per key, and 20 new computers, starts, chats or agent messages a minute per person. Too many failed sign-ins from one address (20 a minute) pause that address for the rest of the minute. Past a limit the answer is 429 with a
Retry-Afterheader (in seconds) and the coderate_limited.
What is tested
Version 0.2.0 was run against the live service on 14 November 2026, through the public address, from the three clients. Each run made a Small computer, used it and deleted it. Version 0.3.0 changes only the defaults (the address, and a key with no Cloudflare token); its command line and Python SDK pass the same automatic checks.
- Command line: 36 checks. Create, rename, tags, exec with exit code, upload and download, screenshot, preview, custom name, schedule, own domains list, chat rename.
- Python SDK: 33 checks, including resize, errors, a name that is already used, and a real question to the built-in agent that came back with an answer.
- TypeScript SDK: 21 checks, including rename, tags, chat rename and a wrong key.
The same checks also run on every change in a test copy of the service. Found a mistake or missing call? Tell us.