Overview
This guide shows how to get started with Anthropic’s Claude Computer Use in a couple minutes using Orgo to control a virtual desktop environment.Setup
Install the required packages:Simple Usage
The simplest way to use Orgo with Claude is through the built-inprompt()
method:
Customizing the Prompt Method
You can customize the prompt experience with various parameters:Advanced Usage
For more control, you can implement your own agent loop using the Anthropic API directly:Using Claude’s Thinking Capability
Claude 4 Sonnet can provide its reasoning process through the thinking parameter:Tool Compatibility
Orgo provides a complete set of methods corresponding to Claude’s computer use tools:Claude Tool Action | Orgo Method (Python) | Orgo Method (TypeScript) | Description |
---|---|---|---|
screenshot | computer.screenshot() | await computer.screenshot() | Capture the screen (returns PIL Image/Buffer) |
screenshot | computer.screenshot_base64() | await computer.screenshotBase64() | Capture the screen (returns base64 string) |
left_click | computer.left_click(x, y) | await computer.leftClick(x, y) | Left click at coordinates |
right_click | computer.right_click(x, y) | await computer.rightClick(x, y) | Right click at coordinates |
double_click | computer.double_click(x, y) | await computer.doubleClick(x, y) | Double click at coordinates |
type | computer.type(text) | await computer.type(text) | Type text |
key | computer.key(key_sequence) | await computer.key(keySequence) | Press keys (e.g., “Enter”, “ctrl+c”) |
scroll | computer.scroll(direction, amount) | await computer.scroll(direction, amount) | Scroll in specified direction |
wait | computer.wait(seconds) | await computer.wait(seconds) | Wait for specified seconds |
Claude 4 vs 3.5 Sonnet
When using different Claude models, make sure to use the appropriate tool type:- For Claude 4 Sonnet:
"type": "computer_20250124"
- For Claude 3.5 Sonnet:
"type": "computer_20241022"
- For Claude 4 Sonnet:
betas=["computer-use-2025-01-24"]
- For Claude 3.5 Sonnet:
betas=["computer-use-2024-10-22"]
TypeScript users: All methods are async and must be awaited. The TypeScript SDK uses camelCase for method names (e.g.,
leftClick
instead of left_click
).