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.
Link An Agent
agents/browser-agent.ts
Browser Desktop URL
The SDK exposes a normalizedsandbox.vncUrl when desktop access is ready:
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: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
Prefer APIs for structured integrations
Prefer APIs for structured integrations
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 readiness
Wait for readiness
Wait for both sandbox readiness and desktop readiness before starting browser tasks.
Keep prompts concrete
Keep prompts concrete
Give the agent specific page goals, selectors, or visual landmarks when possible.
Clean up long sessions
Clean up long sessions
Pause or destroy desktop sandboxes when you are done.