🎯 SQL Practice

Computer Use

Claude can see your screen, click, type, and operate any application — like a digital coworker.

What is Computer Use?

Computer Use is Claude's ability to control a computer — clicking, typing, scrolling, taking screenshots, and running applications — just like a human would. You give Claude a goal; it sees your screen and takes actions to achieve it.

It's the most powerful and most experimental Claude capability. The use cases are genuinely remarkable: Claude can navigate legacy internal tools with no API, fill multi-page forms, scrape data from sites that block automated bots, QA-test your own UI, and automate repetitive computer workflows that would otherwise require RPA software.

BETA STATUS Computer Use is in public beta as of 2026. It's capable but not infallible — Claude occasionally misclicks, misreads UI elements, or takes unexpected paths. Always supervise Computer Use sessions for critical tasks.

How Computer Use works

The workflow is a loop:

  1. Claude takes a screenshot of the screen (or a region)
  2. Claude analyzes what it sees and decides the next action
  3. Claude executes the action: click(x,y), type("text"), key("Ctrl+C"), scroll(x,y,direction), etc.
  4. Claude takes another screenshot to see the result
  5. Repeat until the goal is achieved or Claude asks for help

This loop is powered by Claude's vision capability combined with three Computer Use tools: computer (interact with screen), text_editor (read/write files), and bash (run terminal commands).

Setting up Computer Use via the API

Method 1: Docker quickstart (recommended)

Anthropic provides a Docker image with a full Linux desktop environment (X11) wired up for Computer Use. This is the safest approach — Claude controls an isolated VM, not your real machine.

Terminal — Anthropic's Computer Use Docker image
# Pull and run the reference implementation
docker pull ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest

docker run   -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY   -v $HOME/.anthropic:/home/user/.anthropic   -p 5900:5900 -p 8501:8501 -p 6080:6080 -p 8080:8080   ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest

Then open http://localhost:8080 in your browser. You'll see a Streamlit UI with a chat interface on the left and a live desktop view on the right. Type a task and watch Claude execute it.

Method 2: API directly (advanced)

Python — Computer Use API call
import anthropic

client = anthropic.Anthropic()

response = client.beta.messages.create(
    model="claude-opus-4-5",
    max_tokens=4096,
    tools=[
        {
            "type": "computer_20241022",
            "name": "computer",
            "display_width_px": 1280,
            "display_height_px": 800,
            "display_number": 1,
        },
        {"type": "text_editor_20241022", "name": "str_replace_editor"},
        {"type": "bash_20241022", "name": "bash"},
    ],
    messages=[{
        "role": "user",
        "content": "Open Firefox, go to our internal dashboard at http://localhost:3000, "
                   "take a screenshot of the Orders section, and save it as orders_screenshot.png"
    }],
    betas=["computer-use-2024-10-22"],
)

# Process tool use responses in a loop
for block in response.content:
    if block.type == "tool_use":
        print(f"Tool: {block.name}, Input: {block.input}")
    elif block.type == "text":
        print(f"Claude: {block.text}")

The tool actions Claude can take

ActionWhat it doesExample
screenshotCapture current screen stateCalled automatically before each action
left_clickClick at coordinatesClick a button, link, or form field
right_clickRight-click at coordinatesOpen context menus
double_clickDouble-click at coordinatesOpen files, select words
typeType textFill form fields
keyPress keyboard keysCtrl+C, Enter, Tab, F5
scrollScroll in a directionScroll pages, dropdown lists
mouse_moveMove without clickingHover for tooltips
cursor_positionGet current cursor locationVerify position before clicking

Computer Use via Claude Desktop (Claude in Chrome)

For web-specific automation, Anthropic offers Claude in Chrome — a browser extension where Claude can navigate and interact with websites in your active Chrome tab.

  1. Install Claude Desktop
  2. Install the Claude for Chrome extension from the Chrome Web Store
  3. Open Claude Desktop, go to Settings → Integrations → Chrome
  4. Enable the Chrome integration
  5. In Claude Desktop, click the Chrome icon in the message bar
  6. Type: "Go to amazon.in and find the top-rated laptop under ₹50,000"

Real-world use cases

BEST PRACTICES Always run Computer Use in an isolated VM or Docker container. Never give it access to your main machine with real accounts and data for untested tasks. Start with read-only tasks (screenshots, reading) before enabling write actions. Monitor the first 5 minutes of any new task type closely.