AI Agent Rising Star for MacOS, local sandbox driver, unlocks new macOS operating experience!

Written by
Caleb Hayes
Updated on:July-01st-2025
Recommendation

AI Agent Cua brings revolutionary changes to macOS operating experience.

Core content:
1. Cua framework: Enable AI operating system and applications on macOS
2. Core functions: high-performance virtualization, AI agent operation, and security isolation
3. Installation and use: Detailed steps optimized for macOS users

Yang Fangxian
Founder of 53AI/Most Valuable Expert of Tencent Cloud (TVP)

 

With the explosive development of AI Agent in 2025, macOS users also ushered in an exciting open source project: Cua .

This computer built by the trycua team uses a proxy framework that not only enables virtual machines on macOS, but also allows AI to operate operating systems and applications such as browsers and VS Code. It supports CUA models from OpenAI and Anthropic, and will be compatible with Ollama local models in the future.

Cua  is an open source AI Agent framework designed specifically for macOS. It is based on Apple's Virtualization.Framework and combines high-performance virtualization with AI agent capabilities, allowing users to create and run macOS and Linux virtual machines on Apple Silicon.

At its core lies its Computer User Interface (CUI) and agent support, which allow AI to operate desktop applications in an isolated environment.

Whether browsing the web, writing code, or performing complex tasks, Cua makes AI work like a duck to water on macOS.

Core Features

  • •  High-performance virtualization : Run macOS/Linux virtual machines on Apple Silicon with near-native performance (90%).
  • •  AI agent operation : supports AI to operate macOS system and applications (such as browsers and VS Code) in virtual machines.
  • •  Secure isolation : All operations are run in a sandboxed virtual environment to protect the host system.
  • •  Multi-application support : AI can control multiple programs within a virtual machine to achieve complex workflows.
  • •  Compatible with multiple large models : Currently supports OpenAI and Anthropic CUA models, and will also support local large models such as Ollama in the future.

Installation and Usage

Cua's installation and usage process is simple and optimized for macOS users. Here are the detailed steps:

1. Install Lume (the virtualization foundation of Cua)

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

2. Install cua related Python libraries

pip install cua-computer cua-agent

3. Usage call example

import logging
from pathlib import Path
from agent import ComputerAgent, LLM, AgentLoop

computer = Computer(verbosity=logging.INFO)

# Create agent with Anthropic loop and provider
agent = ComputerAgent(
        computer=computer,
        loop=AgentLoop.OMNI,
        model=LLM(provider=LLMProvider.ANTHROPIC, name= "claude-3-7-sonnet-20250219" ),
        # model=LLM(provider=LLMProvider.OPENAI, name="gpt-4.5-preview"),
        save_trajectory=True,
        trajectory_dir=str(Path( "trajectories" )),
        only_n_most_recent_images=3,
        verbosity=logging.INFO
    )

tasks = [
    "Look for a repository named trycua/cua on GitHub." ,
    "Check the open issues, open the most recent one and read it." ,
    "Clone the repository in users/lume/projects if it doesn't exist yet." ,
    "Open the repository with an app named Cursor (on the dock, black background and white cube icon)." ,
    "From Cursor, open Composer if not already open." ,
    "Focus on the Composer text area, then write and submit a task to help resolve the GitHub issue." ,
]

for  i, task  in  enumerate(tasks):
    print (f "\nExecuting task {i}/{len(tasks)}: {task}" )
    async  for  result  in  agent.run(task):
        # print(result)
        pass

    print (f "\n✅ Task {i+1}/{len(tasks)} completed: {task}" )

Start the virtual machine command:

lume run macos-sequoia-vanilla:latest

For more usage and Notebook examples, see the GitHub documentation. You can experience the fun of AI operating macOS in a few minutes.