Skip to main content

Installation

1

Install the SDK

pip install orgo python-dotenv
2

Get your API key

  1. Create an account at orgo.ai
  2. Get your API key from orgo.ai/workspaces
  3. Create a .env file in your project:
.env
ORGO_API_KEY=sk_live_...
3

Launch a computer-use agent

from orgo import Computer
from dotenv import load_dotenv

load_dotenv()

# Create a computer
computer = Computer()
# ✓ Computer [computer-1568] successfully created under workspace [project-a1b2c3d4]

# Control it with natural language
computer.prompt("Open Firefox and search for AI news")

Organize with Projects

from orgo import Computer

# Create computer in specific project
computer = Computer(project="My Project")
# ✓ Computer [computer-2941] successfully created under workspace [My Project]

# Create multiple computers
computers = []
for i in range(3):
    comp = Computer(project="My new workspace")
    computers.append(comp)
# ✓ Computer [computer-1568] successfully created under workspace [My new workspace]
# ✓ Computer [computer-2941] successfully created under workspace [My new workspace]
# ✓ Computer [computer-7352] successfully created under workspace [My new workspace]

Manual Control

Mouse & Keyboard

# Mouse actions
computer.left_click(100, 200)
computer.right_click(300, 400)
computer.double_click(500, 300)
computer.scroll(direction="down", amount=3)

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

# Take screenshot
screenshot = computer.screenshot()  # Returns PIL Image
screenshot.save("screenshot.png")

# Or get base64
base64_image = computer.screenshot_base64()

Execute Code

# Run bash commands
output = computer.bash("ls -la")
print(output)

# Execute Python code
result = computer.exec("print('Hello from Python')")
print(result)

# Wait between actions
computer.wait(2.0)  # Wait 2 seconds
These methods give you full control to implement your own custom computer-use agent. See the full API reference for all available methods.

AI Control

By default, prompt() uses Orgo’s hosted AI agent:
computer.prompt("Create a report on AI trends and save it as report.pdf")
You can also use your own Anthropic API key:
computer.prompt(
    "Create a report on AI trends and save it as report.pdf",
    provider="anthropic",
    api_key="sk-ant-..."
)

Advanced Options

computer.prompt(
    "Research the latest AI developments and create a summary",
    provider="anthropic",
    api_key="sk-ant-...",
    model="claude-sonnet-4-5-20250929",  # Specific model
    thinking_enabled=True,               # Show Claude's reasoning
    thinking_budget=2048,                # Extended thinking tokens
    max_iterations=50,                   # Max agent loops
    verbose=True,                        # Show detailed logs
    callback=lambda event, data: print(f"{event}: {data}")  # Progress tracking
)

Complete Example

from orgo import Computer
import os
from dotenv import load_dotenv

load_dotenv()

# Create computer with custom specs
computer = Computer(
    project="Research Project",
    name="research-agent",
    ram=8,
    cpu=4
)

try:
    # Track progress
    def on_progress(event_type, event_data):
        if event_type == "text":
            print(f"💬 {event_data}")
        elif event_type == "tool_use":
            print(f"🔧 {event_data.get('action')}")
    
    # Run task
    messages = computer.prompt(
        "Search for recent AI papers, summarize the top 3, and create a document",
        callback=on_progress
    )
    
    print("Task complete!")
    
    # Take screenshot
    screenshot = computer.screenshot()
    screenshot.save("result.png")
    
finally:
    computer.destroy()

Custom Computer Specs

computer = Computer(
    project="GPU Workload",
    name="ml-trainer",
    ram=32,        # 1, 2, 4, 8, 16, 32, or 64 GB
    cpu=16,        # 1, 2, 4, 8, or 16 cores
    os="linux",    # "linux" or "windows"
    gpu="a100-80gb"  # "none", "a10", "l40s", "a100-40gb", "a100-80gb"
)
Defaults: linux, 2GB RAM, 2 CPU cores, no GPU

Computer Lifecycle

# Check status
status = computer.status()
print(f"Status: {status['status']}")

# Restart computer
computer.restart()
# ✓ Computer restarted

# Connect to existing computer
existing = Computer(computer_id="06a8db0f-13d0-4fed-a544-98fe3d362393")
# ✓ Connected to computer: 06a8db0f-13d0-4fed-a544-98fe3d362393

# Get computer URL
print(f"View at: {computer.url}")
# https://orgo.ai/workspaces/06a8db0f-13d0-4fed-a544-98fe3d362393

# Delete when done
computer.destroy()
# ✓ Computer deleted
Computers automatically stop during inactivity to save resources. They restart automatically when you send commands.

Quiet Mode

Disable console output for production:
# Disable all console output
computer = Computer(project="Production", verbose=False)

# Or for specific prompt calls
computer.prompt("Do something", verbose=False)

Environment Variables

ORGO_API_KEY=sk_live_...

# Optional - only needed if using provider="anthropic"
ANTHROPIC_API_KEY=sk-ant-...

Tips

dev = Computer(project="Development")
test = Computer(project="Testing")
prod = Computer(project="Production")
try:
    computer.prompt("Do task")
finally:
    computer.destroy()
screenshot = computer.screenshot()
screenshot.save("debug.png")
def on_progress(event, data):
    print(f"{event}: {data}")

computer.prompt("Task", callback=on_progress)

Next Steps