Let Claude control a virtual desktop
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.
Install the required packages:
Set up your API keys:
The simplest way to use Orgo with Claude is through the built-in prompt()
method:
This approach handles all the complexity of the agent loop automatically, making it easy to get started.
You can customize the prompt experience with various parameters:
For more control, you can implement your own agent loop using the Anthropic API directly:
Claude 4 Sonnet can provide its reasoning process through the thinking parameter:
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 |
When using different Claude models, make sure to use the appropriate tool type:
"type": "computer_20250124"
"type": "computer_20241022"
And use the corresponding beta flag:
betas=["computer-use-2025-01-24"]
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
).
Here is a video version showing how to set up Claude Computer Use in 30 seconds:
You can follow the video tutorial above or use this written guide.