aiod runs as a daemon and serves the sandbox tools API over HTTP.
The design keeps dependencies minimal:
Examples use {base_url} for the daemon address: http://127.0.0.1:18091 by default, or the gateway port on a prebuilt image. WebSocket URLs use the same host and port with ws:// or wss://.
Coming from a 1.x AIO image? See Migration from 1.x.
Linux: install with the script, then start.
Windows: download aiod.exe for your architecture from the releases page and run it. See Windows.
aiod start binds 0.0.0.0:18091 (--host, --port, or AIO_HOST, AIO_PORT) and runs in the foreground. Keep it running with systemd, supervisord, a Windows SCM service, or as the image's CMD: see Deployment.
Check that the daemon is up:
Ask what the environment can do: identity, directories, ports, and the probed capabilities.
Run a command. It runs as a fresh process:
Add "mode": "async" to run it in the background, then re-read its output later using the returned command_id.
Read and write a file:
Execute Python:
Without a Python interpreter on the host, this answers 503 and names what it looked for (python3).
The switch above the sidebar picks the plane the examples show; both are served by default. The routes that behave differently between them are in Migration from 1.x.
Two images ship with the daemon already inside:
computer-use workerOn the AIO image the API is ready well under a second after docker run, where the 1.x image took about two and a half. Chromium keeps starting in the background and is usable a second and a half later:
Chromium needs two settings on the host side: a seccomp profile that permits its sandbox (--security-opt seccomp=unconfined when nothing stricter is at hand) and a larger /dev/shm (--shm-size 4g). The run commands below set both:
Inside either image, nginx listens on 8091, the only port the run command publishes. It fronts:
aiod on loopback port 18091computer-use on 18100None of the three is reachable directly from outside the container. Through the gateway you reach:
/docs/vnc/cdp/json/* and /cdp/devtools/*Image-only environment variables and their defaults are in Migration from 1.x.
Use the Dashboard to debug a daemon quickly in your browser.
Both SDKs use the v1 routes (/v1/*). For v2, call the HTTP API directly; see the API Reference.
The helper the v2 examples use is defined in the Conventions section of the examples index.
Install the SDK:
pip install agent-sandboxnpm i @agent-infra/sandboxPoint the SDK at the daemon address. When a key is set, put it in headers; omit headers otherwise.
Read and write a file, then run a command:
The Python SDK also provides AsyncSandbox, the same interface as Sandbox with asyncio methods.
SDK compatibility notes are in the migration guide under 1.x SDK compatibility.