AI/TLDR

Cua

Agent-ready sandboxes that let AI control full desktops on any OS

Overview

Cua is open-source infrastructure for computer-use agents: AI agents that see a screen, move the mouse, type on the keyboard, and run shell commands to finish tasks. It packages sandboxes (full VMs or containers) and SDKs behind one API, so an agent can drive a real desktop instead of just calling text APIs.

It targets developers building autonomous agents that need to operate software the way a person does. The same API works across Linux containers, Linux VMs, macOS, Windows, and Android, and it runs the same way on the cua.ai cloud or locally through QEMU, so you can prototype on your own machine and scale out later.

As an agent framework for computer and browser use, Cua sits between your agent logic and the operating system. Alongside the core sandbox SDK it ships related pieces: Cua Drivers for background desktop control, Cua-Bench for evaluation and RL environments, and Lume for macOS virtualization on Apple Silicon.

What it does

  • One Python API (Sandbox, Image) that works the same across Linux, macOS, Windows, and Android targets
  • Runs in the cloud on cua.ai or locally with QEMU, including bring-your-own-image .qcow2 and .iso files
  • Built-in actions for screenshots, mouse clicks, keyboard typing, shell commands, and multi-touch mobile gestures
  • Cua Drivers control native desktop apps in the background without stealing cursor or focus, via a CLI and MCP server
  • MCP integration so clients like Claude Code, Cursor, and Codex can drive a desktop
  • Cua-Bench environments for evaluating agents on OSWorld, ScreenSpot, and Windows Arena, with trajectory export for training

Getting started

Install the cua package and open an ephemeral sandbox to run your first computer-use actions. Requires Python 3.11 or later.

Install Cua

Install the core package from PyPI.

bashbash
pip install cua

Open a sandbox and act

Create an ephemeral Linux sandbox (or .macos(), .windows(), .android()) and run shell, screenshot, mouse, and keyboard actions through one API.

pythonpython
from cua import Sandbox, Image

async with Sandbox.ephemeral(Image.linux()) as sb:
    result = await sb.shell.run("echo hello")
    screenshot = await sb.screenshot()
    await sb.mouse.click(100, 200)
    await sb.keyboard.type("Hello from Cua!")

Optional: drive a desktop in the background

Install Cua Drivers and wire the MCP server into Claude Code so your agent can control native apps without taking over the cursor.

bashbash
claude mcp add --transport stdio cua-driver -- cua-driver mcp

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Building an autonomous agent that completes multi-step GUI tasks across web and desktop apps
  • Giving a coding agent (Claude Code, Cursor, Codex) a real computer to operate in the background via MCP
  • Evaluating or training computer-use models on benchmarks like OSWorld and Windows Arena, then exporting trajectories
  • Spinning up disposable macOS, Windows, or Android environments for automated testing on Apple Silicon or local QEMU

How Cua compares

Cua alongside other open-source computer & browser use tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Browser Use★ 105kA Python library that lets agents control a real browser to read pages and complete tasks online from natural-language instructions.
Open Interpreter★ 65.9kA lightweight coding agent that runs code on your own computer to carry out tasks from natural-language requests.
UI-TARS Desktop★ 38kByteDance's multimodal agent stack and desktop app that controls a computer's graphical interface using vision-language models.
Stagehand★ 23.5kA TypeScript browser-automation SDK from Browserbase that mixes natural-language actions with normal code for reliable web agents.
Skyvern★ 22.4kA tool that uses language models and computer vision to automate browser workflows without writing custom code for each website.
Cua★ 19.9kAgent-ready sandboxes that let AI control full desktops on any OS
Agent Zero★ 18.4kA general-purpose personal agent framework that uses the computer, terminal, and code as its main tools to complete tasks.
Browser Use Web UI★ 16.2kA user-friendly web UI, built on Gradio, that lets you control browser-use AI agents, pick from many LLMs, and use your own browser.