# Cua

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

- Category: Agents & Automation / Computer & Browser Use
- Language: Python
- Licence: MIT
- Repository: https://github.com/trycua/cua
- Website: https://cua.ai
- Canonical page: https://ai-tldr.dev/tools/cua/
- Updated: 2026-09-18

## In short

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 sits in the Computer & Browser Use category of the Agents & Automation tools and is open-source, written in Python and licensed MIT.

## 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.

1. Install Cua

   Install the core package from PyPI.

```bash
pip install cua
```

2. 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.

```python
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!")
```

3. 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.

```bash
claude mcp add --transport stdio cua-driver -- cua-driver mcp
```

## 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

## Version history

- 2026-09-18: Cua added libs/cua-s1, a source-only research component for CUA-S1: a family of small, specialist computer-use models whose first profile, cua-s1-form-v0, scores bounded form actions with a byte-level transformer encoder instead of generating text. The synthetic-data generator, training and evaluation code ship under MIT, but no weights or datasets are published.
