AI agent instructions
AI agent instructions
Set up
Use Python 3.11+, a boxd API key, and a Notte API key. Installboxd, notte-sdk[playwright], and python-dotenv.
Open a machine’s app from your code
Serve the app on port 8000, which the machine’s HTTPS URL forwards to. Turn off the machine’s bot protection so the URL serves the app directly instead of a browser check first. The URL is public, so anyone who has it can open the app.delete_after=1800 makes boxd delete the machine after 30 minutes if the script dies before its own delete runs. session.page is a Playwright page connected to the Notte browser over CDP.
Drive the browser from inside the machine
Agents running on the machine can use the Notte CLI. Install the CLI and the Notte skills, which coding agents such as Claude Code and Codex pick up from~/.agents/skills:
NOTTE_API_KEY from its environment. Pass it with each command, as the snippet above does with env, or give it to the agent’s process. Then drive the browser. The snippet runs the install commands and these steps before it deletes the machine, with the machine’s access.url in place of the example URL:
Hello from boxd Add. The example serves a small to-do app, and fails if either browser does not see the expected to-dos, if the CLI session did not stop, or if the machine could not be deleted. Like the snippet, the example stops the CLI session even when a command fails, and deletes the machine at the end. Its tests cover the machine commands and cleanup offline, and the full flow against real boxd and Notte.