Agent Platform 中的 Agents CLI:从创建到生产,一栈式实现
Agents CLI in Agent Platform: create to production in one CLI
Google Cloud 推出 Agents CLI 工具,专为连接本地开发与生产级 AI 智能体部署而设计。该 CLI 为编码助手提供对完整 Google Cloud 技术栈的机器可读访问,显著减少脚手架过程中的上下文过载与 token 消耗。通过将评估、基础设施配置和部署流程整合至统一的程序化主干,开发者能够将项目从初始概念推进至实时服务的时间从数周缩短至数小时。
对用 Google Cloud 搭智能体的开发者,这个 CLI 把碎片化的本地到云端流程压进一条命令,能省掉大量翻文档的 token,值得试试。
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.
来源:Google Developers Blog(RSS) · developers.googleblog.com