在 GitHub 中使用 DDP Device Streaming API Agent Skill,通过直观的自然语言提示预留和管理 Developer Device Platform 设备和会话。
Developer Device Platform 智能体技能可通过 Device Streaming API,使用 Developer Device Platform 中的远程设备进行智能体化编码。
准备工作
这些步骤假定您已创建 Google Cloud 项目,完成了 Developer Device Platform 快速入门指南中的设置步骤,并在终端中使用 gcloud 进行了身份验证。
前提条件
除了建立 Google Cloud 快速入门中所述的环境之外,还要为 Developer Device Platform 代理技能安装以下软件包:
ADB:用于在远程 Android 设备上运行命令
Antigravity 或任何其他支持智能体技能的 AI 编程智能体
用于安装 Node.js 的 Node 版本管理器
Node.js,用于使用
npx安装代理技能
设置 DDP 智能体技能
确认您已通过 Google Cloud CLI 进行身份验证,并配置有效的应用默认凭证 (ADC):
gcloud auth application-default login使用以下命令建立 Python 环境:
python3 -m venv .venv source .venv/bin/activate使用以下命令安装 Developer Device Platform 智能体技能:
npx skills add https://github.com/google/skills --skill developer-device-platform-basics
使用 DDP 智能体
developer-device-platform-basics 技能让智能体编码工具能够通过 Device Streaming API 预留和管理设备会话。以下是一些示例提示:
- 列出 DDP 中的可用设备
- 从 DDP 获取 Pixel 10
- 显示和控制设备
- 列出 DDP 上的活跃设备会话
- 将当前设备会话延长 30 分钟
- 停止设备会话