Guides

Claude Computer Use Guide

ClaudeAIHub. For official computer use documentation, visit platform.claude.com.

Claude computer use is a beta API feature that gives Claude the ability to interact with a computer desktop environment — taking screenshots, moving the cursor, clicking buttons, and typing text. Instead of writing custom automation code for each task, you describe what you want Claude to accomplish and it navigates the interface to do it.

Computer use is designed for developers building automated workflows, not for end users in the standard Claude app. Using it requires API access, a beta header, and typically a sandboxed environment.

Current Status

As of the official Anthropic documentation, computer use is in beta. It requires a specific beta header in your API requests. Anthropic provides a feedback form for developers testing the feature.

Supported Models and Beta Headers

Computer use requires one of two beta headers depending on the model you use:

Beta HeaderSupported Models
computer-use-2025-11-24Claude Opus 4.8, Claude Opus 4.6, Claude Sonnet 4.6, Claude Opus 4.5
computer-use-2025-01-24Claude Sonnet 4.5, Claude Haiku 4.5, Claude Opus 4.1, and some deprecated models

What Computer Use Can Do

The computer use feature provides Claude with three tools:

  • Computer tool: Takes screenshots of the current screen state, then controls mouse movement, clicks, drags, and keyboard input. Claude sees the screen via screenshots and acts on what it observes.
  • Text editor tool: Creates and edits text files, with structured operations like string replacement — cleaner than editing via keyboard simulation for file-based workflows.
  • Bash tool: Runs shell commands directly, which is more efficient than simulating terminal interactions via the computer tool for command-line tasks.

Intended Use Cases

  • Browser automation: Navigating websites, filling forms, extracting data from pages that don’t have a structured API.
  • Desktop workflow automation: Performing repetitive GUI tasks across applications without writing application-specific integration code.
  • Testing and QA: Automated UI testing by having Claude verify that interface elements exist and behave as expected.
  • Data entry tasks: Moving information between applications that don’t share a direct integration.
  • Research assistance: Navigating and interacting with research tools or databases that require GUI interaction.

Security Risks and Precautions

Anthropic’s official documentation emphasizes that computer use carries unique risks beyond standard API use. These risks are higher when the automated environment has internet access. The following precautions are recommended in official docs:

  • Use a dedicated virtual machine or container with minimal system privileges. Do not run computer use in your main development or production environment.
  • Avoid giving access to sensitive accounts or data. Do not provide login credentials for services where unauthorized actions could cause real-world harm.
  • Limit internet access. Where possible, restrict the automated environment to only the domains needed for the task.
  • Require human confirmation for consequential actions. Build approval steps into your workflow for any action with financial, legal, or irreversible consequences — accepting cookies, completing transactions, or agreeing to terms of service.
  • Be aware of prompt injection risk. If Claude is navigating websites or reading external content, malicious instructions in that content could override your original task. Anthropic has added classifier-based defenses that prompt user confirmation when potential injections are detected, but this protection is not foolproof.

Anthropic recommends informing end users of these risks and obtaining consent before enabling computer use features in your own products.

Basic API Request Structure

A computer use request includes the beta header and tool definitions for the capabilities you want Claude to use:

import anthropic

client = anthropic.Anthropic()

response = client.beta.messages.create(
    model="claude-opus-4-8",
    max_tokens=1024,
    tools=[
        {
            "type": "computer_20251124",
            "name": "computer",
            "display_width_px": 1024,
            "display_height_px": 768,
            "display_number": 1
        },
        {"type": "text_editor_20250728", "name": "str_replace_based_edit_tool"},
        {"type": "bash_20250124", "name": "bash"}
    ],
    messages=[{"role": "user", "content": "Open a text editor and write a summary of today's tasks."}],
    betas=["computer-use-2025-11-24"]
)

Anthropic provides a reference implementation on GitHub that includes a web interface, Docker container, and example agent loop — a practical starting point for developers exploring the feature.

Limitations

  • Beta feature: Behavior may change as Anthropic iterates on the implementation. Check official docs for the latest status.
  • Requires a display environment: The computer tool needs an actual screen (or virtual display) to take screenshots from.
  • Not for Claude.ai users: Computer use is an API-only feature, not available in the standard Claude web, desktop, or mobile apps.
  • Performance varies by task: Complex multi-step GUI workflows require careful prompt design and often benefit from breaking tasks into smaller verified steps.
  • Not suitable for sensitive systems: Due to security risks, computer use should not be deployed against systems holding sensitive personal data, financial records, or critical infrastructure without careful review.

Related Resources