MacOS 的 AI Agent 新星,当地沙盒驱动,解锁 macOS 操纵新体验!

[复制链接]
发表于 2025-10-1 21:08:52 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
随着 AI Agent 在 2025 年的发作式发展,macOS 用户也迎来了一个令人奋发的开源项目:Cua。


这款由 trycua 团队打造的盘算机利用署理框架,不光能在 macOS 上开启捏造机,还能让 AI 在此中操纵体系及应用,如欣赏器和 VS Code。它支持 OpenAI 和 Anthropic 的 CUA 模子,将来还将兼容 Ollama 当地模子。
Cua 是一个专为 macOS 计划的开源 AI Agent 框架,它基于 Apple 的 Virtualization.Framework,联合高性能捏造化与 AI 署理本领,允许用户在 Apple Silicon 上创建并运行 macOS 和 Linux 捏造机。


它的核心在于其“盘算机利用接口”(CUI)和署理支持,让 AI 能在隔离情况中操纵桌面应用。
无论是欣赏网页、编写代码,照旧实行复杂使命,Cua 都能让 AI 在 macOS 上如鱼得水。

核心功能


  •         • 高性能捏造化:在 Apple Silicon 上运行 macOS/Linux 捏造机,性能靠近原生(90%)。
  •         • AI 署理操纵:支持 AI 在捏造机中操纵 macOS 体系及应用(如欣赏器、VS Code)。
  •         • 安全隔离:全部操纵在沙盒化的捏造情况中运行,掩护主机体系。
  •         • 多应用支持:AI 可操控捏造机内的多种步调,实现复杂工作流。
  •         • 兼容多种大模子:如今支持 OpenAI、Anthropic CUA 模子,将来还将支持 Ollama 等当地大模子。
安装与利用

Cua 的安装和利用过程简朴,专为 macOS 用户优化。以下是具体步调:
1、安装 Lume(Cua 的捏造化根本)
  1. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)"
复制代码
2、安装cua相干的Python库
  1. pip install cua-computer cua-agent
复制代码
3、利用调用示例
  1. import logging
  2. from pathlib import Path
  3. from agent import ComputerAgent, LLM, AgentLoop
  4. computer = Computer(verbosity=logging.INFO)
  5. # Create agent with Anthropic loop and provider
  6. agent = ComputerAgent(
  7.         computer=computer,
  8.         loop=AgentLoop.OMNI,
  9.         model=LLM(provider=LLMProvider.ANTHROPIC, name="claude-3-7-sonnet-20250219"),
  10.         # model=LLM(provider=LLMProvider.OPENAI, name="gpt-4.5-preview"),
  11.         save_trajectory=True,
  12.         trajectory_dir=str(Path("trajectories")),
  13.         only_n_most_recent_images=3,
  14.         verbosity=logging.INFO
  15.     )
  16. tasks = [
  17.     "Look for a repository named trycua/cua on GitHub.",
  18.     "Check the open issues, open the most recent one and read it.",
  19.     "Clone the repository in users/lume/projects if it doesn't exist yet.",
  20.     "Open the repository with an app named Cursor (on the dock, black background and white cube icon).",
  21.     "From Cursor, open Composer if not already open.",
  22.     "Focus on the Composer text area, then write and submit a task to help resolve the GitHub issue.",
  23. ]
  24. for i, task in enumerate(tasks):
  25.     print(f"\nExecuting task {i}/{len(tasks)}: {task}")
  26.     async for result in agent.run(task):
  27.         # print(result)
  28.         pass
  29.     print(f"\n✅ Task {i+1}/{len(tasks)} completed: {task}")
复制代码
启动捏造机下令:
  1. lume run macos-sequoia-vanilla:latest
复制代码
更多用法和 Notebook 示例见 GitHub 文档,几分钟即可体验 AI 操纵 macOS 的爱好。
写在末了

Cua 让 AI 不再只是“谈天呆板人”,而是能直接动手操纵你的 Mac!具备当地捏造机隔离、性能良好、模子机动设置等长处,无论是开发、自动化办公、智能助手,都能极大提拔服从。
回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表