LogoCua Documentation

Cua Computers

Understanding cua computer types and connection methods

Before we can automate apps using AI, we need to first connect to a Computer Server to give the AI a safe environment to execute workflows in.

Cua Computers are preconfigured virtual machines running the Computer Server. They can be either macOS, Linux, or Windows. They're found in either a cloud-native container, or on your host desktop.

cua cloud container

This is a cloud container running the Computer Server. This is the easiest & safest way to get a cua computer, and can be done by going on the trycua.com website.

from computer import Computer

computer = Computer(
    os_type="linux",
    provider_type="cloud",
    name="your-container-name",
    api_key="your-api-key"
)

await computer.run() # Connect to the container
import { Computer, OSType } from '@trycua/computer';

const computer = new Computer({
  osType: OSType.LINUX,
  name: "your-container-name",
  apiKey: "your-api-key"
});

await computer.run(); // Connect to the container

cua local containers

cua provides local containers. This can be done using either the Lume CLI (macOS) or Docker CLI (Linux, Windows).

Lume (macOS Only):

  1. Install lume cli
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"
  1. Start a local cua container
lume run macos-sequoia-cua:latest
  1. Connect with Computer
computer = Computer(
    os_type="macos", 
    provider_type="lume", 
    name="macos-sequoia-cua:latest"
)

    await computer.run() # Connect to the container

Your host desktop

You can also have agents control your desktop directly by running Computer Server without any containerization layer. Beware that AI models may perform risky actions.

pip install cua-computer-server
python -m computer-server

Connect with:


computer = Computer(use_host_computer_server=True) await
computer.run() # Connect to the host desktop