Skip to main content
When an agent needs eyes and a mouse β€” a browser, a GUI app, anything graphical β€” reach for the desktop-ubuntu template. It’s a full Linux desktop you can watch and drive from the browser, with shell-driven automation available inside the image.

Create a desktop sandbox

waitForReady() waits for SSH readiness. Desktop access has its own readiness state, so wait for vncReady and vncUrl before starting visual automation.
agents/browser-agent.ts

Browser Desktop URL

The SDK exposes a normalized sandbox.vncUrl when desktop access is ready:
The REST GET /v1/sandboxes/{id} response can also include vncReady and vncUrl. Desktop URLs are normalized to /vnc.html?autoconnect=true&resize=remote before the SDK and CLI display them.

Automation Pattern

Agents currently use shell-accessible tools for desktop automation. For example:
The desktop-ubuntu image includes XFCE, Firefox ESR, KasmVNC, xdotool, scrot, and ImageMagick. Use exec_command or sandbox.exec() for GUI-driving commands, then use a vision-capable model and view_image when your workflow depends on screenshot interpretation.

Best Practices

Use Tool Hub or direct APIs when a provider offers a reliable API. Desktop automation is best for web or GUI workflows that do not have a usable API.
Wait for both sandbox readiness and desktop readiness before starting browser tasks.
Give the agent specific page goals, selectors, or visual landmarks when possible.
Pause or destroy desktop sandboxes when you are done.