Computer use agents: how they work and where to run them
A computer use agent is an AI model that operates a computer through its screen: it receives a screenshot, decides the next step, and answers with a click, a keystroke or a scroll. Your code performs that action, takes a new screenshot and sends it back, and the loop repeats until the task is done. Anthropic, OpenAI and Google all ship computer use as an API tool. None of the three tools comes with the computer, so the practical question is where the agent's desktop runs.
On Lizard, two commands give the agent a Linux desktop in its own microVM: lizard sandbox create -t desktop -s small --timeout 600000 creates it, and lizard sandbox desktop <id> starts the screen and prints a URL where you can watch it. A Small sandbox (2 vCPU, 4 GB RAM) costs $0.0162 per hour, billed per second (Lizard pricing, checked 15 November 2026). We ran every step below on 15 November 2026 with Lizard CLI 4.0.128.
What is a computer use agent?
A computer use agent is a program that pairs a vision-capable language model with a screen it can control. The model looks at a screenshot, then asks for mouse and keyboard input. It needs no API from the application it drives. If a person can do the task by looking and clicking, the agent can attempt it.
That is the difference from older automation. A Selenium or Playwright script addresses elements by selector and breaks when the page structure changes. A computer use agent reads pixels, so it also works on desktop apps, PDFs in a viewer, remote desktops and legacy tools that have no DOM at all.
The price is speed and reliability. Anthropic's documentation lists latency and coordinate mistakes among the limitations of its computer use tool and recommends tasks "where speed isn't critical", such as background information gathering and automated software testing.
How does a computer use agent work?
A computer use agent works in a loop of four steps: capture the screen, send it to the model, run the action the model returns, capture the screen again. Anthropic calls steps three and four, repeated without user input, the agent loop. The model never touches the machine. Your application receives a structured request such as "left click at 640, 400" and translates it into real input.
Three details decide whether the loop works in practice.
Coordinates. Claude returns coordinates in the pixel space of the image it received, so if you downscale a screenshot you must scale the click back up. Gemini returns coordinates on a normalized 0 to 999 grid that your code maps to the real screen (Gemini computer use docs, checked 15 November 2026).
Resolution. Anthropic recommends 1024x768 or 1280x720 for general desktop tasks, 1280x800 or 1366x768 for web applications, and nothing above 1920x1080. Smaller screens also cost fewer tokens. By the visual token formula in Anthropic's docs (width divided by 28, times height divided by 28, each rounded up), a 1280x800 screenshot is 1,334 visual tokens and a 1920x1080 one is 2,691.
Batching. Current tools let the model return several actions in one turn, for example click, type, then screenshot. Both Anthropic and OpenAI say to run them in order, not in parallel.
There is a second family of agents that reads the page's DOM or accessibility tree instead of pixels. DOM agents are faster and cheaper on websites. Vision agents are the only option when there is no DOM to read.
Which models and APIs support computer use?
Anthropic, OpenAI and Google each document a computer use tool for their current models. All three are client-side: the model picks the action and your environment runs it. We read all three documentation pages on 15 November 2026.
| Anthropic | OpenAI | ||
|---|---|---|---|
| Tool | computer_toolset_20260801 in the Messages API, 17 member tools such as screenshot, left_click, type and zoom | computer tool in the Responses API, or code execution where the model writes PyAutoGUI or Playwright code | computer_use tool in the Gemini API |
| Models the docs name | Claude Fable 5.2, Mythos 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5 | gpt-6.1-sol in the computer tool examples; for GPT-6 Astra OpenAI recommends code execution | Gemini 4 Carbon, Argon and Hydrogen, Gemini 3.8 Flash, 3.5 Flash-Lite, 3 Flash Preview |
| Environments | A desktop you provide | A browser or desktop you provide | Browser, mobile and desktop modes |
| Coordinates | Pixels of the screenshot you sent | Pixels; map back if you downscale | Normalized 0 to 999 grid |
| Setup notes | No beta header. The older computer_20251124 version needs the computer-use-2025-11-24 header | Actions: click, double_click, drag, move, scroll, keypress, type, wait, screenshot | Each action can carry a safety_decision that requires user confirmation |
| Source | Anthropic docs | OpenAI docs | Google docs |
Two costs are easy to miss. Declaring Anthropic's toolset adds about 4,500 input tokens to every request, according to the pricing section of its docs. And Anthropic and OpenAI both bill every screenshot as image input, so a long task is mostly a bill for screenshots.
Why run a computer use agent in a sandbox?
A computer use agent should run in a sandbox because it acts on whatever it reads, and it reads the open web. Anthropic's docs say: "In some circumstances, Claude follows commands found in content even when they conflict with your instructions." A web page, an email or an image can carry text that redirects the agent. This is prompt injection, and all three vendors warn about it in their docs.
Their advice is the same. Anthropic lists four precautions: a dedicated virtual machine or container with minimal privileges, no access to sensitive data such as logins, an allowlist of domains, and a human who confirms consequential actions. OpenAI's guide says to "use an isolated browser or VM" and to "treat screen content as untrusted". Google's docs tell you to run the agent "in a sandboxed VM or container".
Running the agent on your own laptop breaks the first two rules at once. It can see your logged-in browser, your files and your SSH keys.
A disposable microVM fixes that. Lizard Sandboxes are Firecracker microVMs, each with its own kernel, so the agent's desktop shares nothing with your machine or with other sandboxes. When the task ends you delete the VM and whatever the agent downloaded goes with it. For the isolation models behind this, see the AI sandbox explainer.
How do you run a computer use agent on a cloud desktop?
You run a computer use agent on a cloud desktop in five steps: create a sandbox from a desktop template, start the screen, check that screenshots and input work, start the agent, delete the sandbox. Here is the run on Lizard, tested on 15 November 2026 in us-east-1.
You need the Lizard CLI (npm i -g @lizard-build/cli, then lizard login) and, for step 4, a Claude credential connected to the same project as the sandbox (lizard agents add claude).
1. Create the desktop sandbox.
lizard sandbox create -t desktop -s small --timeout 600000The output includes the sandbox ID and "pricePerHour": 0.0162. Pass -s small: outside the trial, a create with no size is Medium at $0.0324 per hour. The timeout is in milliseconds, so this sandbox deletes itself after 10 minutes. The template is Debian 12 with Chromium, a terminal, a file manager, xdotool and scrot.
2. Start the screen.
lizard sandbox desktop <id> --resolution 1280x800This starts the display and prints a URL that opens the desktop in your browser, plus a view-only URL. Both URLs carry an access token, so treat them like passwords. In our run the command returned in about one second. Without --resolution the screen is 1920x1080. To change the size later, run lizard sandbox desktop <id> --stop first; on a desktop that was already running, the flag had no effect.
3. Check screenshots and input.
lizard sandbox exec <id> -- sh -c 'DISPLAY=:1 scrot -o /tmp/screen.png'
lizard sandbox exec <id> -- sh -c 'DISPLAY=:1 xdotool mousemove 640 400 click 1'
lizard sandbox files get <id> /tmp/screen.png screen.pngscrot and xdotool cover everything a model asks for. We ran each of these on the desktop:
| The model asks for | Command (with DISPLAY=:1) |
|---|---|
| Screenshot | scrot -o /tmp/screen.png |
| Left click | xdotool mousemove 640 400 click 1 |
| Right click | xdotool mousemove 640 400 click 3 |
| Double click | xdotool mousemove 640 400 click --repeat 2 1 |
| Scroll down, scroll up | xdotool click 5, xdotool click 4 |
| Type text | xdotool type --delay 40 "https://example.com" |
| Key combination | xdotool key ctrl+l |
| Drag | xdotool mousemove 300 300 mousedown 1 mousemove 500 500 mouseup 1 |
| Cursor position | xdotool getmouselocation |
If you write your own loop against Anthropic's toolset or OpenAI's computer tool, this table is your action handler.
4. Start the agent.
The shortest working agent needs no custom loop. Claude Code can read image files, so it can take a screenshot, look at it and act:
lizard sandbox prompt <id> --agent claude "You control the Linux desktop on DISPLAY=:1. Work like a computer use agent: take a screenshot with DISPLAY=:1 scrot -o /tmp/screen.png, read the image, then act only with xdotool. Open https://lizard.build/pricing in Chromium and tell me the hourly price of a Small sandbox as shown on the page. Do not use curl."How we tested this step: we sent the same prompt through the platform API that lizard sandbox prompt calls, and checked the CLI flags with --help. The desktop template does not ship Claude Code; the platform installed it on the first prompt, which took about 8 seconds.
The agent opened Chromium on the pricing page, took 3 screenshots, scrolled twice with xdotool click 5, and answered "$0.0162 per hour", read from the Compare plans table. It took 25 seconds from prompt to answer. It started Chromium from the shell instead of clicking the dock icon. In an earlier run on example.com the agent clicked the dock icon, typed the URL and reported a link at about 960, 934. We clicked that point with xdotool and the browser followed the link.
5. Delete the sandbox.
lizard sandbox rm <id>Billing stops when the sandbox is deleted. On the 7-day trial, an account runs one Small sandbox at a time, in US regions, and every sandbox is deleted at most 1 hour after it starts. Longer sessions and several desktops in parallel need a paid plan (Lizard limits, checked 15 November 2026). See also Claude Agent SDK sandbox and the Sandboxes docs.
A domain allowlist and the desktop do not combine yet. lizard sandbox create --allow-host example.com gives a sandbox that reaches only the hosts you list: in our test example.com answered 200 and every other site was blocked. But lizard sandbox desktop refused to start the screen on that sandbox, because a no-internet sandbox cannot publish ports.
What does a computer use agent cost to run?
A computer use agent has two costs, the desktop and the model, and the model is by far the larger one. In our 25-second run, the Small sandbox cost about $0.0001 (25 seconds at $0.0162 per hour). Claude Code reported $0.048 of model usage for the same run, roughly 400 times more.
For the desktop alone, at Lizard's Small rate of $0.0162 per hour, billed per second:
| Desktop running for | Cost |
|---|---|
| 10 minutes | $0.0027 |
| 1 hour | $0.0162 |
| 8 hours | $0.13 |
| 730 hours (a full month) | $11.83 |
These figures are compute only, in USD, for one Small sandbox, with no Persistent Volume. They exclude model tokens. A paused sandbox has no compute charge and costs $0.14 per GB-month of used disk, but a pause keeps files only: the browser and every other process end, and the resume boots fresh. Rates for other sizes are on the sandbox pricing per hour page.
To lower the model bill, lower the screenshot count and size: use 1280x800 instead of 1920x1080, let the model batch actions, and take a screenshot only after an action that changes the screen. For bulk evaluation runs, our RL environments guide prices 1,000 rollouts.
Should you use a desktop sandbox or a hosted browser?
Use a hosted browser when the whole task stays inside web pages, and a desktop sandbox when it does not. Anthropic draws the same line in its own docs: "For tasks that stay inside webpages, the browser use tool is the closer fit", because it reads and acts on the page itself and needs no full desktop.
A hosted browser service such as Browserbase or Browser Use Cloud fits when you need many browser sessions at once and the agent works on the page's DOM. OpenAI's computer use guide lists Browserbase, Browser Use, Daytona and E2B Desktop as environments with ready integrations. Lizard is not on that list, so on Lizard you write the short action handler yourself or drive the desktop with a coding agent as shown above.
A desktop sandbox fits when the agent must:
- use a native app, such as a spreadsheet, an IDE or a PDF viewer;
- download a file in the browser and then open it in another program;
- run shell commands and GUI steps in the same task, for example build an app and then click through it;
- test software that only exists as a desktop build.
FAQ
What is the difference between computer use and browser use? Computer use controls a whole desktop through screenshots, mouse and keyboard. Browser use controls only a browser, usually by reading the page's DOM. Browser use is faster and cheaper on websites; computer use also works on native applications.
Is Claude computer use still in beta? For current models, no. Anthropic's docs say computer_toolset_20260801 needs no beta header on Claude Fable 5.2, Mythos 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5. The older computer_20251124 and computer_20250124 versions still require a beta header (checked 15 November 2026).
Can a computer use agent run on my own computer? It can, and the vendors advise against it for anything beyond a demo. Anthropic recommends a dedicated virtual machine or container with minimal privileges, and no access to account logins, because text on a web page can redirect the agent.
What screen resolution should a computer use agent use? Anthropic recommends 1024x768 or 1280x720 for general desktop tasks and 1280x800 or 1366x768 for web applications, and advises against going above 1920x1080. A 1280x800 screenshot is 1,334 visual tokens by Anthropic's formula, about half of a 1920x1080 one.
How much does a cloud desktop for a computer use agent cost? On Lizard a Small desktop sandbox with 2 vCPU and 4 GB RAM costs $0.0162 per hour, billed per second, which is $0.13 for an 8-hour day. Model tokens are billed separately by the model provider and are usually the larger cost.
Build with AI. Ship with Lizard
You don't need a platform team to go live. Your whole cloud, one CLI command away.
- Services
- —
- Add-ons
- —
- Deployments
- —
- Sandbox starts
- —