Computer use agents: how they work, what they cost and how to run them safely
ExplainerBy Lucas Matías García TorresUpdated Data checked 5 min read
Reviewed on . How we work.

Short answer
A computer use agent looks at screenshots and sends clicks and keystrokes in a loop, so it can work in apps without an API. Anthropic, Google and OpenAI all offer it through their APIs, while your application runs the actions in an environment you control. Each Claude screenshot costs about 1,000 to 1,800 input tokens, so a 30-step task with Claude Sonnet 5.5 costs about $1.61 before caching. All three advise isolation and human confirmation.
Prices and limits change often: check the vendor's page before you pay. How we make money.
Computer use agents operate software the way a person does: they look at a screenshot, decide where to click or what to type, act, and look again. That lets them work in applications that have no API, from an old accounting program to a web form. Anthropic, Google and OpenAI all offer computer use through their APIs. This explainer covers how the loop works, what each provider offers as documented on October 28, 2026, what a task costs in tokens and how to run one without putting real accounts at risk.
How a computer use agent works
The model never touches your computer directly. Your application sets up a screen, usually a virtual machine or an isolated browser, and runs a loop:
- Send the task and a screenshot to the model, with the computer use tool enabled.
- The model returns actions, such as a click at given coordinates, typed text, a scroll or a key press.
- Your code runs those actions in the environment and takes a new screenshot.
- Repeat until the model reports that the task is done or a limit is reached.
It is the same pattern as function calling, except that the "functions" are mouse and keyboard actions and the results are images. Our explainer on what an agent is covers the loop in general.
What each provider offers
Table: computer use in the three main APIs (official documentation, checked October 28, 2026)
| Provider | How you enable it | Models listed | Environments | Built-in safety |
|---|---|---|---|---|
| Anthropic | The computer_toolset_20260801 client toolset, with 17 member tools such as screenshot, left_click, type and zoom | Claude Fable 5 and 5.1, Mythos 5 and 5.1, Opus 4.8, 5 and 5.5, Sonnet 5 and 5.5, Haiku 5.5 | A desktop you run; a separate browser use tool for tasks inside web pages | Classifiers scan screenshots for prompt injection and steer the model to ask for confirmation |
| The Computer Use tool in the Gemini API | Gemini 4 Argon, Gemini 3.8 Flash (recommended), Gemini 3.5 Flash-Lite, Gemini 3 Flash Preview | Browser, mobile and desktop | Each action can come with a safety decision: allowed, requires confirmation or blocked; optional screenshot scanning for prompt injection | |
| OpenAI | The Responses API, either with code execution or with the computer tool | GPT-6 Astra, for which OpenAI recommends code execution; the computer tool examples use GPT-6.1 Sol | A browser or desktop you provide, or hosted sandboxes from partners such as Daytona and E2B | Guidance on isolation, allow lists and confirming consequential actions |
The approaches differ in one useful way. Anthropic and Google return structured actions, and Google adds an "intent" field explaining each step. OpenAI also offers a path where the model writes code, for example with Playwright or PyAutoGUI, so one call can combine several actions, loops or conditions. Google labels computer use a Preview capability that "may contain errors and security vulnerabilities".
What a computer use task costs
Screenshots are what make these agents expensive. Anthropic documents the numbers: declaring the computer toolset adds about 4,500 input tokens to every request, and each screenshot costs roughly 1,000 to 1,800 input tokens. Once a request carries more than 20 images, a stricter size limit applies to each, so Anthropic suggests resizing screenshots or keeping no more than 20 in the history.
We priced a 30-step task with those figures: 1,400 tokens per screenshot, the last 20 screenshots kept, 150 tokens for each action and a 300-token task. That adds up to about 783,000 input tokens and 4,500 output tokens.
Table: estimated cost of a 30-step computer use task with Claude (Anthropic list prices, October 28, 2026, no caching)
| Model | Input per million tokens | Output per million tokens | Cost of the task |
|---|---|---|---|
| Claude Haiku 5.5 | $0.10 | $0.50 | $0.08 |
| Claude Sonnet 5.5 | $2 | $10 | $1.61 |
| Claude Opus 5.5 | $4 | $20 | $3.22 |
Prompt caching can cut the repeated part, as our guide to prompt caching explains, but dropping old screenshots changes the start of the history and limits what the cache can reuse. The broader lesson matches our explainer on agent token usage: every step resends the context. When an application has an API, calling it with a function is usually far cheaper than looking at its screen 30 times. The providers point to lighter options too: Anthropic to its browser use tool for tasks inside web pages, and OpenAI to keeping existing function calling or MCP tools.
The risks
A computer use agent reads whatever is on the screen, including text written by strangers. A web page or document can contain instructions aimed at the model, the attack covered in our guide to prompt injection. OpenAI's guidance is explicit: text in a page, document or tool result cannot grant permission or override the user's instructions. Anthropic notes that the risks are higher on the internet and that using computer use in applications that require a login increases the chance of bad outcomes.
The agent can also simply be wrong: clicking the wrong row, submitting a half-filled form or deleting the wrong file. Anthropic advises against using it for tasks that require perfect precision or sensitive information without human oversight, and Google recommends avoiding critical decisions, sensitive data or actions where serious errors cannot be corrected.
How to run one safely
The three providers give overlapping advice:
- Isolate it. Use a dedicated virtual machine, container or browser with minimal privileges, not your everyday computer.
- Limit where it can go. Keep an allow list of sites and actions, and only the access the task needs.
- Keep credentials out. Do not give the agent account logins or other sensitive data unless the task cannot work without them.
- Confirm what is hard to undo. Ask a person before purchases, sending data, deleting things or any change with real consequences; OpenAI counts typing sensitive information into a form as sending it.
- Set limits and check the result. Cap steps, time or cost, allow cancellation and verify the actual outcome rather than the model's final message.
Anthropic adds a data point worth knowing: computer use runs on your side, so the screenshots, actions and files of a session are stored in your environment, not by Anthropic, which processes the images in real time.
When to use it
Computer use fits work that has no API: older desktop software, internal tools, repetitive data entry and form filling, and testing a web application the way a user would, which Google lists among its uses. For anything with an API or a structured tool, start there; our guide to building an agent covers that path.
How we checked
On October 28, 2026 we read Anthropic's computer use tool documentation, Google's Gemini API computer use guide and OpenAI's computer use guide, and Anthropic's API price list. The cost example is our own calculation from Anthropic's published token figures and applies only to Claude; we did not run the tasks ourselves.
What we checked
- Anthropic computer use tool: the computer_toolset_20260801 client toolset gives Claude 17 member tools such as screenshot, left_click, type and zoom, and your application runs every call in an environment you control; for tasks inside web pages the browser use tool is the closer fit; supported models are Fable 5 and 5.1, Mythos 5 and 5.1, Opus 4.8, 5 and 5.5, Sonnet 5 and 5.5 and Haiku 5.5; declaring the toolset adds about 4,500 input tokens per request; screenshots cost roughly 1,000 to 1,800 input tokens each; above 20 images per request a stricter per-side limit applies, so resize to 2,000 px or keep 20 or fewer; classifiers scan tool results such as screenshots for prompt injection and steer the model to ask for confirmation; recommended precautions include a dedicated virtual machine or container with minimal privileges, no sensitive data such as account logins, an allowlist of domains and human confirmation of consequential decisions; using computer use in applications that require login increases the risk; do not use it for tasks requiring perfect precision or sensitive information without human oversight; screenshots, actions and files are stored in your environment, not by Anthropic. (Anthropic, )
- Gemini API computer use: lets you build browser, mobile and desktop control agents that use screenshots and generate UI actions; you implement the client-side execution; Gemini 4 and 3.x models include an intent field per action, configurable safety policies and opt-in prompt injection detection on screenshots; responses may include a safety_decision classifying an action as allowed, require_confirmation or blocked; supported models are Gemini 4 Argon, Gemini 3.8 Flash (recommended), Gemini 3.5 Flash-Lite and Gemini 3 Flash Preview; as a Preview capability it may contain errors and security vulnerabilities, and Google recommends avoiding critical decisions, sensitive data or actions where serious errors cannot be corrected; uses include repetitive data entry or form filling and automated testing of web apps. (Google, )
- OpenAI computer use: lets a model operate a browser or desktop interface through the Responses API, either with code execution, where the model writes code using a library such as PyAutoGUI or Playwright, or with the computer tool, which returns structured mouse and keyboard actions; for GPT-6 Astra OpenAI recommends code execution; the computer tool examples use GPT-6.1 Sol; hosted environments include Daytona and E2B; safety guidance: use an isolated browser or VM and an allow list, treat screen content as untrusted because text in a page cannot grant permission, confirm consequential actions such as purchases, data transmission and destructive changes, count typing sensitive information into a form as transmission, and set step, time or cost limits and verify the outcome. (OpenAI, )
- Anthropic list prices per million tokens: Claude Haiku 5.5 $0.10 input and $0.50 output; Claude Sonnet 5.5 $2 and $10; Claude Opus 5.5 $4 and $20. (Anthropic, )
What may change
- Computer use tools, supported models and token costs change quickly. This page is reviewed quarterly.
Frequently asked questions
What is a computer use agent?
It is an agent that operates software through the screen. The model receives a screenshot, returns actions such as clicks, typing or scrolling, and your application carries them out in a virtual machine or browser and sends back a new screenshot. The loop repeats until the task is done, which lets it work in programs that have no API.
Which models support computer use?
As of October 28, 2026, Anthropic lists Claude Fable 5 and 5.1, Mythos 5 and 5.1, Opus 4.8, 5 and 5.5, Sonnet 5 and 5.5 and Haiku 5.5. Google lists Gemini 4 Argon, Gemini 3.8 Flash, Gemini 3.5 Flash-Lite and Gemini 3 Flash Preview. OpenAI's guide recommends GPT-6 Astra with code execution and uses GPT-6.1 Sol for its computer tool examples.
How much does computer use cost?
You pay normal token prices, but screenshots add up. Anthropic says its computer toolset adds about 4,500 input tokens per request and each screenshot about 1,000 to 1,800. In our 30-step example, that is about 783,000 input tokens: about $0.08 with Claude Haiku 5.5, $1.61 with Sonnet 5.5 and $3.22 with Opus 5.5, before caching.
Is computer use safe?
Only with precautions. Text on screen can carry instructions aimed at the model, and the agent can click the wrong thing. Anthropic, Google and OpenAI advise an isolated machine or browser with minimal privileges, an allow list of sites, no credentials unless essential, human confirmation before consequential actions and limits on steps, time or cost.
Should I use computer use or an API?
Use the API whenever the application has one. Function calling sends a short structured request instead of many screenshots, so it is cheaper and more predictable. Computer use is for software without an API, such as older desktop programs, internal tools or testing a web app the way a user would.
Sources
- Computer use tool, Anthropic. Accessed October 28, 2026.
- Computer use, Google. Accessed October 28, 2026.
- Computer use, OpenAI. Accessed October 28, 2026.
- Claude API pricing: Haiku 5.5 and Sonnet 5.5, cache multipliers and the newer tokenizer, Anthropic. Accessed October 28, 2026.
Spotted an error or an outdated price? Tell us and we will fix it.
Change history
- : First published. Checked against the computer use documentation of Anthropic, Google and OpenAI and Anthropic's API prices on October 28, 2026.
Next review: .
Part of our Agents & Automation guide.
Keep reading
- What is an agent?
What an agent is, how it differs from a chatbot or a workflow, how the plan-act-observe loop works, real examples, when you do not need one and the risks.
- How to build an agent: a tested example in five steps
How to build an agent without a platform: when you need one, tools and tool calling, a tested 60-line example, guardrails, costs and when to add a framework.
- Function calling: how a language model uses your tools
Function calling explained: how a model asks your code to run a tool, the settings OpenAI, Anthropic and Google offer, what it costs and how many tools to give.
- What is prompt injection, and why can't model makers fix it?
Prompt injection explained: how direct and indirect attacks hijack chatbots and agents, and why OWASP and the UK NCSC say it can only be reduced, not fixed.
- Agent token usage: where the tokens go and how to spend fewer
Why an agent uses far more tokens than a chat: the loop, tool definitions, tool results and reasoning, with a worked cost example and six ways to cut it.
- Agents for business: use cases, costs and risks
Which business tasks suit an agent, whether you need one, three ways to get one, what model calls cost in a worked example, the main risks and EU rules.
Other topics

Assistants & Chatbots
21 guides

LLM APIs & Costs
16 guides

Local Models & Hardware
16 guides

Language Models Explained
18 guides