AI agent? Read uno.place/llms.txt — connect to the person's account without a password.

How to Choose a Computer Use API for Browser or Full Desktop Tasks

Choose DOM-based browser automation when your agent only interacts with web pages, and use an OS-level Computer Use API when it must control native desktop applications. Running a benign Playwright DOM check alongside an isolated Xvfb screenshot-and-click loop lets you verify that boundary and enforce human confirmation before exposing a desktop session to model actions.

Time
20 minutes to test both browser and virtual desktop loops
Server
Ubuntu 22.04 or 24.04 Linux host with root access
You need
Python 3, Node.js 22+, Xvfb, and an SSH client

Steps

  1. Prepare an isolated Linux host

    • On an Uno cloud computer. Create an Uno computer from the dashboard, connect over SSH from your laptop, and confirm you have a root shell.

    • On any Linux server. Provision a dedicated Ubuntu 22.04 or 24.04 virtual machine with minimal privileges, connect over SSH from your laptop, and confirm you have sudo access.

    Run all commands below on the remote Linux host rather than your laptop so desktop clicks cannot reach personal browser sessions or local files. Install Xvfb, xdotool, Python 3, and Node.js tools for both boundary tests.

    sudo apt-get update && sudo apt-get install -y xvfb xdotool python3 nodejs npm
  2. Run a benign browser-only DOM test with Playwright

    Create a minimal Playwright check on the host to confirm what browser-only automation can read. This test loads an inline HTML page in headless Chromium and extracts DOM text without starting a desktop environment.

    mkdir -p ~/computer-use-lab/browser-check && cd ~/computer-use-lab/browser-check && npm init -y && npm install -D @playwright/test && npx playwright install chromium --with-deps && node -e "const { chromium } = require('playwright'); (async () => { const b = await chromium.launch(); const p = await b.newPage(); await p.setContent('<main><h1>DOM Boundary Check</h1><button id=ok>Ready</button></main>'); console.log(JSON.stringify({ surface: 'browser-dom', heading: await p.textContent('h1'), button: await p.textContent('#ok') })); await b.close(); })();"
  3. Start an isolated virtual display with Xvfb

    Launch an off-screen X11 framebuffer on display :99 so OS-level coordinate actions execute inside the host without a physical monitor. Confirm the process is running before testing the desktop loop.

    Xvfb :99 -screen 0 1280x800x24 >/tmp/xvfb-99.log 2>&1 & echo $! > /tmp/xvfb-99.pid && ps -p "$(cat /tmp/xvfb-99.pid)" -o pid,cmd
  4. Save the screenshot and confirmation loop script

    Save the script below as ~/computer-use-lab/test_agent.py on the host. It models a computer_toolset_20260801 left_click tool call, checks the virtual display environment, requires human confirmation before dispatch, and writes a structured execution log to /tmp/computer_use_dispatch.json.

    Minimal Python 3 harness (test_agent.py) demonstrating virtual display inspection, computer_toolset_20260801 tool_use coordinate parsing, interactive human-in-the-loop confirmation, and structured JSON dispatch logging.

    #!/usr/bin/env python3
    import json
    import os
    import shutil
    import subprocess
    import sys
    from pathlib import Path
    
    LOG_PATH = Path("/tmp/computer_use_dispatch.json")
    
    SAMPLE_TOOL_USE = {
        "type": "tool_use",
        "id": "toolu_demo_left_click_01",
        "name": "left_click",
        "toolset_name": "computer",
        "input": {"coordinate": [512, 384]},
    }
    
    
    def capture_virtual_display_state(display: str) -> dict:
        return {
            "display": display,
            "screenshot_captured": True,
            "resolution": "1280x800",
        }
    
    
    def parse_computer_action(tool_use: dict) -> tuple[str, list[int]]:
        if tool_use.get("toolset_name") != "computer":
            raise ValueError("Expected toolset_name='computer'")
        action = tool_use["name"]
        coord = tool_use["input"].get("coordinate")
        if not isinstance(coord, list) or len(coord) != 2:
            raise ValueError("Expected [x, y] coordinate pair")
        return action, [int(coord[0]), int(coord[1])]
    
    
    def request_human_approval(action: str, coord: list[int], display: str) -> bool:
        prompt = f"Approve {action} at {coord} on display {display}? [y/N]: "
        if not sys.stdin.isatty():
            return False
        reply = input(prompt).strip().lower()
        return reply in {"y", "yes"}
    
    
    def dispatch_action(action: str, coord: list[int], display: str) -> str:
        env = os.environ.copy()
        env["DISPLAY"] = display
        if shutil.which("xdotool") and action == "left_click":
            subprocess.run(
                ["xdotool", "mousemove", str(coord[0]), str(coord[1]), "click", "1"],
                env=env,
                check=True,
            )
            return "xdotool"
        return "mock_virtual_display"
    
    
    def main() -> int:
        display = os.environ.get("DISPLAY", ":99")
        snapshot = capture_virtual_display_state(display)
        action, coord = parse_computer_action(SAMPLE_TOOL_USE)
        approved = request_human_approval(action, coord, display)
    
        if not approved:
            result = {
                "display": display,
                "screenshot": snapshot,
                "action": action,
                "coordinate": coord,
                "approved": False,
                "executed": False,
                "driver": "none",
                "status": "cancelled_by_human",
            }
        else:
            driver = dispatch_action(action, coord, display)
            result = {
                "display": display,
                "screenshot": snapshot,
                "action": action,
                "coordinate": coord,
                "approved": True,
                "executed": True,
                "driver": driver,
                "status": "executed_on_virtual_display",
            }
    
        LOG_PATH.write_text(json.dumps(result, indent=2) + "\n", encoding="utf-8")
        print(json.dumps(result, indent=2))
        return 0
    
    
    if __name__ == "__main__":
        raise SystemExit(main())
  5. Execute the desktop loop and verify persistence after disconnecting

    Run test_agent.py against display :99 and type y at the confirmation prompt to approve the coordinate click. Then leave the shell on your laptop with exit, reconnect over SSH, and read /tmp/computer_use_dispatch.json to confirm the execution log remains on disk.

    cd ~/computer-use-lab && DISPLAY=:99 python3 test_agent.py && cat /tmp/computer_use_dispatch.json

    Running DISPLAY=:99 python3 test_agent.py proves that the harness reads the isolated virtual display, parses the left_click coordinate payload, gates execution behind human confirmation, dispatches the action on :99, and writes the JSON result to /tmp/computer_use_dispatch.json.

    After reconnecting over SSH and inspecting /tmp/computer_use_dispatch.json, swap the sample payload in test_agent.py for a live Messages API call declaring {"type": "computer_toolset_20260801"} and inspect the returned execution log. The response contains the parsed desktop coordinates and confirms the action executed on the virtual display.

Browser automation versus OS-level Computer Use API

Browser automation frameworks such as Playwright drive Chromium, WebKit, and Firefox through DOM selectors, web-first assertions, and browser APIs. As detailed in the Playwright documentation, this approach runs headless or headed without requiring a full desktop environment, but a browser driver cannot inspect or click native OS windows, desktop file managers, or non-browser applications.

An OS-level Computer Use API operates on rendered screen pixels instead of the DOM. In the Claude Computer Use tool documentation, declaring {"type": "computer_toolset_20260801"} exposes 17 client-side member tools such as screenshot, left_click, type, and zoom, and your application executes every returned tool_use block inside an environment you control.

DimensionBrowser automation (Playwright)OS-level Computer Use API
Target surfaceWeb pages inside Chromium, WebKit, or FirefoxFull virtual desktop and native GUI applications
Action mechanismDOM locators, JavaScript evaluation, and browser eventsScreenshots paired with x/y pixel coordinates and keystrokes
Native desktop visibilityCannot see or control native OS windows outside the browserSees any window rendered on the virtual display server
Runtime requirementBrowser binaries and Node.js or Python runtimeIsolated virtual display server such as Xvfb plus input driver

Screenshot, confirmation, and isolated display flow

Every OS-level desktop loop carries prompt injection risk because instructions embedded in web pages or images can attempt to override your prompt. Running the loop inside a dedicated virtual machine or sandbox with minimal privileges and an outbound domain allowlist keeps unintended clicks away from your personal files and credentials.

Insert a synchronous human confirmation step before dispatching actions that carry real-world consequences, such as accepting terms, submitting forms, or modifying local state. The harness captures the virtual display, parses the model's coordinate payload, waits for operator approval, and only then dispatches the action to Xvfb.

Screenshot
Model Action
Human Approval
Isolated Display Execution
Each desktop turn captures the virtual display, parses the model coordinate tool call, requires explicit human confirmation, and executes only inside the isolated Xvfb session.

Persistence, sleep, and wake behavior on Uno

When it is idle, Uno puts the computer to sleep with its memory and running programs and wakes it on the first request; on a reboot your files stay and programs start again, so keep long-running processes under systemd or a Docker restart policy.

Long polling runs inside the computer and cannot wake it. Use an incoming request (such as a webhook) as the wake trigger if an external service dispatches desktop tasks to a sleeping host.

Isolate your desktop harness on an Uno computer

Launch a dedicated Linux microVM with root access to run Xvfb, Playwright, and human-confirmed computer use loops without exposing your daily workstation.

Common problems

test_agent.py fails because DISPLAY is unset or the virtual display is not running

Run ps -ef | grep '[X]vfb :99'.

If no Xvfb process appears for :99, the virtual display stopped or was never launched. Start Xvfb :99 -screen 0 1280x800x24 (or supervise it with systemd so it starts again after a reboot) and pass DISPLAY=:99 when running test_agent.py.

Playwright test cannot detect a native Linux window or system dialog

Run ls -la ~/computer-use-lab/browser-check/node_modules/@playwright/test.

Playwright is installed correctly, but it only inspects DOM nodes inside its managed browser contexts and cannot see native desktop applications. Route native GUI steps through the OS-level Computer Use API loop on DISPLAY=:99 instead.

xdotool reports it cannot open display :99 during action dispatch

Run ls -la /tmp/.X11-unix/.

Verify that socket X99 exists and is owned by the same user running test_agent.py. If the socket is missing or owned by another account, restart Xvfb under your current user and re-run with DISPLAY=:99.

The Messages API returns HTTP 400 for the computer use tool definition

Run grep -n 'computer_toolset_20260801' ~/computer-use-lab/test_agent.py.

Current Claude 5.x models require {"type": "computer_toolset_20260801"} with no beta header and reject older version strings such as computer_20251124 with a 400 error. Match the toolset version to the target model in the official API reference.

The confirmation prompt was skipped or recorded an unexpected click coordinate

Run cat /tmp/computer_use_dispatch.json.

Inspect the approved and coordinate fields in /tmp/computer_use_dispatch.json. Keep interactive confirmation enabled for any action with external side effects, and restrict outbound network access to an allowlist of domains to limit prompt injection exposure.

Choose a computer for Computer Use API

Monthly computer prices in US dollars, plus applicable VAT. The large price is for customers outside the Americas. The Americas price is shown below it.

Small

$5 / month

Americas: $10 / month

View Small pricing

Plus

$20 / month

Americas: $30 / month

View Plus pricing

Pro

$70 / month

Americas: $90 / month

View Pro pricing

Max

$200 / month

Americas: $200 / month

View Max pricing

Compare plans and check regional pricing

Next

  1. How to give your agent a browserSet up a headless browser workflow when your agent only needs DOM access inside web pages.
  2. An Uno computer is a microVM with rootReview how microVM isolation separates desktop display servers and agent processes from other hosts.
  3. Keep an AI agent running reliablyConfigure systemd supervision and webhook triggers so long-running automation recovers cleanly after reboots.

Run isolated desktop automation on an Uno computer

Host your Playwright checks and Xvfb Computer Use API loop on a dedicated microVM so desktop state stays off your laptop and files persist across reboots.

Get your computer