AI 智能体正从实验性脚本转向生产级服务。然而,尽管模型越来越智能,构建、评估和部署它们所需的基础设施却依然支离破碎。开发者及其编码助手常常陷入孤立困境,为了弥合本地与云端之间的鸿沟,不得不耗费大量时间和模型 token 去消化海量的文档。
今天,我们激动地宣布在 Agent Platform 中推出 Agents CLI,这是 Google Cloud 上智能体开发生命周期(ADLC)的统一编程化核心工具。
Agents CLI 是一款专为 AI 编码智能体(如 Gemini CLI、Claude Code 和 Cursor)设计的专用工具。它为你的 AI 助手提供了一条直接、机器可读的通道,直连完整的 Google Cloud 智能体技术栈(包括 Agent Platform、Cloud Run 和 A2A 集成),将碎片化的生态系统转变为一条无缝的装配流水线。
让我们来看看 Agents CLI 如何将创意到生产的旅程从数周缩短到数小时。
用智能体构建智能体
智能体开发中最大的障碍是上下文过载。当你的编码智能体不得不猜测各种不同的云端组件如何组合在一起时,就会导致无尽的循环和模型 token 浪费。
借助 Agent Platform 中的 Agents CLI,你只需运行一条命令(`uvx google-agents-cli`),就能将打包好的技能直接注入你的编码环境。
这为编码助手提供了它们所需的精确感知输入和 API 参考,使其能够立即搭建出功能完备、符合标准的项目框架。
安装 CLI `uvx google-agents-cli setup`
安装 CLI `uvx google-agents-cli setup`
如果你愿意,也可以直接自己运行 CLI 命令。不过,你甚至可以通过 Agents CLI Skills,让你最喜欢的编码智能体来使用这些 CLI 命令。
例如,你可以向你的编码智能体发出提示词:“我想创建一个差旅费用智能体,它能帮我自动批准 50 美元以下的费用,并要求对超过 50 美元或任何看起来不正常的费用进行人工审批(HITL)。”
你的编码智能体会使用自动默认值无缝搭建项目框架:`agents-cli create finance-agent -y --deployment-target agent_runtime` # 进入项目目录 `cd finance-agent`
你的编程智能体使用自动默认值无缝搭建项目框架:`agents-cli create finance-agent -y --deployment-target agent_runtime`,然后进入目录:`cd finance-agent`。
本地模拟与严格评估
构建逻辑只是成功的一半,确保其行为正确则是另一半。在上线之前,开发者需要确认自己的智能体达到准确率阈值。
Agents CLI 可以运行严格的评估测试框架。通过使用原生命令,你的编程助手能够编排单元测试、验证数据检索,并对比不同的评估运行结果,从而保证质量。
针对你的真实数据集运行评估:`agents-cli eval run`,然后对比两次运行的轨迹评分与指标:`agents-cli eval compare evals/run_v1.json evals/run_v2.json`。
针对你的真实数据集运行评估:`agents-cli eval run`,然后对比两次运行的轨迹评分与指标:`agents-cli eval compare evals/run_v1.json evals/run_v2.json`。
无缝部署到生产环境
从本地原型到安全、全球分布的服务,不应该需要 70 天。Agents CLI 可以自动化整个部署阶段。它能无缝注入基础设施即代码(IaC)、搭建 CI/CD 流水线,并直接部署到 Agent Runtime / Cloud Run / GKE。
配置生产基础设施:`agents-cli infra single-project`,将智能体部署到 Google Cloud:`agents-cli deploy`,然后向 Gemini Enterprise 注册已部署的智能体以便分发:`agents-cli publish gemini-enterprise`。
配置生产基础设施:`agents-cli infra single-project`,将智能体部署到 Google Cloud:`agents-cli deploy`,然后向 Gemini Enterprise 注册已部署的智能体以便分发:`agents-cli publish gemini-enterprise`。
人类意图 + 智能体执行
虽然 Agents CLI 针对智能体消费(智能体模式)进行了优化,但我们知道开发者需要确定性的控制。因此,该 CLI 完全支持人类模式。你可以直接在终端或脚本中运行这些命令,实现即时、确定性的执行:随时介入,引导 AI 的“手和眼”。
下一步是什么?
立即开始使用:在 Agent Platform 中下载 Agents CLI,并在终端中运行 `uvx google-agents-cli`。查阅我们的文档和 GitHub 仓库,了解你的编程助手如何构建下一代生产级 AI。
AI agents are transitioning from experimental scripts to production services. But while models get smarter, the infrastructure required to build, evaluate, and deploy them remains stubbornly fragmented. Developers and their coding assistants often struggle with isolation, wasting time and tokens ingesting massive amounts of documentation just to bridge the local-to-cloud gap.
Today, we are thrilled to introduce Agents CLI in Agent Platform, the unified programmatic backbone for the Agent Development Lifecycle (ADLC) on Google Cloud.
Agents CLI is a specialized tool designed specifically for AI coding agents (like Gemini CLI, Claude Code, and Cursor). It gives your AI assistant a direct, machine-readable line to the full Google Cloud agent stack (including Agent Platform, Cloud Run, and A2A Integration) turning a fragmented ecosystem into a seamless assembly line.
Let’s take a look at how the Agents CLI streamlines the journey from idea to production in hours, not weeks.
Build Agents with Agents
The biggest hurdle in agent development is context overload. When your coding agent has to guess how disparate cloud components fit together, it leads to endless loops and token waste.
With Agents CLI in Agent Platform, you simply run one command (uvx google-agents-cli) to inject bundled skills directly into your coding environment.
This provides coding assistants the exact sensory input and API references they need to scaffold functional, standard-compliant projects immediately.
Installing the CLI uvx google-agents-cli setup
Installing the CLI uvx google-agents-cli setup
If you want to, you can run the CLI commands directly yourself. However, you can even use your favorite coding agent to use the CLI commands via Agents CLI Skills.
For example, you could prompt your coding agent: "I want to create a travel expense agent that can help me auto-approve expenses under $50 and require HITL to approve anything over $50, or any expense that might look out of the norm."
Your coding agent seamlessly scaffolds the project using automatic defaults agents-cli create finance-agent -y --deployment-target agent_runtime # Move into the directory cd finance-agent
Your coding agent seamlessly scaffolds the project using automatic defaults agents-cli create finance-agent -y --deployment-target agent_runtime # Move into the directory cd finance-agent
Local Simulation and Rigorous Evaluation
Building the logic is only half the battle, ensuring it behaves correctly is the other. Before going live, developers need to know their agents meet accuracy thresholds.
Agents CLI can run rigorous evaluation harnesses. By using native commands, your coding assistant can orchestrate unit tests, validate data retrieval, and contrast different evaluation runs to guarantee quality.
Run evaluations against your ground-truth datasets agents-cli eval run # Compare the trajectory scoring and metrics of two runs agents-cli eval compare evals/run_v1.json evals/run_v2.json
Run evaluations against your ground-truth datasets agents-cli eval run # Compare the trajectory scoring and metrics of two runs agents-cli eval compare evals/run_v1.json evals/run_v2.json
Seamless Deployment to Production
Going from a local prototype to a secure, globally distributed service shouldn't take 70 days. Agents CLI can automate the entire deployment phase. It seamlessly injects Infrastructure as Code (IaC), sets up CI/CD pipelines, and deploys directly to Agent Runtime / Cloud Run/ GKE.
Provision the production infrastructure agents-cli infra single-project # Ship the agent to Google Cloud agents-cli deploy # Register the deployed agent with Gemini Enterprise for distribution agents-cli publish gemini-enterprise
Provision the production infrastructure agents-cli infra single-project # Ship the agent to Google Cloud agents-cli deploy # Register the deployed agent with Gemini Enterprise for distribution agents-cli publish gemini-enterprise
Human Intent + Agent Execution
While the Agents CLI is optimized for agent consumption (Agent Mode), we know developers need deterministic control. That's why the CLI fully supports a Human Mode. You can run these commands directly in your terminal or scripts for immediate, deterministic execution: stepping in whenever you want to guide the "hands and eyes" of the AI.
What's Next?
Get started today by downloading Agents CLI in Agent Platform and running uvx google-agents-cli in your terminal. Dive into our Documentation and GitHub repository to see how your coding assistant can build the next generation of production-grade AI.