Getting Started

1

Install the SDK

Install the Orgo SDK using pip:

pip install orgo
2

Set up your environment

Add your API key to your environment variables:

# In your terminal
export ORGO_API_KEY=your_api_key

# Or in your .env file
ORGO_API_KEY=your_api_key

Don’t have an API key? Create an account to get one.

3

Connect to a computer

Create a connection to a virtual computer:

from orgo import Computer

# Start a new computer
computer = Computer()  # Uses 'ORGO_API_KEY' environment variable

# Or connect to an existing one
computer = Computer(project_id="existing_id")
4

Perform actions

Control the computer with simple commands:

# Mouse actions
computer.left_click(100, 200)
computer.right_click(300, 400)

# Keyboard input
computer.type("Hello world")
computer.key("Enter")

# Take a screenshot
screenshot = computer.screenshot()
5

Integrate with Anthropic

Connect your Orgo computer with Claude:

from orgo.adapters import AnthropicAdapter
import anthropic

# Set up the adapter
adapter = AnthropicAdapter(computer)
claude = anthropic.Anthropic()

# Create a request with the computer tool
response = claude.beta.messages.create(
    model="claude-3-7-sonnet-20250219",
    tools=[adapter.get_tool_definition()],
    messages=[{"role": "user", "content": "Open Firefox"}],
    betas=["computer-use-2025-01-24"]
)

# Handle Claude's tool request
if response.stop_reason == "tool_use":
    tool = next(b for b in response.content if b.type == "tool_use")
    
    # Execute the requested action
    if tool.input.get("action") == "left_click":
        x, y = tool.input["coordinate"]
        computer.left_click(x, y)
    elif tool.input.get("action") == "type":
        computer.type(tool.input["text"])
    
    # Return result to Claude
    tool_result = adapter.format_result(tool_id=tool.id)
6

Clean up

Always shut down your computer when done:

# Terminate the computer instance
computer.shutdown()

Forgetting to shut down computers may result in unnecessary usage charges.

Complete Example

Here’s a full example of using Orgo with Anthropic:

from orgo import Computer
from orgo.adapters import AnthropicAdapter
import anthropic

# Initialize components
computer = Computer()
adapter = AnthropicAdapter(computer)
claude = anthropic.Anthropic()

try:
    # Initial request
    messages = [{"role": "user", "content": "Open Firefox and go to anthropic.com"}]
    
    response = claude.beta.messages.create(
        model="claude-3-7-sonnet-20250219",
        tools=[adapter.get_tool_definition()],
        messages=messages,
        betas=["computer-use-2025-01-24"]
    )
    
    # Tool use loop
    while response.stop_reason == "tool_use":
        # Get tool request
        tool = next(b for b in response.content if b.type == "tool_use")
        
        # Execute action
        if tool.input.get("action") == "left_click":
            computer.left_click(tool.input["coordinate"][0], tool.input["coordinate"][1])
        elif tool.input.get("action") == "type":
            computer.type(tool.input["text"])
        elif tool.input.get("action") == "key":
            computer.key(tool.input["text"])
        
        # Return result to Claude
        messages.append({"role": "assistant", "content": response.content})
        messages.append({"role": "user", "content": [adapter.format_result(tool_id=tool.id)]})
        
        response = claude.beta.messages.create(
            model="claude-3-7-sonnet-20250219",
            tools=[adapter.get_tool_definition()],
            messages=messages,
            betas=["computer-use-2025-01-24"]
        )
    
    print("Task complete!")
finally:
    # Always clean up
    computer.shutdown()

Next Steps