SuperAPI AI 工具集

first-run

智能体与模型

查看项目

更新于 10-16 05:00

技能介绍

用途:这是一个面向首次使用者的引导流程,带用户跑通 computer-use 演示,并在各阶段之间暂停确认,让用户理解每一步在做什么。

主要能力与步骤:

  1. 环境检查:确认虚拟环境已激活且依赖已安装,运行 python -c "import computer_use, playwright; print('ok')",失败则指向 README.md 的 Installation 部分并停止。确认 .env 存在且已设置 API key,但绝不读取或打印其内容,仅用 [ -f .env ] && grep -q '^ANTHROPIC_API_KEY=.' .env && echo 'API key: set' || echo 'API key: missing' 检查;缺失时复制 .env.example 为 .env,让用户自行在编辑器中粘贴密钥。随后非致命地运行 macOS 权限预检:python -c "from computer_use.preflight import check_and_warn; check_and_warn(require=False)"。
  2. 运行安全的纯浏览器任务:CU_ENABLE_COMPUTER_USE_TOOLS=false python -m computer_use "Navigate to https://en.wikipedia.org/wiki/Special:Random three times, take a screenshot each time, then summarize what you saw." 该任务只用无头浏览器工具,不会移动用户屏幕上的内容。
  3. 打开轨迹查看器:python -m streamlit run dev_ui/trajectory_viewer/app.py,在侧边栏选择最新运行,展开 System prompt 查看模型收到的内容,并逐轮查看内嵌截图。
  4. 后续可选:授予屏幕录制与辅助功能权限后运行桌面工具 python -m computer_use "open TextEdit and type hello world"(会移动真实鼠标键盘);或用 python -m uvicorn dev_ui.tool_panel.server:app --reload 手动调用各工具。

限制:API key 绝不能出现在对话或上下文中;桌面工具所需权限在首个任务中不需要。更深入内容见 README.md 的 Configuration 与 Effective caching and context pruning 部分。