Cover image
Try Now
2025-04-15

在Apple Silicon上创建并运行高性能MACO和Linux VM,并对AI代理进行内置支持。

3 years

Works with Finder

25

Github Watches

117

Github Forks

4.1k

Github Stars

Cua logo

Python Swift macOS Discord

TL;DR: c/ua (pronounced "koo-ah", short for Computer-Use Agent) is a framework that enables AI agents to control full operating systems within high-performance, lightweight virtual containers. It delivers up to 97% native speed on Apple Silicon and works with any language models.

What is c/ua?

c/ua offers two primary capabilities in a single integrated framework:

  1. High-Performance Virtualization - Create and run macOS/Linux virtual machines on Apple Silicon with near-native performance (up to 97% of native speed) using the Lume CLI with Apple's Virtualization.Framework.

  2. Computer-Use Interface & Agent - A framework that allows AI systems to observe and control these virtual environments - interacting with applications, browsing the web, writing code, and performing complex workflows.

Why Use c/ua?

  • Security & Isolation: Run AI agents in fully isolated virtual environments instead of giving them access to your main system
  • Performance: Near-native performance on Apple Silicon
  • Flexibility: Run macOS or Linux environments with the same framework
  • Reproducibility: Create consistent, deterministic environments for AI agent workflows
  • LLM Integration: Built-in support for connecting to various LLM providers

System Requirements

  • Mac with Apple Silicon (M1/M2/M3/M4 series)
  • macOS 15 (Sequoia) or newer
  • Python 3.10+ (for Computer and Agent libraries)
  • Disk space for VM images (40GB+ recommended)

Quick Start

Option 1: Lume CLI Only (VM Management)

If you only need the virtualization capabilities:

sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"

For Lume usage instructions, refer to the Lume documentation.

Option 2: Full Computer-Use Agent Capabilities

If you want to use AI agents with virtualized environments:

  1. Install the Lume CLI:

    sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"
    
  2. Pull the latest macOS CUA image:

    lume pull macos-sequoia-cua:latest
    
  3. Start Lume daemon service:

    lume serve
    
  4. Install the Python libraries:

    pip install cua-computer cua-agent[all]
    
  5. Use the libraries in your Python code:

    from cua.computer import Computer
    from cua.agent import ComputerAgent, LLM, AgentLoop, LLMProvider
    
    async with Computer(verbosity=logging.DEBUG) as macos_computer:
      agent = ComputerAgent(
          computer=macos_computer,
          loop=AgentLoop.OPENAI, # or AgentLoop.ANTHROPIC, or AgentLoop.OMNI
          model=LLM(provider=LLMProvider.OPENAI) # or LLM(provider=LLMProvider.ANTHROPIC)
      )
    
      tasks = [
          "Look for a repository named trycua/cua on GitHub.",
      ]
    
      for task in tasks:
        async for result in agent.run(task):
          print(result)
    

    Explore the Agent Notebook for a ready-to-run example.

  6. Optionally, you can use the Agent with a Gradio UI:

    from utils import load_dotenv_files
    load_dotenv_files()
    
    from agent.ui.gradio.app import create_gradio_ui
    
    app = create_gradio_ui()
    app.launch(share=False)
    
  7. For Developers only (contribute and use latest features):

    # Clone the repository
    git clone https://github.com/trycua/cua.git
    cd cua
    
    # Open the project in VSCode
    code ./vscode/py.code-workspace
    
    # Build the project
    ./scripts/build.sh
    

    See our Developer-Guide for more information.

Monorepo Libraries

Library Description Installation Version
Lume CLI for running macOS/Linux VMs with near-native performance using Apple's Virtualization.Framework. Download GitHub release
Computer Computer-Use Interface (CUI) framework for interacting with macOS/Linux sandboxes pip install cua-computer PyPI
Agent Computer-Use Agent (CUA) framework for running agentic workflows in macOS/Linux dedicated sandboxes pip install cua-agent PyPI

Docs

For the best onboarding experience with the packages in this monorepo, we recommend starting with the Computer documentation to cover the core functionality of the Computer sandbox, then exploring the Agent documentation to understand Cua's AI agent capabilities, and finally working through the Notebook examples.

Demos

Demos of the Computer-Use Agent in action. Share your most impressive demos in Cua's Discord community!

MCP Server: Work with Claude Desktop and Tableau
AI-Gradio: multi-app workflow requiring browser, VS Code and terminal access
Notebook: Fix GitHub issue in Cursor

Accessory Libraries

Library Description Installation Version
Core Core functionality and utilities used by other Cua packages pip install cua-core PyPI
PyLume Python bindings for Lume pip install pylume PyPI
Computer Server Server component for the Computer-Use Interface (CUI) framework pip install cua-computer-server PyPI
SOM Self-of-Mark library for Agent pip install cua-som PyPI

Contributing

We welcome and greatly appreciate contributions to Cua! Whether you're improving documentation, adding new features, fixing bugs, or adding new VM images, your efforts help make lume better for everyone. For detailed instructions on how to contribute, please refer to our Contributing Guidelines.

Join our Discord community to discuss ideas or get assistance.

License

Cua is open-sourced under the MIT License - see the LICENSE file for details.

Microsoft's OmniParser, which is used in this project, is licensed under the Creative Commons Attribution 4.0 International License (CC-BY-4.0) - see the OmniParser LICENSE file for details.

Trademarks

Apple, macOS, and Apple Silicon are trademarks of Apple Inc. Ubuntu and Canonical are registered trademarks of Canonical Ltd. Microsoft is a registered trademark of Microsoft Corporation. This project is not affiliated with, endorsed by, or sponsored by Apple Inc., Canonical Ltd., or Microsoft Corporation.

Stargazers over time

Stargazers over time

Contributors

f-trycua
f-trycua

💻
Pedro Piñera Buendía
Pedro Piñera Buendía

💻
Amit Kumar
Amit Kumar

💻
Dung Duc Huynh (Kaka)
Dung Duc Huynh (Kaka)

💻
Zayd Krunz
Zayd Krunz

💻
Prashant Raj
Prashant Raj

💻
Leland Takamine
Leland Takamine

💻
ddupont
ddupont

💻
Ethan Gutierrez
Ethan Gutierrez

💻
Ricter Zheng
Ricter Zheng

💻
Rahul Karajgikar
Rahul Karajgikar

💻

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • https://reddgr.com
  • Delivers concise Python code and interprets non-English comments

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • GeyserMC
  • 与Minecraft客户端/服务器通信的库。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • awslabs
  • AWS MCP服务器 - 将AWS最佳实践直接带入您的开发工作流程的专门MCP服务器

  • modelcontextprotocol
  • 模型上下文协议服务器

    Reviews

    2 (1)
    Avatar
    user_1fStxaJb
    2025-04-17

    As a dedicated MCP application user, I find Cua to be an absolute game-changer. Developed by trycua, this innovative tool is available on GitHub at https://github.com/trycua/cua/tree/main/libs/mcp-server. Its efficient design and seamless integration make it indispensable for any serious MCP user. Highly recommended!