diff --git a/README.md b/README.md index b0769460..51d189f2 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,22 @@
- - - - Cua logo - + + + + + Cua logo + + -[![Python](https://img.shields.io/badge/Python-333333?logo=python&logoColor=white&labelColor=333333)](#) -[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?&logo=discord&logoColor=white)](https://discord.com/invite/mVnXXpdE85) -
+

Build and deploy AI agents that can reason, plan and act on any Computers

+ +

+ cua.ai + Discord + Twitter + Documentation +
trycua%2Fcua | Trendshift +

diff --git a/docs/content/docs/agent-sdk/agent-loops.mdx b/docs/content/docs/agent-sdk/agent-loops.mdx index 0b759b3e..fac5f5af 100644 --- a/docs/content/docs/agent-sdk/agent-loops.mdx +++ b/docs/content/docs/agent-sdk/agent-loops.mdx @@ -4,11 +4,7 @@ description: Supported computer-using agent loops and models --- - A corresponding{' '} - - Jupyter Notebook - {' '} - is available for this documentation. + A corresponding Jupyter Notebook is available for this documentation. An agent can be thought of as a loop - it generates actions, executes them, and repeats until done: diff --git a/docs/content/docs/agent-sdk/customizing-computeragent.mdx b/docs/content/docs/agent-sdk/customizing-computeragent.mdx index 158495e0..a89b9269 100644 --- a/docs/content/docs/agent-sdk/customizing-computeragent.mdx +++ b/docs/content/docs/agent-sdk/customizing-computeragent.mdx @@ -3,14 +3,7 @@ title: Customize ComputerAgent --- - A corresponding{' '} - - Jupyter Notebook - {' '} - is available for this documentation. + A corresponding Jupyter Notebook is available for this documentation. The `ComputerAgent` interface provides an easy proxy to any computer-using model configuration, and it is a powerful framework for extending and building your own agentic systems. diff --git a/docs/content/docs/agent-sdk/integrations/hud.mdx b/docs/content/docs/agent-sdk/integrations/hud.mdx index 7bfcbdea..9575ebf6 100644 --- a/docs/content/docs/agent-sdk/integrations/hud.mdx +++ b/docs/content/docs/agent-sdk/integrations/hud.mdx @@ -4,11 +4,7 @@ description: Use ComputerAgent with HUD for benchmarking and evaluation --- - A corresponding{' '} - - Jupyter Notebook - {' '} - is available for this documentation. + A corresponding Jupyter Notebook is available for this documentation. The HUD integration allows an agent to be benchmarked using the [HUD framework](https://www.hud.so/). Through the HUD integration, the agent controls a computer inside HUD, where tests are run to evaluate the success of each task. diff --git a/docs/content/docs/libraries/mcp-server/client-integrations.mdx b/docs/content/docs/agent-sdk/mcp-server/client-integrations.mdx similarity index 100% rename from docs/content/docs/libraries/mcp-server/client-integrations.mdx rename to docs/content/docs/agent-sdk/mcp-server/client-integrations.mdx diff --git a/docs/content/docs/libraries/mcp-server/configuration.mdx b/docs/content/docs/agent-sdk/mcp-server/configuration.mdx similarity index 100% rename from docs/content/docs/libraries/mcp-server/configuration.mdx rename to docs/content/docs/agent-sdk/mcp-server/configuration.mdx diff --git a/docs/content/docs/agent-sdk/mcp-server/index.mdx b/docs/content/docs/agent-sdk/mcp-server/index.mdx new file mode 100644 index 00000000..108437f3 --- /dev/null +++ b/docs/content/docs/agent-sdk/mcp-server/index.mdx @@ -0,0 +1,17 @@ +--- +title: MCP Server +description: Run Cua agents through Claude Desktop and other MCP clients +--- + +The MCP Server exposes Cua agents as tools for [Model Context Protocol](https://modelcontextprotocol.io/) clients like Claude Desktop. This lets you ask Claude to perform computer tasks directly from the chat interface. + +```bash +pip install cua-mcp-server +``` + +## Key Features + +- **Claude Desktop integration** - Use Cua agents directly in Claude's chat +- **Multi-client support** - Concurrent sessions with automatic resource management +- **Progress reporting** - Real-time updates during task execution +- **VM safety** - Runs in sandboxed VMs by default diff --git a/docs/content/docs/libraries/mcp-server/installation.mdx b/docs/content/docs/agent-sdk/mcp-server/installation.mdx similarity index 100% rename from docs/content/docs/libraries/mcp-server/installation.mdx rename to docs/content/docs/agent-sdk/mcp-server/installation.mdx diff --git a/docs/content/docs/libraries/mcp-server/llm-integrations.mdx b/docs/content/docs/agent-sdk/mcp-server/llm-integrations.mdx similarity index 100% rename from docs/content/docs/libraries/mcp-server/llm-integrations.mdx rename to docs/content/docs/agent-sdk/mcp-server/llm-integrations.mdx diff --git a/docs/content/docs/libraries/mcp-server/meta.json b/docs/content/docs/agent-sdk/mcp-server/meta.json similarity index 100% rename from docs/content/docs/libraries/mcp-server/meta.json rename to docs/content/docs/agent-sdk/mcp-server/meta.json diff --git a/docs/content/docs/libraries/mcp-server/tools.mdx b/docs/content/docs/agent-sdk/mcp-server/tools.mdx similarity index 100% rename from docs/content/docs/libraries/mcp-server/tools.mdx rename to docs/content/docs/agent-sdk/mcp-server/tools.mdx diff --git a/docs/content/docs/libraries/mcp-server/usage.mdx b/docs/content/docs/agent-sdk/mcp-server/usage.mdx similarity index 100% rename from docs/content/docs/libraries/mcp-server/usage.mdx rename to docs/content/docs/agent-sdk/mcp-server/usage.mdx diff --git a/docs/content/docs/agent-sdk/meta.json b/docs/content/docs/agent-sdk/meta.json index 0a733f28..6bb01b62 100644 --- a/docs/content/docs/agent-sdk/meta.json +++ b/docs/content/docs/agent-sdk/meta.json @@ -14,6 +14,7 @@ "usage-tracking", "telemetry", "benchmarks", - "integrations" + "integrations", + "mcp-server" ] } diff --git a/docs/content/docs/libraries/cua-cli/commands.mdx b/docs/content/docs/cli-playbook/commands.mdx similarity index 99% rename from docs/content/docs/libraries/cua-cli/commands.mdx rename to docs/content/docs/cli-playbook/commands.mdx index c10c3a5e..6f3b4c7e 100644 --- a/docs/content/docs/libraries/cua-cli/commands.mdx +++ b/docs/content/docs/cli-playbook/commands.mdx @@ -1,5 +1,5 @@ --- -title: Commands +title: Command Reference description: Complete reference for all CUA CLI commands --- diff --git a/docs/content/docs/cli-playbook/index.mdx b/docs/content/docs/cli-playbook/index.mdx new file mode 100644 index 00000000..dec372f9 --- /dev/null +++ b/docs/content/docs/cli-playbook/index.mdx @@ -0,0 +1,68 @@ +--- +title: Getting Started +description: Install and set up the CUA CLI +--- + +import { Tabs, Tab } from 'fumadocs-ui/components/tabs'; +import { Callout } from 'fumadocs-ui/components/callout'; + +The Cua CLI is a command-line tool for managing your Cua cloud sandboxes. Create, start, stop, and connect to sandboxes directly from your terminal. + +## Installation + + + + ```bash + curl -LsSf https://cua.ai/cli/install.sh | sh + ``` + + + ```powershell + powershell -ExecutionPolicy ByPass -c "irm https://cua.ai/cli/install.ps1 | iex" + ``` + + + +This installs [Bun](https://bun.sh) and the CUA CLI. Verify with: + +```bash +cua --help +``` + +## Authentication + +Login to your CUA account: + +```bash +# Browser-based login +cua auth login + +# Or with API key +cua auth login --api-key sk-your-api-key-here +``` + +Generate a `.env` file for your project: + +```bash +cua auth env +``` + +## Quick Start + +```bash +# Create a sandbox +cua create --os linux --size small --region north-america + +# List sandboxes +cua list + +# Open VNC in browser +cua vnc my-sandbox + +# Stop a sandbox +cua stop my-sandbox +``` + +## Next Steps + +- [Command Reference](/cli-playbook/commands) - Full list of available commands diff --git a/docs/content/docs/cli-playbook/meta.json b/docs/content/docs/cli-playbook/meta.json new file mode 100644 index 00000000..2447541f --- /dev/null +++ b/docs/content/docs/cli-playbook/meta.json @@ -0,0 +1,5 @@ +{ + "title": "Cloud CLI", + "description": "Command-line interface for CUA Cloud", + "pages": ["index", "commands"] +} diff --git a/docs/content/docs/computer-sdk/commands.mdx b/docs/content/docs/computer-sdk/commands.mdx index 30818e2e..7421330d 100644 --- a/docs/content/docs/computer-sdk/commands.mdx +++ b/docs/content/docs/computer-sdk/commands.mdx @@ -5,7 +5,7 @@ description: Computer commands and interface methods 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. +These commands map to the same actions available in the [Computer Server API Commands Reference](/computer-sdk/computer-server/Commands), and provide low-level, async access to system operations from your agent or automation code. ## Shell Actions diff --git a/docs/content/docs/libraries/computer-server/Commands.mdx b/docs/content/docs/computer-sdk/computer-server/Commands.mdx similarity index 100% rename from docs/content/docs/libraries/computer-server/Commands.mdx rename to docs/content/docs/computer-sdk/computer-server/Commands.mdx diff --git a/docs/content/docs/libraries/computer-server/REST-API.mdx b/docs/content/docs/computer-sdk/computer-server/REST-API.mdx similarity index 100% rename from docs/content/docs/libraries/computer-server/REST-API.mdx rename to docs/content/docs/computer-sdk/computer-server/REST-API.mdx diff --git a/docs/content/docs/libraries/computer-server/WebSocket-API.mdx b/docs/content/docs/computer-sdk/computer-server/WebSocket-API.mdx similarity index 100% rename from docs/content/docs/libraries/computer-server/WebSocket-API.mdx rename to docs/content/docs/computer-sdk/computer-server/WebSocket-API.mdx diff --git a/docs/content/docs/computer-sdk/computer-server/index.mdx b/docs/content/docs/computer-sdk/computer-server/index.mdx new file mode 100644 index 00000000..1e47c90b --- /dev/null +++ b/docs/content/docs/computer-sdk/computer-server/index.mdx @@ -0,0 +1,15 @@ +--- +title: Computer Server +description: HTTP/WebSocket server for remote computer control +--- + +The Computer Server is an HTTP and WebSocket server that runs inside each Cua sandbox (VM or container). It exposes APIs for remote computer control - allowing the Computer SDK and agents to execute actions like clicking, typing, taking screenshots, and running commands on the sandboxed environment. + +When you use `Computer(provider_type="cloud")` or any other provider, the Computer SDK communicates with this server running inside the sandbox to execute your automation commands. + +## Key Features + +- **REST API** - Execute commands, take screenshots, manage files +- **WebSocket API** - Real-time streaming for continuous interaction +- **Cross-platform** - Runs on Linux, macOS, and Windows sandboxes +- **Secure** - Isolated inside the sandbox environment diff --git a/docs/content/docs/computer-sdk/computer-server/meta.json b/docs/content/docs/computer-sdk/computer-server/meta.json new file mode 100644 index 00000000..40cccfd8 --- /dev/null +++ b/docs/content/docs/computer-sdk/computer-server/meta.json @@ -0,0 +1,4 @@ +{ + "title": "Computer Server", + "pages": ["index", "Commands", "REST-API", "WebSocket-API"] +} diff --git a/docs/content/docs/computer-sdk/computer-ui.mdx b/docs/content/docs/computer-sdk/computer-ui.mdx index a51ef60d..3e576f03 100644 --- a/docs/content/docs/computer-sdk/computer-ui.mdx +++ b/docs/content/docs/computer-sdk/computer-ui.mdx @@ -1,5 +1,5 @@ --- -title: Computer UI (Deprecated) +title: Computer UI --- diff --git a/docs/content/docs/computer-sdk/meta.json b/docs/content/docs/computer-sdk/meta.json index e3b9c7e6..83d06b59 100644 --- a/docs/content/docs/computer-sdk/meta.json +++ b/docs/content/docs/computer-sdk/meta.json @@ -7,6 +7,7 @@ "tracing-api", "sandboxed-python", "custom-computer-handlers", - "computer-ui" + "computer-ui", + "computer-server" ] } diff --git a/docs/content/docs/computer-sdk/sandboxed-python.mdx b/docs/content/docs/computer-sdk/sandboxed-python.mdx index bb1c1e9c..e66ad34c 100644 --- a/docs/content/docs/computer-sdk/sandboxed-python.mdx +++ b/docs/content/docs/computer-sdk/sandboxed-python.mdx @@ -4,14 +4,7 @@ slug: sandboxed-python --- - A corresponding{' '} - - Python example - {' '} - is available for this documentation. + A corresponding Python example is available for this documentation. 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. diff --git a/docs/content/docs/computer-sdk/tracing-api.mdx b/docs/content/docs/computer-sdk/tracing-api.mdx index 79b4b0a5..9595b144 100644 --- a/docs/content/docs/computer-sdk/tracing-api.mdx +++ b/docs/content/docs/computer-sdk/tracing-api.mdx @@ -1,9 +1,9 @@ --- -title: Computer Tracing API +title: Tracing description: Record computer interactions for debugging, training, and analysis --- -# Computer Tracing API +# Tracing The Computer tracing API provides a powerful way to record computer interactions for debugging, training, analysis, and compliance purposes. Inspired by Playwright's tracing functionality, it offers flexible recording options and standardized output formats. diff --git a/docs/content/docs/get-started/quickstart.mdx b/docs/content/docs/get-started/quickstart.mdx index 6f3deea8..86874f22 100644 --- a/docs/content/docs/get-started/quickstart.mdx +++ b/docs/content/docs/get-started/quickstart.mdx @@ -19,8 +19,6 @@ import { Code, Terminal } from 'lucide-react'; */} ---- - ## Set Up Your Computer Environment Choose how you want to run your Cua computer. This will be the environment where your automated tasks will execute. @@ -43,7 +41,7 @@ You can run your Cua computer in the cloud (recommended for easiest setup), loca **Option 1: Via Website** 1. Navigate to **Dashboard > Sandboxes > Create Sandbox** - 2. Create a **Small** sandbox, choosing **Linux**, **Windows**, or **macOS** + 2. Create a sandbox, choosing **Linux**, **Windows**, or **macOS** 3. Note your sandbox name **Option 2: Via CLI** diff --git a/docs/content/docs/index.mdx b/docs/content/docs/index.mdx index f475db7f..4c3de51f 100644 --- a/docs/content/docs/index.mdx +++ b/docs/content/docs/index.mdx @@ -4,55 +4,39 @@ title: Introduction import { Monitor, Code, BookOpen, Zap, Bot, Boxes, Rocket } from 'lucide-react'; -
- Cua is an open-source framework for building **Computer-Use Agents** - AI systems that see, - understand, and interact with desktop applications through vision and action, just like humans do. +
+ Cua + Cua +
Build AI agents that see, understand, and control any computer
-## Why Cua? +**Cua** ("koo-ah") is an open-source framework for Computer-Use Agents - enabling AI systems to autonomously operate computers through visual understanding and action execution. Used for research, evaluation, and production deployment of desktop, browser, and mobile automation agents. -Cua gives you everything you need to automate any desktop application without brittle selectors or APIs. +## What are Computer-Use Agents? -Some highlights include: +Computer-Use Agents (CUAs) are AI systems that can autonomously interact with computer interfaces through visual understanding and action execution. Unlike traditional automation tools that rely on brittle selectors or APIs, CUAs use vision-language models to perceive screen content and reason about interface interactions - enabling them to adapt to UI changes and handle complex, multi-step workflows across applications. -- **Model flexibility** - Connect to 100+ LLM providers through liteLLM's standard interface. Use models from Anthropic, OpenAI, Google, and more - or run them locally with Ollama, Hugging Face, or MLX. -- **Composed agents** - Mix and match grounding models with planning models for optimal performance. Use specialized models like GTA, OpenCUA, or OmniParser for UI element detection paired with powerful reasoning models like Claude or GPT-4. -- **Cross-platform sandboxes** - Run agents safely in isolated environments. Choose from Docker containers, macOS VMs with Lume, Windows Sandbox, or deploy to Cua Cloud with production-ready infrastructure. -- **Computer SDK** - Control any application with a PyAutoGUI-like API. Click, type, scroll, take screenshots, manage windows, read/write files - everything you need for desktop automation. -- **Agent SDK** - Build autonomous agents with trajectory tracing, prompt caching, cost tracking, and budget controls. Test agents on industry-standard benchmarks like OSWorld-Verified with one line of code. -- **Human-in-the-loop** - Pause agent execution and await user input or approval before continuing. Use the `human/human` model string to let humans control the agent directly. -- **Production essentials** - Ship reliable agents with built-in PII anonymization, cost tracking, trajectory logging, and integration with observability platforms like Laminar and HUD. +## Key Features -## What can you build? +With the **Computer SDK**, you can: +- Automate **Windows, Linux, and macOS** VMs with a consistent, pyautogui-like API +- Create & manage VMs locally or using **Cua Cloud** -- RPA automation that works with any application - even legacy software without APIs. -- Form-filling agents that handle complex multi-step web workflows. -- Testing automation that adapts to UI changes without brittle selectors. -- Data extraction from desktop applications and document processing. -- Cross-application workflows that combine multiple tools and services. -- Research agents that browse, read, and synthesize information from the web. +With the **Agent SDK**, you can: +- Run computer-use models with a consistent schema +- Benchmark on **OSWorld-Verified**, **SheetBench-V2**, and **ScreenSpot** +- Combine UI grounding models with any LLM using **composed agents** +- Use **100+ models** via API or local inference (Claude, GPT-4, Gemini, Ollama, MLX) -Explore real-world examples in our [blog posts](https://cua.ai/blog). +## Get Started -## Get started +Follow the [Quickstart guide](/get-started/quickstart) for step-by-step setup with Python or TypeScript. -Follow the [Quickstart guide](/docs/get-started/quickstart) for step-by-step setup with Python or TypeScript. +Check out our [tutorials](https://cua.ai/blog), [examples](https://github.com/trycua/cua/tree/main/examples), and [notebooks](https://github.com/trycua/cua/tree/main/notebooks) to start building with Cua today. -If you're new to computer-use agents, check out our [tutorials](https://cua.ai/blog), [examples](https://github.com/trycua/cua/tree/main/examples), and [notebooks](https://github.com/trycua/cua/tree/main/notebooks) to start building with Cua today. - -
- } href="/get-started/quickstart" title="Quickstart"> - Get up and running in 3 steps with Python or TypeScript. - - } href="/agent-sdk/agent-loops" title="Agent Loops"> - Learn how agents work and how to build your own. - - } href="/computer-sdk/computers" title="Computer SDK"> - Control desktop applications with the Computer SDK. - - } href="/example-usecases/form-filling" title="Example Use Cases"> - See Cua in action with real-world examples. - +
+ } href="/get-started/quickstart" title="Quickstart" /> + } href="/agent-sdk/agent-loops" title="Agent Loops" /> + } href="/computer-sdk/computers" title="Computer SDK" /> + } href="/example-usecases/form-filling" title="Examples" />
- -We can't wait to see what you build with Cua ✨ diff --git a/docs/content/docs/libraries/agent/index.mdx b/docs/content/docs/libraries/agent/index.mdx deleted file mode 100644 index 6772d5c8..00000000 --- a/docs/content/docs/libraries/agent/index.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Agent -description: Reference for the current version of the Agent library. -pypi: cua-agent -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 Cua Computers. - -## Agent Loops - -See the [Agent Loops](../agent-sdk/agent-loops) documentation for how agents process information and take actions. - -## Chat History - -See the [Chat History](../agent-sdk/chat-history) documentation for managing conversational context and turn-by-turn interactions. - -## Callbacks - -See the [Callbacks](../agent-sdk/callbacks) documentation for extending and customizing agent behavior with custom hooks. diff --git a/docs/content/docs/libraries/computer-server/index.mdx b/docs/content/docs/libraries/computer-server/index.mdx deleted file mode 100644 index d5affd25..00000000 --- a/docs/content/docs/libraries/computer-server/index.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Computer Server -descrption: Reference for the current version of the Computer Server library. -pypi: cua-computer-server -github: - - https://github.com/trycua/cua/tree/main/libs/python/computer-server ---- - - - A corresponding{' '} - - Jupyter Notebook - {' '} - is available for this documentation. - - -The Computer Server API reference documentation is currently under development. - -## Overview - -The Computer Server provides WebSocket and REST API endpoints for remote computer control and automation. diff --git a/docs/content/docs/libraries/computer/index.mdx b/docs/content/docs/libraries/computer/index.mdx deleted file mode 100644 index 69478b20..00000000 --- a/docs/content/docs/libraries/computer/index.mdx +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Computer -description: Reference for the current version of the Computer library. -pypi: cua-computer -npm: '@trycua/computer' -github: - - https://github.com/trycua/cua/tree/main/libs/python/computer - - https://github.com/trycua/cua/tree/main/libs/typescript/computer ---- - -The Computer library provides a Computer class for controlling and automating containers running the Computer Server. - -## Connecting to Computers - -See the [Cua Computers](../computer-sdk/computers) documentation for how to connect to different computer types (cloud, local, or host desktop). - -## Computer Commands - -See the [Commands](../computer-sdk/commands) documentation for all supported commands and interface methods (Shell, Mouse, Keyboard, File System, etc.). - -## Sandboxed Python Functions - -See the [Sandboxed Python](../computer-sdk/sandboxed-python) documentation for running Python functions securely in isolated environments on a remote Cua Computer. diff --git a/docs/content/docs/libraries/core/index.mdx b/docs/content/docs/libraries/core/index.mdx deleted file mode 100644 index 394c7547..00000000 --- a/docs/content/docs/libraries/core/index.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Core -description: Reference for the current version of the Core library. -pypi: cua-core -npm: '@trycua/core' -github: - - https://github.com/trycua/cua/tree/main/libs/python/core - - https://github.com/trycua/cua/tree/main/libs/typescript/core ---- - -## Overview - -The Core library provides foundational utilities and shared functionality across the CUA ecosystem. diff --git a/docs/content/docs/libraries/cua-cli/index.mdx b/docs/content/docs/libraries/cua-cli/index.mdx deleted file mode 100644 index 7a7ac914..00000000 --- a/docs/content/docs/libraries/cua-cli/index.mdx +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: Cua CLI -description: Command-line interface for managing Cua cloud sandboxes and authentication ---- - -import { Tabs, Tab } from 'fumadocs-ui/components/tabs'; - -The Cua CLI is a command-line tool that provides an intuitive interface for managing your Cua cloud sandboxes and authentication. It offers a streamlined workflow for creating, managing, and connecting to cloud sandboxes. - -## Key Features - -- **Authentication Management**: Secure login with browser-based OAuth flow -- **Sandbox Lifecycle**: Create, start, stop, restart, and delete cloud sandboxes -- **Quick Access**: Direct links to VNC and playground interfaces -- **Cross-Platform**: Works on macOS, Linux, and Windows -- **Environment Integration**: Automatic `.env` file generation - -## Quick Example - -```bash -# Install the CLI (installs Bun + CUA CLI) -curl -LsSf https://cua.ai/cli/install.sh | sh - -# Login to your CUA account -cua auth login - -# Create a new Linux sandbox -cua sb create --os linux --size small --region north-america - -# List your sandboxes -cua sb list -``` - -## Use Cases - -### Development Workflow - -- Quickly spin up cloud sandboxes for testing -- Manage multiple sandboxes across different regions -- Integrate with CI/CD pipelines - -### Team Collaboration - -- Share sandbox configurations and access -- Standardize development environments -- Quick onboarding for new team members - -### Automation - -- Script sandbox provisioning and management -- Integrate with deployment workflows -- Automate environment setup - -## Next Steps - -- [Install the CLI](/libraries/cua-cli/installation) -- [Learn about available commands](/libraries/cua-cli/commands) -- [Get started with the quickstart guide](/get-started/quickstart#cli-quickstart) diff --git a/docs/content/docs/libraries/cua-cli/installation.mdx b/docs/content/docs/libraries/cua-cli/installation.mdx deleted file mode 100644 index 9e08a7f0..00000000 --- a/docs/content/docs/libraries/cua-cli/installation.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Installation -description: Install the CUA CLI on your system ---- - -import { Tabs, Tab } from 'fumadocs-ui/components/tabs'; -import { Callout } from 'fumadocs-ui/components/callout'; - -## Quick Install - -The fastest way to install the CUA CLI is using our installation scripts: - - - ```bash curl -LsSf https://cua.ai/cli/install.sh | sh ``` - - ```powershell powershell -ExecutionPolicy ByPass -c "irm https://cua.ai/cli/install.ps1 | iex" - ``` - - - -These scripts will automatically: - -1. Install [Bun](https://bun.sh) (a fast JavaScript runtime) -2. Install the CUA CLI via `bun add -g @trycua/cli` - - - The installation scripts will automatically detect your system and install the appropriate binary - to your PATH. - - -## Alternative: Install with Bun - -You can also install the CLI directly using Bun: - -```bash -# Install Bun if you don't have it -curl -fsSL https://bun.sh/install | bash - -# Install CUA CLI -bun add -g @trycua/cli -``` - - - Using Bun provides faster installation and better performance compared to npm. If you don't have - Bun installed, the first command will install it for you. - - -## Verify Installation - -After installation, verify the CLI is working: - -```bash -cua --help -``` - -You should see the CLI help output with available commands. - -## First Time Setup - -After installation, you'll need to authenticate with your CUA account: - -```bash -# Login with browser-based OAuth flow -cua auth login - -# Or provide your API key directly -cua auth login --api-key sk-your-api-key-here -``` - -## Updating - -To update to the latest version: - - - - Re-run the installation script: ```bash # macOS/Linux curl -LsSf https://cua.ai/cli/install.sh | - sh # Windows powershell -ExecutionPolicy ByPass -c "irm https://cua.ai/cli/install.ps1 | iex" - ``` - - ```bash npm update -g @trycua/cli ``` - - -## Uninstalling - - - - Remove the binary from your PATH: ```bash # macOS/Linux rm $(which cua) # Windows # Remove from - your PATH or delete the executable ``` - - ```bash npm uninstall -g @trycua/cli ``` - - -## Troubleshooting - -### Command Not Found - -If you get a "command not found" error after installation: - -1. **Check your PATH**: Make sure the installation directory is in your PATH -2. **Restart your terminal**: Close and reopen your terminal/command prompt -3. **Manual PATH setup**: Add the installation directory to your PATH manually - -### Permission Issues - -If you encounter permission issues during installation: - - - - Try running with sudo (not recommended for the curl method): ```bash # If using npm sudo npm - install -g @trycua/cli ``` - - - Run PowerShell as Administrator: ```powershell # Right-click PowerShell and "Run as - Administrator" powershell -ExecutionPolicy ByPass -c "irm https://cua.ai/cli/install.ps1 | iex" - ``` - - - -### Network Issues - -If the installation script fails due to network issues: - -1. **Check your internet connection** -2. **Try the npm installation method instead** -3. **Check if your firewall is blocking the download** - -## Next Steps - -- [Learn about CLI commands](/libraries/cua-cli/commands) -- [Follow the quickstart guide](/get-started/quickstart#cli-quickstart) diff --git a/docs/content/docs/libraries/cua-cli/meta.json b/docs/content/docs/libraries/cua-cli/meta.json deleted file mode 100644 index f1c957cc..00000000 --- a/docs/content/docs/libraries/cua-cli/meta.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "CLI", - "description": "Command-line interface for CUA", - "pages": ["index", "installation", "commands"] -} diff --git a/docs/content/docs/libraries/mcp-server/index.mdx b/docs/content/docs/libraries/mcp-server/index.mdx deleted file mode 100644 index 7f2c7684..00000000 --- a/docs/content/docs/libraries/mcp-server/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: MCP Server -description: Reference for the current version of the MCP Server library. -pypi: cua-mcp-server -github: - - https://github.com/trycua/cua/tree/main/libs/python/mcp-server ---- - -**cua-mcp-server** is a MCP server for the Computer-Use Agent (CUA), allowing you to run CUA through Claude Desktop or other MCP clients. - -## Features - -- **Multi-Client Support**: Concurrent sessions with automatic resource management -- **Progress Reporting**: Real-time progress updates during task execution -- **Error Handling**: Robust error recovery with screenshot capture -- **Concurrent Execution**: Run multiple tasks in parallel for improved performance -- **Session Management**: Automatic cleanup and resource pooling -- **LiteLLM Integration**: Support for multiple model providers -- **VM Safety**: Default VM execution with optional host system control - -## Quick Start - -1. **Install**: `pip install cua-mcp-server` -2. **Configure**: Add to your MCP client configuration -3. **Use**: Ask Claude to perform computer tasks - -See the [Installation](/docs/libraries/mcp-server/installation) guide for detailed setup instructions. diff --git a/docs/content/docs/libraries/som/configuration.mdx b/docs/content/docs/libraries/som/configuration.mdx deleted file mode 100644 index b421fdae..00000000 --- a/docs/content/docs/libraries/som/configuration.mdx +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Configuration ---- - -### Detection Parameters - -#### Box Threshold (0.3) - -Controls the confidence threshold for accepting detections: - -Illustration of confidence thresholds in object detection, with a high-confidence detection accepted and a low-confidence detection rejected. -- Higher values (0.3) yield more precise but fewer detections - Lower values (0.01) catch more -potential icons but increase false positives - Default is 0.3 for optimal precision/recall balance - -#### IOU Threshold (0.1) - -Controls how overlapping detections are merged: - -Diagram showing Intersection over Union (IOU) with low overlap between two boxes kept separate and high overlap leading to merging. -- Lower values (0.1) more aggressively remove overlapping boxes - Higher values (0.5) allow more -overlapping detections - Default is 0.1 to handle densely packed UI elements - -### OCR Configuration - -- **Engine**: EasyOCR - - Primary choice for all platforms - - Fast initialization and processing - - Built-in English language support - - GPU acceleration when available - -- **Settings**: - - Timeout: 5 seconds - - Confidence threshold: 0.5 - - Paragraph mode: Disabled - - Language: English only - -## Performance - -### Hardware Acceleration - -#### MPS (Metal Performance Shaders) - -- Multi-scale detection (640px, 1280px, 1920px) -- Test-time augmentation enabled -- Half-precision (FP16) -- Average detection time: ~0.4s -- Best for production use when available - -#### CPU - -- Single-scale detection (1280px) -- Full-precision (FP32) -- Average detection time: ~1.3s -- Reliable fallback option - -### Example Output Structure - -``` -examples/output/ -├── {timestamp}_no_ocr/ -│ ├── annotated_images/ -│ │ └── screenshot_analyzed.png -│ ├── screen_details.txt -│ └── summary.json -└── {timestamp}_ocr/ - ├── annotated_images/ - │ └── screenshot_analyzed.png - ├── screen_details.txt - └── summary.json -``` diff --git a/docs/content/docs/libraries/som/index.mdx b/docs/content/docs/libraries/som/index.mdx deleted file mode 100644 index 3eef53f1..00000000 --- a/docs/content/docs/libraries/som/index.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Set-of-Mark -description: Reference for the current version of the Set-of-Mark library. -pypi: cua-som -github: - - https://github.com/trycua/cua/tree/main/libs/python/som ---- - - - A corresponding{' '} - - Python example - {' '} - is available for this documentation. - - -## Overview - -The SOM library provides visual element detection and interaction capabilities. It is based on the [Set-of-Mark](https://arxiv.org/abs/2310.11441) research paper and the [OmniParser](https://github.com/microsoft/OmniParser) model. - -## API Documentation - -### OmniParser Class - -```python -class OmniParser: - def __init__(self, device: str = "auto"): - """Initialize the parser with automatic device detection""" - - def parse( - self, - image: PIL.Image, - box_threshold: float = 0.3, - iou_threshold: float = 0.1, - use_ocr: bool = True, - ocr_engine: str = "easyocr" - ) -> ParseResult: - """Parse UI elements from an image""" -``` - -### ParseResult Object - -```python -@dataclass -class ParseResult: - elements: List[UIElement] # Detected elements - visualized_image: PIL.Image # Annotated image - processing_time: float # Time in seconds - - def to_dict(self) -> dict: - """Convert to JSON-serializable dictionary""" - - def filter_by_type(self, elem_type: str) -> List[UIElement]: - """Filter elements by type ('icon' or 'text')""" -``` - -### UIElement - -```python -class UIElement(BaseModel): - id: Optional[int] = Field(None) # Element ID (1-indexed) - type: Literal["icon", "text"] # Element type - bbox: BoundingBox # Bounding box coordinates { x1, y1, x2, y2 } - interactivity: bool = Field(default=False) # Whether the element is interactive - confidence: float = Field(default=1.0) # Detection confidence -``` diff --git a/docs/content/docs/libraries/lume/cli-reference.mdx b/docs/content/docs/macos-vm-cli-playbook/lume/cli-reference.mdx similarity index 100% rename from docs/content/docs/libraries/lume/cli-reference.mdx rename to docs/content/docs/macos-vm-cli-playbook/lume/cli-reference.mdx diff --git a/docs/content/docs/libraries/lume/faq.md b/docs/content/docs/macos-vm-cli-playbook/lume/faq.md similarity index 100% rename from docs/content/docs/libraries/lume/faq.md rename to docs/content/docs/macos-vm-cli-playbook/lume/faq.md diff --git a/docs/content/docs/libraries/lume/http-api.mdx b/docs/content/docs/macos-vm-cli-playbook/lume/http-api.mdx similarity index 100% rename from docs/content/docs/libraries/lume/http-api.mdx rename to docs/content/docs/macos-vm-cli-playbook/lume/http-api.mdx diff --git a/docs/content/docs/libraries/lume/index.mdx b/docs/content/docs/macos-vm-cli-playbook/lume/index.mdx similarity index 100% rename from docs/content/docs/libraries/lume/index.mdx rename to docs/content/docs/macos-vm-cli-playbook/lume/index.mdx diff --git a/docs/content/docs/libraries/lume/installation.mdx b/docs/content/docs/macos-vm-cli-playbook/lume/installation.mdx similarity index 100% rename from docs/content/docs/libraries/lume/installation.mdx rename to docs/content/docs/macos-vm-cli-playbook/lume/installation.mdx diff --git a/docs/content/docs/libraries/lume/meta.json b/docs/content/docs/macos-vm-cli-playbook/lume/meta.json similarity index 100% rename from docs/content/docs/libraries/lume/meta.json rename to docs/content/docs/macos-vm-cli-playbook/lume/meta.json diff --git a/docs/content/docs/libraries/lume/prebuilt-images.mdx b/docs/content/docs/macos-vm-cli-playbook/lume/prebuilt-images.mdx similarity index 100% rename from docs/content/docs/libraries/lume/prebuilt-images.mdx rename to docs/content/docs/macos-vm-cli-playbook/lume/prebuilt-images.mdx diff --git a/docs/content/docs/libraries/lumier/building-lumier.mdx b/docs/content/docs/macos-vm-cli-playbook/lumier/building-lumier.mdx similarity index 100% rename from docs/content/docs/libraries/lumier/building-lumier.mdx rename to docs/content/docs/macos-vm-cli-playbook/lumier/building-lumier.mdx diff --git a/docs/content/docs/libraries/lumier/docker-compose.mdx b/docs/content/docs/macos-vm-cli-playbook/lumier/docker-compose.mdx similarity index 100% rename from docs/content/docs/libraries/lumier/docker-compose.mdx rename to docs/content/docs/macos-vm-cli-playbook/lumier/docker-compose.mdx diff --git a/docs/content/docs/libraries/lumier/docker.mdx b/docs/content/docs/macos-vm-cli-playbook/lumier/docker.mdx similarity index 100% rename from docs/content/docs/libraries/lumier/docker.mdx rename to docs/content/docs/macos-vm-cli-playbook/lumier/docker.mdx diff --git a/docs/content/docs/libraries/lumier/index.mdx b/docs/content/docs/macos-vm-cli-playbook/lumier/index.mdx similarity index 100% rename from docs/content/docs/libraries/lumier/index.mdx rename to docs/content/docs/macos-vm-cli-playbook/lumier/index.mdx diff --git a/docs/content/docs/libraries/lumier/installation.mdx b/docs/content/docs/macos-vm-cli-playbook/lumier/installation.mdx similarity index 100% rename from docs/content/docs/libraries/lumier/installation.mdx rename to docs/content/docs/macos-vm-cli-playbook/lumier/installation.mdx diff --git a/docs/content/docs/libraries/lumier/meta.json b/docs/content/docs/macos-vm-cli-playbook/lumier/meta.json similarity index 100% rename from docs/content/docs/libraries/lumier/meta.json rename to docs/content/docs/macos-vm-cli-playbook/lumier/meta.json diff --git a/docs/content/docs/macos-vm-cli-playbook/meta.json b/docs/content/docs/macos-vm-cli-playbook/meta.json new file mode 100644 index 00000000..a9c98b66 --- /dev/null +++ b/docs/content/docs/macos-vm-cli-playbook/meta.json @@ -0,0 +1,5 @@ +{ + "title": "macOS VM CLI", + "description": "CLI tools for macOS virtualization", + "pages": ["lume", "lumier"] +} diff --git a/docs/content/docs/meta.json b/docs/content/docs/meta.json index 199556f1..ede65752 100644 --- a/docs/content/docs/meta.json +++ b/docs/content/docs/meta.json @@ -10,9 +10,11 @@ "...example-usecases", "---[BookCopy]Computer Playbook---", "...computer-sdk", - "---[BookCopy]Agent Playbook---", + "---[Bot]Agent Playbook---", "...agent-sdk", - "---[CodeXml]API Reference---", - "...libraries" + "---[Terminal]Cloud CLI Playbook---", + "...cli-playbook", + "---[Terminal]macOS VM CLI Playbook---", + "...macos-vm-cli-playbook" ] } diff --git a/docs/public/img/bg-dark.jpg b/docs/public/img/bg-dark.jpg new file mode 100644 index 00000000..c4f125d1 Binary files /dev/null and b/docs/public/img/bg-dark.jpg differ diff --git a/docs/public/img/bg-light.jpg b/docs/public/img/bg-light.jpg new file mode 100644 index 00000000..17f242fe Binary files /dev/null and b/docs/public/img/bg-light.jpg differ diff --git a/docs/src/app/global.css b/docs/src/app/global.css index 65ae0960..08522ff5 100644 --- a/docs/src/app/global.css +++ b/docs/src/app/global.css @@ -2,6 +2,32 @@ @import 'fumadocs-ui/css/neutral.css'; @import 'fumadocs-ui/css/preset.css'; +/* Custom Sky + Emerald theme */ +@theme { + --color-fd-primary: hsl(199, 89%, 48%); /* sky-500 */ + --color-fd-primary-foreground: hsl(0, 0%, 100%); + --color-fd-ring: hsl(199, 89%, 48%); /* sky-500 */ + --color-fd-muted: hsl(160, 84%, 95%); /* emerald-50 */ + --color-fd-accent: hsl(152, 76%, 92%); /* emerald-100 */ +} + +.dark { + --color-fd-primary: hsl(199, 89%, 48%); /* sky-500 */ + --color-fd-primary-foreground: hsl(0, 0%, 100%); + --color-fd-ring: hsl(199, 89%, 48%); /* sky-500 */ + --color-fd-muted: hsl(199, 89%, 14%); /* sky-950 */ + --color-fd-accent: hsl(199, 89%, 20%); /* sky dark */ +} + +.dark body { + background-image: linear-gradient( + rgba(14, 165, 233, 0.1), + transparent 20rem, + transparent + ); + background-repeat: no-repeat; +} + /* Fix TOC overflow on production builds */ #nd-toc { overflow-y: auto;