Change from c/ua to cua

This commit is contained in:
Morgan Dean
2025-07-29 18:55:59 +01:00
parent 6a27f001e6
commit c5ce1a9765
13 changed files with 114 additions and 122 deletions

View File

@@ -15,7 +15,7 @@ To run an agent loop simply do:
from agent import ComputerAgent
from computer import Computer
computer = Computer() # Connect to a c/ua container
computer = Computer() # Connect to a cua container
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",

View File

@@ -2,13 +2,14 @@
title: Running Models Locally
---
You can run open-source LLMs and vision models on your own machine using c/ua, without relying on cloud APIs. This is ideal for development, privacy, or running on air-gapped systems.
You can run open-source LLMs and vision models on your own machine using cua, without relying on cloud APIs. This is ideal for development, privacy, or running on air-gapped systems.
## Hugging Face (transformers)
Use the `huggingface-local/` prefix to run any Hugging Face model locally via the `transformers` library. This supports most text and vision models from the Hugging Face Hub.
**Example:**
```python
model = "huggingface-local/ByteDance-Seed/UI-TARS-1.5-7B"
```
@@ -18,6 +19,7 @@ model = "huggingface-local/ByteDance-Seed/UI-TARS-1.5-7B"
Use the `mlx/` prefix to run models using the `mlx-vlm` library, optimized for Apple Silicon (M1/M2/M3). This allows fast, local inference for many open-source models.
**Example:**
```python
model = "mlx/mlx-community/UI-TARS-1.5-7B-6bit"
```
@@ -27,6 +29,7 @@ model = "mlx/mlx-community/UI-TARS-1.5-7B-6bit"
Use the `ollama_chat/` prefix to run models using the `ollama` library. This allows fast, local inference for many open-source models.
**Example:**
```python
model = "omniparser+ollama_chat/llama3.2:latest"
```

View File

@@ -3,7 +3,7 @@ title: Sandboxed Tools
slug: sandboxed-tools
---
The Agent SDK supports defining custom Python tools that run securely in sandboxed environments on remote C/ua Computers. This enables safe execution of user-defined functions, isolation of dependencies, and robust automation workflows.
The Agent SDK supports defining custom Python tools that run securely in sandboxed environments on remote Cua Computers. This enables safe execution of user-defined functions, isolation of dependencies, and robust automation workflows.
## Example: Defining a Sandboxed Tool
@@ -28,4 +28,4 @@ agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20240620",
tools=[computer, read_file],
)
```
```

View File

@@ -2,7 +2,7 @@
title: Supported Agents
---
This page lists all supported agent loops and their compatible models/configurations in c/ua.
This page lists all supported agent loops and their compatible models/configurations in cua.
All agent loops are compatible with any LLM provider supported by LiteLLM.

View File

@@ -3,7 +3,7 @@ title: Commands
description: Computer commands and interface methods
---
This page describes the set of supported **commands** you can use to control a C/ua Computer directly via the Python SDK.
This page describes the set of supported **commands** you can use to control a Cua Computer directly via the Python SDK.
These commands map to the same actions available in the [Computer Server API Commands Reference](../libraries/computer-server/Commands), and provide low-level, async access to system operations from your agent or automation code.
@@ -13,18 +13,14 @@ Execute shell commands and get detailed results:
<Tabs items={['Python', 'TypeScript']}>
<Tab value="Python">
```python
# Run shell command
result = await computer.interface.run_command(cmd)
# result.stdout, result.stderr, result.returncode
```
```python # Run shell command result = await
computer.interface.run_command(cmd) # result.stdout, result.stderr,
result.returncode ```
</Tab>
<Tab value="TypeScript">
```typescript
// Run shell command
const result = await computer.interface.runCommand(cmd);
// result.stdout, result.stderr, result.returncode
```
```typescript // Run shell command const result = await
computer.interface.runCommand(cmd); // result.stdout, result.stderr,
result.returncode ```
</Tab>
</Tabs>
@@ -49,6 +45,7 @@ Precise mouse control and interaction:
await computer.interface.mouse_down(x, y, button="left") # Press and hold a mouse button
await computer.interface.mouse_up(x, y, button="left") # Release a mouse button
```
</Tab>
<Tab value="TypeScript">
```typescript
@@ -66,6 +63,7 @@ Precise mouse control and interaction:
await computer.interface.mouseDown(x, y, "left"); // Press and hold a mouse button
await computer.interface.mouseUp(x, y, "left"); // Release a mouse button
```
</Tab>
</Tabs>
@@ -85,6 +83,7 @@ Text input and key combinations:
await computer.interface.key_down("command") # Press and hold a key
await computer.interface.key_up("command") # Release a key
```
</Tab>
<Tab value="TypeScript">
```typescript
@@ -97,6 +96,7 @@ Text input and key combinations:
await computer.interface.keyDown("command"); // Press and hold a key
await computer.interface.keyUp("command"); // Release a key
```
</Tab>
</Tabs>
@@ -106,20 +106,14 @@ Mouse wheel and scrolling control:
<Tabs items={['Python', 'TypeScript']}>
<Tab value="Python">
```python
# Scrolling
await computer.interface.scroll(x, y) # Scroll the mouse wheel
await computer.interface.scroll_down(clicks) # Scroll down
await computer.interface.scroll_up(clicks) # Scroll up
```
```python # Scrolling await computer.interface.scroll(x, y) # Scroll the
mouse wheel await computer.interface.scroll_down(clicks) # Scroll down await
computer.interface.scroll_up(clicks) # Scroll up ```
</Tab>
<Tab value="TypeScript">
```typescript
// Scrolling
await computer.interface.scroll(x, y); // Scroll the mouse wheel
await computer.interface.scrollDown(clicks); // Scroll down
await computer.interface.scrollUp(clicks); // Scroll up
```
```typescript // Scrolling await computer.interface.scroll(x, y); // Scroll
the mouse wheel await computer.interface.scrollDown(clicks); // Scroll down
await computer.interface.scrollUp(clicks); // Scroll up ```
</Tab>
</Tabs>
@@ -129,18 +123,14 @@ Screen capture and display information:
<Tabs items={['Python', 'TypeScript']}>
<Tab value="Python">
```python
# Screen operations
await computer.interface.screenshot() # Take a screenshot
await computer.interface.get_screen_size() # Get screen dimensions
```
```python # Screen operations await computer.interface.screenshot() # Take a
screenshot await computer.interface.get_screen_size() # Get screen
dimensions ```
</Tab>
<Tab value="TypeScript">
```typescript
// Screen operations
await computer.interface.screenshot(); // Take a screenshot
await computer.interface.getScreenSize(); // Get screen dimensions
```
```typescript // Screen operations await computer.interface.screenshot(); //
Take a screenshot await computer.interface.getScreenSize(); // Get screen
dimensions ```
</Tab>
</Tabs>
@@ -150,18 +140,14 @@ System clipboard management:
<Tabs items={['Python', 'TypeScript']}>
<Tab value="Python">
```python
# Clipboard operations
await computer.interface.set_clipboard(text) # Set clipboard content
await computer.interface.copy_to_clipboard() # Get clipboard content
```
```python # Clipboard operations await
computer.interface.set_clipboard(text) # Set clipboard content await
computer.interface.copy_to_clipboard() # Get clipboard content ```
</Tab>
<Tab value="TypeScript">
```typescript
// Clipboard operations
await computer.interface.setClipboard(text); // Set clipboard content
await computer.interface.copyToClipboard(); // Get clipboard content
```
```typescript // Clipboard operations await
computer.interface.setClipboard(text); // Set clipboard content await
computer.interface.copyToClipboard(); // Get clipboard content ```
</Tab>
</Tabs>
@@ -188,6 +174,7 @@ Direct file and directory manipulation:
await computer.interface.delete_dir(path) # Delete directory
await computer.interface.list_dir(path) # List directory contents
```
</Tab>
<Tab value="TypeScript">
```typescript
@@ -207,6 +194,7 @@ Direct file and directory manipulation:
await computer.interface.deleteDir(path); // Delete directory
await computer.interface.listDir(path); // List directory contents
```
</Tab>
</Tabs>
@@ -216,15 +204,11 @@ Access system accessibility information:
<Tabs items={['Python', 'TypeScript']}>
<Tab value="Python">
```python
# Accessibility
await computer.interface.get_accessibility_tree() # Get accessibility tree
```
```python # Accessibility await computer.interface.get_accessibility_tree()
# Get accessibility tree ```
</Tab>
<Tab value="TypeScript">
```typescript
// Accessibility
await computer.interface.getAccessibilityTree(); // Get accessibility tree
```
```typescript // Accessibility await
computer.interface.getAccessibilityTree(); // Get accessibility tree ```
</Tab>
</Tabs>

View File

@@ -1,15 +1,15 @@
---
title: C/ua Computers
description: Understanding c/ua computer types and connection methods
title: Cua Computers
description: 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.
C/ua 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 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.
## c/ua cloud container
## cua cloud container
This is a cloud container running the Computer Server. This is the easiest & safest way to get a c/ua computer, and can be done by going on the trycua.com website.
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.
<Tabs items={['Python', 'TypeScript']}>
<Tab value="Python">
@@ -18,13 +18,14 @@ This is a cloud container running the Computer Server. This is the easiest & saf
computer = Computer(
os_type="linux",
provider_type="cloud",
provider_type="cloud",
name="your-container-name",
api_key="your-api-key"
)
await computer.run() # Connect to the container
```
</Tab>
<Tab value="TypeScript">
```typescript
@@ -38,26 +39,31 @@ This is a cloud container running the Computer Server. This is the easiest & saf
await computer.run(); // Connect to the container
```
</Tab>
</Tabs>
## c/ua local containers
## cua local containers
c/ua provides local containers. This can be done using either the Lume CLI (macOS) or Docker CLI (Linux, Windows).
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
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"
```
2. Start a local c/ua container
2. Start a local cua container
```bash
lume run macos-sequoia-cua:latest
```
3. Connect with Computer
<Tabs items={['Python']}>
3. Connect with Computer
<Tabs items={['Python']}>
<Tab value="Python">
```python
computer = Computer(
@@ -66,9 +72,10 @@ lume run macos-sequoia-cua:latest
name="macos-sequoia-cua:latest"
)
await computer.run() # Connect to the container
```
</Tab>
await computer.run() # Connect to the container
```
</Tab>
</Tabs>
## Your host desktop
@@ -81,11 +88,10 @@ python -m computer-server
```
Connect with:
<Tabs items={['Python']}>
<Tab value="Python">
```python
computer = Computer(use_host_computer_server=True)
await computer.run() # Connect to the host desktop
```
```python computer = Computer(use_host_computer_server=True) await
computer.run() # Connect to the host desktop ```
</Tab>
</Tabs>

View File

@@ -3,7 +3,7 @@ title: Sandboxed Python
slug: sandboxed-python
---
You can run Python functions securely inside a sandboxed virtual environment on a remote C/ua Computer. This is useful for executing untrusted user code, isolating dependencies, or providing a safe environment for automation tasks.
You can run Python functions securely inside a sandboxed virtual environment on a remote Cua Computer. This is useful for executing untrusted user code, isolating dependencies, or providing a safe environment for automation tasks.
## How It Works

View File

@@ -7,17 +7,17 @@ import { Monitor, Code, BookOpen } from 'lucide-react';
# Welcome!
c/ua is a framework for automating Windows, Mac, and Linux apps powered by computer-using agents (CUAs).
cua is a framework for automating Windows, Mac, and Linux apps powered by computer-using agents (CUAs).
c/ua makes every stage of computer-using agent development simple:
cua makes every stage of computer-using agent development simple:
- **Development**: Use any LLM provider with liteLLM. The agent SDK makes multiple agent loop providers, trajectory tracing, caching, and budget management easy
- **Containerization**: c/ua offers Docker containers pre-installed with everything needed for AI-powered RPA
- **Deployment**: c/ua cloud gives you a production-ready cloud environment for your assistants
- **Containerization**: cua offers Docker containers pre-installed with everything needed for AI-powered RPA
- **Deployment**: cua cloud gives you a production-ready cloud environment for your assistants
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mt-8">
<Card icon={<Monitor />} href="/home/quickstart-ui" title="Quickstart (UI)">
Try the c/ua Agent UI in your browser—no coding required.
Try the cua Agent UI in your browser—no coding required.
</Card>
<Card
icon={<Code />}

View File

@@ -6,7 +6,7 @@ github:
- https://github.com/trycua/cua/tree/main/libs/python/agent
---
The Agent library provides the ComputerAgent class and tools for building AI agents that automate workflows on C/ua Computers.
The Agent library provides the ComputerAgent class and tools for building AI agents that automate workflows on Cua Computers.
## Reference
@@ -16,7 +16,7 @@ The Agent library provides the ComputerAgent class and tools for building AI age
from agent import ComputerAgent
from computer import Computer
computer = Computer() # Connect to a c/ua container
computer = Computer() # Connect to a cua container
agent = ComputerAgent(
model="anthropic/claude-3-5-sonnet-20241022",
tools=[computer]

View File

@@ -14,7 +14,7 @@ The Computer library provides a Computer class that can be used to control and a
### Basic Usage
Connect to a c/ua cloud container:
Connect to a cua cloud container:
<Tabs items={['Python', 'TypeScript']}>
<Tab value="Python">
@@ -28,7 +28,7 @@ Connect to a c/ua cloud container:
api_key="your-api-key"
)
computer = await computer.run() # Connect to a c/ua cloud container
computer = await computer.run() # Connect to a cua cloud container
```
</Tab>
@@ -42,13 +42,13 @@ Connect to a c/ua cloud container:
apiKey: "your-api-key"
});
await computer.run(); // Connect to a c/ua cloud container
await computer.run(); // Connect to a cua cloud container
```
</Tab>
</Tabs>
Connect to a c/ua local container:
Connect to a cua local container:
<Tabs items={['Python']}>
<Tab value="Python">

View File

@@ -1,6 +1,6 @@
---
title: Quickstart (CLI)
description: Get started with the c/ua Agent CLI in 4 steps
description: Get started with the cua Agent CLI in 4 steps
icon: Rocket
---
@@ -8,20 +8,20 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
Get up and running with the c/ua Agent CLI in 4 simple steps.
Get up and running with the cua Agent CLI in 4 simple steps.
<Steps>
<Step>
## Introduction
c/ua combines Computer (interface) + Agent (AI) for automating desktop apps. The Agent CLI provides a clean terminal interface to control your remote computer using natural language commands.
cua combines Computer (interface) + Agent (AI) for automating desktop apps. The Agent CLI provides a clean terminal interface to control your remote computer using natural language commands.
</Step>
<Step>
## Create Your First c/ua Container
## Create Your First cua Container
1. Go to [trycua.com/signin](https://www.trycua.com/signin)
2. Navigate to **Dashboard > Containers > Create Instance**
@@ -32,7 +32,7 @@ c/ua combines Computer (interface) + Agent (AI) for automating desktop apps. The
<Step>
## Install c/ua
## Install cua
<Accordions type="single" defaultValue="uv">
@@ -66,7 +66,7 @@ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | ie
```bash
uv python install 3.12
# uv will install c/ua dependencies automatically when you use --with "cua-agent[cli]"
# uv will install cua dependencies automatically when you use --with "cua-agent[cli]"
```
</Accordion>
@@ -116,7 +116,7 @@ conda create -n cua python=3.12
conda activate cua
```
### Install c/ua
### Install cua
```bash
pip install "cua-agent[cli]" cua-computer
@@ -126,7 +126,7 @@ pip install "cua-agent[cli]" cua-computer
<Accordion title="pip" value="pip">
### Install c/ua
### Install cua
```bash
pip install "cua-agent[cli]" cua-computer
@@ -140,7 +140,7 @@ pip install "cua-agent[cli]" cua-computer
<Step>
## Run c/ua CLI
## Run cua CLI
Choose your preferred AI model:
@@ -246,21 +246,23 @@ python -m agent.cli omniparser+ollama_chat/llama3.2:latest
If you haven't set up environment variables, the CLI will guide you through the setup:
1. **Container Name**: Enter your c/ua container name (or get one at [trycua.com](https://www.trycua.com/))
2. **CUA API Key**: Enter your c/ua API key
1. **Container Name**: Enter your cua container name (or get one at [trycua.com](https://www.trycua.com/))
2. **CUA API Key**: Enter your cua API key
3. **Provider API Key**: Enter your AI provider API key (OpenAI, Anthropic, etc.)
### Start Chatting
Once connected, you'll see:
```
💻 Connected to your-container-name (model, agent_loop)
Type 'exit' to quit.
>
>
```
You can ask your agent to perform actions like:
- "Take a screenshot and tell me what's on the screen"
- "Open Firefox and go to github.com"
- "Type 'Hello world' into the terminal"

View File

@@ -1,26 +1,26 @@
---
title: Quickstart (for Developers)
description: Get started with c/ua in 5 steps
description: Get started with cua in 5 steps
icon: Rocket
---
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
Get up and running with c/ua in 5 simple steps.
Get up and running with cua in 5 simple steps.
<Steps>
<Step>
## Introduction
c/ua combines Computer (interface) + Agent (AI) for automating desktop apps. Computer handles clicks/typing, Agent provides the intelligence.
cua combines Computer (interface) + Agent (AI) for automating desktop apps. Computer handles clicks/typing, Agent provides the intelligence.
</Step>
<Step>
## Create Your First c/ua Container
## Create Your First cua Container
1. Go to [trycua.com/signin](https://www.trycua.com/signin)
2. Navigate to **Dashboard > Containers > Create Instance**
@@ -31,19 +31,13 @@ c/ua combines Computer (interface) + Agent (AI) for automating desktop apps. Com
<Step>
## Install c/ua
## Install cua
<Tabs items={['Python', 'TypeScript']}>
<Tab value="Python">
```bash
pip install "cua-agent[all]" cua-computer
```
</Tab>
<Tab value="TypeScript">
```bash
npm install @trycua/computer
```
```bash pip install "cua-agent[all]" cua-computer ```
</Tab>
<Tab value="TypeScript">```bash npm install @trycua/computer ```</Tab>
</Tabs>
</Step>
@@ -59,17 +53,18 @@ c/ua combines Computer (interface) + Agent (AI) for automating desktop apps. Com
async with Computer(
os_type="linux",
provider_type="cloud",
provider_type="cloud",
name="your-container-name",
api_key="your-api-key"
) as computer:
# Take screenshot
screenshot = await computer.interface.screenshot()
# Click and type
await computer.interface.left_click(100, 100)
await computer.interface.type("Hello!")
```
</Tab>
<Tab value="TypeScript">
```typescript
@@ -86,7 +81,7 @@ c/ua combines Computer (interface) + Agent (AI) for automating desktop apps. Com
try {
// Take screenshot
const screenshot = await computer.interface.screenshot();
// Click and type
await computer.interface.leftClick(100, 100);
await computer.interface.typeText("Hello!");
@@ -94,6 +89,7 @@ c/ua combines Computer (interface) + Agent (AI) for automating desktop apps. Com
await computer.close();
}
```
</Tab>
</Tabs>

View File

@@ -1,6 +1,6 @@
---
title: Quickstart (GUI)
description: Get started with the c/ua Agent UI in 3 steps
description: Get started with the cua Agent UI in 3 steps
icon: Rocket
---
@@ -8,20 +8,20 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
Get up and running with the c/ua Agent UI in 3 simple steps.
Get up and running with the cua Agent UI in 3 simple steps.
<Steps>
<Step>
## Introduction
c/ua combines Computer (interface) + Agent (AI) for automating desktop apps. The Agent UI provides a simple chat interface to control your remote computer using natural language.
cua combines Computer (interface) + Agent (AI) for automating desktop apps. The Agent UI provides a simple chat interface to control your remote computer using natural language.
</Step>
<Step>
## Create Your First c/ua Container
## Create Your First cua Container
1. Go to [trycua.com/signin](https://www.trycua.com/signin)
2. Navigate to **Dashboard > Containers > Create Instance**
@@ -32,7 +32,7 @@ c/ua combines Computer (interface) + Agent (AI) for automating desktop apps. The
<Step>
## Install and Run c/ua
## Install and Run cua
<Accordions type="single" defaultValue="uv">
@@ -68,7 +68,7 @@ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | ie
uv python install 3.12
```
### Run c/ua
### Run cua
```bash
uv run --with "cua-agent[ui]" -m agent.ui
@@ -121,7 +121,7 @@ conda create -n cua python=3.12
conda activate cua
```
### Install and run c/ua
### Install and run cua
```bash
pip install "cua-agent[ui]" cua-computer
@@ -132,7 +132,7 @@ python -m agent.ui
<Accordion title="pip" value="pip">
### Install c/ua
### Install cua
```bash
pip install "cua-agent[ui]" cua-computer
@@ -153,6 +153,7 @@ python -m agent.ui
Open your browser to the displayed URL and start chatting with your computer-using agent.
You can ask your agent to perform actions like:
- "Open Firefox and go to github.com"
- "Take a screenshot and tell me what's on the screen"
- "Type 'Hello world' into the terminal"