agents-cli

googleApache-2.0活跃维护

把任意编码助手变成 Google Cloud 上的 AI Agent 专家,提供命令行工具和技能,覆盖 Agent 的创建、评估与部署全流程。

The CLI and skills that turn any coding assistant into an expert at creating, evaluating, and deploying AI agents on Google Cloud.

v1.13.0发布于 2026-11-04 16:19 UTC6,330star +15 / 7 天731fork同步于 2026-11-10 11:34 UTC

怎么上手

由 README 提炼,执行前请确认
uvx google-agents-cli setup
硬件要求按 README 说明

README 未说明显存或 GPU 要求;本地开发需 Python 3.11+、uv 和 Node.js,可用 AI Studio API Key 在本地运行 Gemini,部署与云功能需 Google Cloud 项目。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

给编码助手装上技能和命令,端到端构建、评估并部署 Google Cloud 上的 ADK 智能体

把任意编码助手变成 Google Cloud 上的 AI Agent 专家,提供命令行工具和技能,覆盖 Agent 的创建、评估与部署全流程。

核心能力

  • 通过 skills 让 Claude Code、Codex 等编码助手掌握 ADK 开发流程
  • 用 agents-cli create 一键生成 adk_python 模板项目
  • eval 子命令覆盖推理、打分、合成数据集与失败聚类
  • 支持部署到 Agent Runtime、Cloud Run、GKE 并配置 CI/CD
  • 可独立于编码助手在终端直接运行全部命令

容易踩的坑

需先装好 Python 3.11+、uv 和 Node.js 三个前置依赖;本地跑 Gemini 要自备 AI Studio API Key,部署则需 Google Cloud 账号与项目;默认会向自身 GCP 项目写遥测日志,可用 AGENTS_CLI_TELEMETRY=0 或 DO_NOT_TRACK=1 关闭。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.13.0
  1. v1.13.0Release v1.13.0最新正式版2026-11-04 · 2026-11-04 16:19 UTC

    Release v1.13.0

    • Cloud Run deployments support Agent Identity.
      • agents-cli deploy --agent-identity deploys a Cloud Run service with Agent Identity.
      • New projects default using Agent Identity for Cloud Run deployments. To migrate an old project so that it uses Agent Identity, run agents-cli scaffold enhance with --cloud-run-identity-type agent_identity.
      • To create a new project that uses a service account instead, run agents-cli scaffold create with --cloud-run-identity-type service_account.
    • agents-cli eval run and agents-cli eval grade end with a RESULT: PASS or RESULT: FAIL (...) line, preceded on failure by the metrics and cases that failed and a next step.
      • Set a minimum mean score per metric with a thresholds: map in the eval config, or for one run with --fail-under METRIC=SCORE (repeatable, one metric each). A missed threshold exits 1. pass_rate in the results is filled from the threshold when the eval service doesn't report one.
      • Breaking: a run where any case errored now exits 1, even without thresholds. If the errors are rate limits, lower --qps.
    • agents-cli login signs in both the gcloud CLI and Application Default Credentials (gcloud auth login --update-adc), so commands that run gcloud work right after login.
      • When only Application Default Credentials are available and gcloud has no credentials of its own, agents-cli passes an ADC access token to the gcloud commands it runs. GKE deploys in that setup are not covered yet.
      • Note: the account you sign in with also becomes gcloud's active account.
    • New projects record create_params.app_name in agents-cli-manifest.yaml: the name the server serves the agent under (/apps/{app_name}/...). run, eval, playground, deploy and publish use it; projects without it keep using the basename of agent_directory.
      • eval generate --app-name and eval run --app-name default to the project's app name instead of app.
    • agents-cli deploy --image <artifact-registry-uri> works for Agent Runtime. The Agent Runtime service agent needs roles/artifactregistry.reader on the repository. --build-args can't be combined with --image, and an existing agent can't switch between a source build and --image.
    • Agent Runtime deploys of A2A agents register the agent card in Agent Registry, so the agent shows up as A2A-capable in Gemini Enterprise.
    • agents-cli deploy --dry-run also validates a GKE deployment against Google Cloud.
    • agents-cli extension add <name> pins a first-party extension to the latest release compatible with your agents-cli instead of main. Pass --ref main to track main.
      • agents-cli extension update --to <ref|:latest> moves a pin. First-party extensions installed from main move to the latest release on their next update.
    • agents-cli extension add langchain and agents-cli extension add claude install instead of failing with "has no agents-cli-extension.yaml".
    • agents-cli extension add installs extensions from agents-cli pre-approved repositories without a trust prompt, whether given as a shorthand, an org/repo reference or a URL.
    • Usage telemetry names an extension when it serves a command if the extension comes from Google.
    • Extensions can share files through symlinks that stay inside their repository. These links are copied as regular files when the extension is vendored and when its skills are installed.
    • A project, template, or deployment metadata that declares a language this version of agents-cli doesn't support fails with an error listing the supported languages and suggesting uv tool upgrade google-agents-cli, instead of being treated as Python.
    • agents-cli scaffold enhance . in a project without a manifest records the base template it rendered (adk_python, adk_go), so later enhance and upgrade runs work. Before, they failed with "Base template 'local_' not found". In projects already
  2. v1.12.0Release v1.12.02026-10-27 · 2026-10-27 10:30 UTC
    查看更新说明

    Release v1.12.0

    • ADK Go is now Generally Available. The adk_go template is out of Preview: it is stable, production-ready and supported on the same terms as adk_python. This release also brings:
      • agents-cli create --agent <template> supports ADK Go v2 templates whose manifest.yaml declares language: go. Templates built for other ADK Go versions are rejected. A declared language that contradicts the base template (or --base-template) fails with an error explaining how to fix it.
      • The server e2e tests in new ADK Go projects time out after 120s instead of 60s, so multi-step agents no longer time out.
    • The Python agent template is now adk_python, selected with --agent adk_python (or -a adk_python). adk still works as an alias. New projects record adk_python in agents-cli-manifest.yaml, and upgrading a project recorded as adk records adk_python too. Enhancing or upgrading these projects requires this CLI version or newer.
    • New experimental Claude Agent SDK extension. Create a project with agents-cli scaffold create --agent google/agents-cli/extensions/claude/template@<version>, or migrate an existing agent with scaffold enhance and that template. It deploys to Agent Runtime or Cloud Run over A2A, calls Claude on Gemini platform only, and comes with Cloud Trace, Cloud Logging, Cloud Monitoring, optional BigQuery Agent Analytics and Cloud SQL sessions. playground, eval dataset synthesize and eval optimize aren't supported, and publish gemini is refused on Agent Runtime.
      • On Agent Runtime, these agents also serve :query (async_create_session) and :streamQuery (async_stream_query), so an ingress Agent Gateway can govern them (for example with Model Armor) and agents-cli run --mode adk works.
    • The agent template directory can be a nested folder, such as src/my_agent, both in remote templates and with --agent-directory.
    • agents-cli scaffold enhance <template> on a project agents-cli didn't create writes the template's files as create would, and moves each of your files it replaces (such as pyproject.toml, README.md, Dockerfile, .env) to .agents-cli-original/, keeping its path. Your other files stay where they are. Port what you need from the folder, then delete it; enhance won't run again while it exists. New projects' .gitignore and .gcloudignore exclude the folder.
    • Extension templates can set settings.session_types, so create offers and accepts only those session types, with the first as the default. A template whose list is empty or names an unknown session type is rejected.
    • agents-cli scaffold enhance --dry-run exits with code 2 (was 0) when combined with --force, when run with -y and no override flags, or when run without a saved agents-cli-manifest.yaml.
    • Cloud Run projects run their Cloud Run service on the hashicorp/google-beta provider, pinned to ~> 8.7. Other resources keep hashicorp/google ~> 7.28. Existing projects pick it up through agents-cli scaffold upgrade; if terraform init then reports a locked google-beta older than 8.7, run terraform init -upgrade once.
    • The server e2e tests in new Python projects time out after 120s instead of 60s, so multi-step agents no longer time out.
    • agents-cli deploy --dry-run for Agent Runtime prints the plan even when a check fails. It still exits with code 1.
    • agents-cli deploy --dry-run for Agent Runtime warns that it could not verify the secrets when the Secret Manager API is disabled, instead of skipping the check silently.
    • agents-cli deploy --dry-run also validates a Cloud Run deployment against Google Cloud.
    • A malformed --env-vars, --secrets or --labels value fails before the project prompt.
    • A failed agents-cli publish gemini reports the API's reason (for example a SERVICE_DISABLED message with the enable link) instead of a bare HTTP error.
    • A failed terraform step in agents-cli infra exits with a short error naming the step and ho
  3. v1.11.0Release v1.11.02026-10-20 · 2026-10-20 13:03 UTC
    查看更新说明

    Release v1.11.0

    • Breaking: The adk@<name> shortcut has been removed. Pass the recipe's GitHub URL to agents-cli create instead, and browse recipes at https://github.com/google/adk-recipes.
      • The scaffold's "Browse ADK recipes" option lists recipes from both core/python/ and contrib/python/ in google/adk-recipes.
      • Projects created with adk@ still upgrade. Their base_template is rewritten to the recipe URL on the first applied change.
    • New projects use google-adk>=2.12.0 and google-cloud-aiplatform>=2.2,<3. Agent Runtime projects also depend on google-cloud-agentplatform, and the LangChain extension template moves to google-cloud-aiplatform>=2.2,<3.
    • agents-cli deploy to Agent Runtime registers the ADK artifact methods (async_save_artifact, async_load_artifact, and others).
    • agents-cli deploy to Agent Runtime shows the last 40 lines of the build log when a build fails, instead of only "Build failed". deploy --status shows it too.
    • agents-cli's uv commands use public PyPI even when a machine-wide uv config points at a mirror, so deploy no longer breaks. agents-cli install warns when uv.lock uses a mirror and shows the command to re-lock. install --locked now fails on such a lock. Scripts and CI jobs that run install --locked may need an update.
    • agents-cli create finds the agent code in any remote template, not only adk-recipes ones. When both app/ and a folder-named package exist, app/ wins; use --agent-directory to pick the other. A top-level agent_directory in a template's agents-cli-manifest.yaml is now respected.
    • LangChain agents are now named after your project, or the name you pass with --root-agent-name, like ADK agents.
      • Template authors can list files under render_files in .template/templateconfig.yaml. Placeholders such as the agent name are then filled in in those files when a project is created.
    • Traces from LangChain agents now record which conversation each request belongs to (gen_ai.conversation.id), so you can follow a conversation across requests, as you already can for ADK agents.
    • agents-cli run --mode a2a shows why an agent's task failed, was rejected or was canceled ([error]: <reason>) instead of "(no response content)".
    • ADK Go agents no longer lose replies for turns that take longer than 15 seconds on /run or A2A.
    • The Cloud Build pipelines and Dockerfile in generated ADK Go projects retry Go module downloads, so a dropped connection to the Go module proxy no longer fails the build.
    • ADK Go projects include only the session backend chosen at creation time.
    • agents-cli scaffold upgrade stops instead of reporting success when it cannot build the template of the project's original version. It shows why, and suggests --force when that can help.
    • agents-cli scaffold upgrade no longer warns about a legacy eval file that an earlier, stopped upgrade already migrated.
    • agents-cli setup --workspace lists each installed skill's folder once.
    • Extensions can no longer override agents-cli info, login, setup or update.
    • agents-cli --help, the docs and error hints show create commands that work as written: -i to choose options in prompts, -y to accept the defaults (adk template, agent_runtime target).
    • Warnings print as ⚠️ Warning: <message> with a yellow prefix on stderr. Some warnings that used to go to stdout now go to stderr. Scripts that read warnings from stdout may need an update.
    • Errors that agents-cli logs print with the same red ❌ Error: prefix as other errors, and --debug output prints as dim Debug: … lines.
    • agents-cli no longer prints the google-auth quota-project warning or google-genai's automatic function calling advice. eval run no longer prints "Could not obtain credentials" when it talks to the local agent server.
  4. v1.10.0Release v1.10.02026-10-12 · 2026-10-12 19:47 UTC
    查看更新说明

    Release v1.10.0

    • New projects use Agent Identity by default. agents-cli scaffold create records agent_runtime_identity_default: agent_identity. Then agents-cli deploy creates the Agent Runtime agent under its own Agent Identity principal, and the generated Terraform (infra single-project, infra cicd) does the same. To keep a service account, pass --agent-runtime-identity-default service_account to scaffold create or scaffold enhance. Existing projects are not changed: if the setting is missing, it reads as service_account, and scaffold upgrade does not migrate it.
      • deploy uses this default only when it creates a new agent. A redeploy without --agent-identity or --no-agent-identity does not change the identity of an existing agent.
    • Extensions can ship skills. An extension declares skills in the skills: field of agents-cli-extension.yaml:
      • agents-cli extension add copies them to <project>/.agents/skills/, or to ~/.agents/skills/ with --global.
      • agents-cli extension update replaces them with the new version's skills and lists the skills it removed.
      • agents-cli extension remove deletes them. The new --global flag removes the user-scope install.
      • agents-cli install restores the skills of every recorded extension.
      • A skill folder copied by an extension is managed by that extension, and manual modifications to it might be overwritten.
    • agents-cli extension update keeps the old local copy when it refuses a new version or a copy fails.
    • New agents-cli deploy flags for Agent Runtime and Cloud Run: --remove-labels KEY,... and --clear-labels. New aliases that match gcloud run deploy: --update-labels, --update-secrets and --env-vars.
    • agents-cli deploy now rejects --iap, --port, --service-account and --cluster-name on targets that ignored them. Before, they were silently ignored. Scripts that pass them may need an update.
    • agents-cli run fails with Agent run failed: <reason> and a non-zero exit code when the ADK stream sends an error. Before, the run looked successful.
    • agents-cli scaffold create shows the dependency changes, like enhance and upgrade do.
    • agents-cli scaffold create keeps the detected project in .env when credential checks fail, instead of writing the your-gcp-project-id placeholder. It also warns when --session-type is ignored for --deployment-target none.
    • agents-cli scaffold enhance creates missing config and dependency files instead of skipping them.
    • Values in agents-cli-manifest.yaml are now escaped, so a quote or newline in a value no longer breaks the file. Project names are limited to a-z, 0-9 and -.
    • Terminology has been adjusted in various places to use appropriate names for the Gemini ecosystem. No functional change, as old variants are kept as aliases where applicable.
    • The CLI now uses google-cloud-aiplatform 2.x, and gcsfs is pinned to >=2026.10.0. The template lock files are updated.
    • The bundled skills list the Ambient Quality Agent (AQuA) recipe.
  5. v1.9.0Release v1.9.02026-10-06 · 2026-10-06 14:08 UTC
    查看更新说明

    Release v1.9.0

    • Usage telemetry is now on by default. Each command writes one log entry to your own Google Cloud project with the command name, exit code, error class, duration, and CLI, Python and OS versions, never arguments or file contents. Its purpose is to provide users with analytics regarding their tool use, process efficiency, and help diagnose potential issues. The request also sends Google the CLI, Python and OS versions, CPU architecture and command name for usage analytics; no sensitive data is sent. Opt out with AGENTS_CLI_TELEMETRY=0 or DO_NOT_TRACK=1. agents-cli info now always shows whether telemetry is on.
    • agents-cli deploy --key encrypts an Agent Runtime agent with a customer-managed Cloud KMS key (CMEK), so deploys work in projects that enforce constraints/gcp.restrictNonCmekServices. The key can only be set when the agent is created, and deploy --list shows it in a new Encryption column.
    • agents-cli deploy --dry-run checks an Agent Runtime deployment against Google Cloud: enabled APIs, the target engine, IAM permissions, actAs on the service account, and secrets. A definite problem exits with code 1, and a check that cannot run only warns. A dry run now makes read-only network calls. A real deploy is unchanged.
    • agents-cli deploy reports unsupported flags in one format, <flag> is only supported for <targets> deployments (current target: <target>), and names only the flags you passed. An empty value for such a flag, such as --key "" on Cloud Run, is now rejected instead of ignored. Scripts that match the old error text may need updating.
    • New ADK Python projects set GOOGLE_GENAI_USE_ENTERPRISE=true instead of the deprecated GOOGLE_GENAI_USE_VERTEXAI. Existing projects keep working: agents-cli deploy to Agent Runtime respects whichever name your .env sets. Go projects keep the old name.
    • New ADK Go projects enable the gofmt and goimports formatters, so agents-cli lint reports formatting issues and lint --fix fixes them.
    • Re-applying the Terraform generated by this release, for example with agents-cli infra single-project or infra cicd, no longer replaces the BigQuery log sink tables once logs have arrived. The replacement deleted every exported log. completions_view also gains a service_version column with the deployment revision. Run agents-cli scaffold upgrade to get this in an existing project.
    • Scaffolded ADK projects no longer append a duplicate JSONRPC 0.3 interface to the agent card on every request to .well-known/agent-card.json.
    • A tool that exists but cannot run, such as uv.exe blocked by AppLocker on Windows, now fails with a clear error naming the tool and the OS reason instead of a PermissionError traceback.
    • Installed extensions no longer print a warning on every command. A notice appears only when a command overridden by an extension runs.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Turn your favorite coding assistant into an expert at building and deploying agents on Google Cloud.

    Agents CLI in Gemini platform (agents-cli) gives your coding agent the skills and commands to build, scale, govern, and optimize enterprise-grade agents — so you don't have to learn every CLI and service yourself.

    Works seamlessly with: Antigravity CLI  •  Claude Code  •  Codex  •  and any other coding agent.

    Get Started

    Prerequisites: Python 3.11+, uv, and Node.js.

    1. Install

    uvx google-agents-cli setup
    
    npx skills add google/agents-cli
    

    2. Open your coding agent

    Launch Antigravity CLI, Claude Code, Codex, or any coding agent you prefer.

    3. Build your first agent

    Ask your coding agent to build something — e.g. "Use agents-cli to build a caveman-style agent that compresses verbose text into terse, technical grunts"

    See the full tutorial for a step-by-step walkthrough.

    Browse the full documentation →


    Agent Skills

    SkillWhat your coding agent learns
    google-agents-cli-workflowDevelopment lifecycle, code preservation rules, model selection
    google-agents-cli-adk-codeADK Python API — agents, tools, orchestration, callbacks, state
    google-agents-cli-scaffoldProject scaffolding — create, enhance, upgrade
    google-agents-cli-evalEvaluation methodology — metrics, datasets, LLM-as-judge, adaptive rubrics
    google-agents-cli-deployDeployment — Agent Runtime in Gemini platform, Cloud Run, GKE, CI/CD, secrets
    google-agents-cli-publishGemini registration
    google-agents-cli-observabilityObservability — Cloud Trace, logging, third-party integrations

    CLI Commands

    CommandWhat it does
    agents-cli setupInstall CLI + skills to coding agents
    agents-cli create <name> -yCreate a new agent project with defaults (adk_python template, agent_runtime target)
    agents-cli eval runRun the agent over the eval dataset and grade the traces
    agents-cli deployDeploy to Google Cloud
    agents-cli publish geminiRegister with Gemini
    CommandDescription
    agents-cli loginAuthenticate with Google Cloud or AI Studio
    agents-cli login --statusShow authentication status
    Scaffold
    agents-cli create <name> -yCreate a new agent project with defaults (adk_python template, agent_runtime target)
    agents-cli scaffold enhanceAdd deployment or CI/CD to an existing project
    agents-cli scaffold upgradeUpgrade project to a newer agents-cli version
    Develop
    agents-cli run "prompt"Run agent with a single prompt
    agents-cli installInstall project dependencies
    agents-cli lintRun code quality checks (Ruff)
    Evaluate
    agents-cli eval runRun agent inference and grade the traces
    agents-cli eval generateRun agent inference over eval cases
    agents-cli eval gradeGrade generated traces against metrics
    agents-cli eval dataset synthesizeSynthesize multi-turn eval scenarios for your local agent
    agents-cli eval compareCompare two eval result files
    agents-cli eval analyzeCluster failure modes from grade results
    agents-cli eval metric listList available metrics
    agents-cli eval optimizeAuto-tune agent prompts using eval data
    Deploy & Publish
    agents-cli deployDeploy to Google Cloud
    agents-cli publish geminiRegister with Gemini
    agents-cli infra single-projectProvision single-project infrastructure
    agents-cli infra cicdSet up CI/CD pipeline + staging/prod infrastructure
    Other
    agents-cli infoShow project config and CLI version
    agents-cli updateForce reinstall skills to all IDEs

    How it works


    Architecture

    The Google Cloud agent stack that agents-cli builds on:

    Architecture

    FAQ

    Is this an alternative to Antigravity CLI, Claude Code, or Codex? No. agents-cli is a tool for coding agents, not a coding agent itself. It provides the CLI commands and skills that make your coding agent better at building, evaluating, and deploying ADK agents on Google Cloud.

    How is this different from just using adk directly? ADK is an agent framework. agents-cli gives your coding agent the skills and tools to build, evaluate, and deploy ADK agents end-to-end.

    Do I need Google Cloud? For local development (create, run, eval), no — you can use an AI Studio API key to run Gemini with ADK locally. For deployment and cloud features, yes.

    Can I use this with an existing agent project? Yes. agents-cli scaffold enhance adds deployment and CI/CD to existing projects.

    Can I use agents-cli without a coding agent? Yes. The CLI works standalone — you can run agents-cli scaffold, eval, deploy, and every other command directly from your terminal. The skills just make it easier for coding agents to do it for you.

    How can I extend agents-cli with other skills? agents-cli skills cover the agent-building lifecycle (scaffold, ADK code patterns, evals, deploy, publish, observability). For adjacent concerns, you could install another skill suite alongside. For example, agent-skills covers general software-engineering workflows (ideation, spec gates, planning, code review), and google/skills covers Google Cloud foundations (BigQuery, Cloud Run, Firebase, GKE). genai-factory has Terraform blueprints for enterprise GenAI infrastructure and ships as an extension: agents-cli extension add GoogleCloudPlatform/genai-factory.

    Feedback

    We value your input — it helps us improve agents-cli for the community.

    • Bugs & feature requests: open an issue — 👍 the ones you want prioritized
    • Share what you built: we'd love to hear about your projects! Reach out at [email protected] to share your agent or provide feedback

    Contributing

    The best way to contribute is through feedback: bug reports, feature requests, and ideas shared via issues to directly shape our roadmap.

    See the contributing guide for details.

    Telemetry

    By default, agents-cli emits a single usage signal per command invocation to help improve the tool and better understand how it's used. Each signal is a structured log entry written to your own Google Cloud project: GOOGLE_CLOUD_PROJECT, or else the default project of your Application Default Credentials (logName=projects/<project>/logs/agents-cli), where you can query it in Cloud Logging. It records only the metadata such as command name (e.g. deploy, scaffold.create), exit code, error class, duration (measured from command dispatch to exit, so it excludes CLI startup), CLI/Python versions, and OS — never file contents, arguments, or other input. Commands added by extensions are recorded without their names. A command an extension serves is marked as such, and the extension is named only if it was installed from a repository in the google GitHub organization.

    The request that writes the entry also carries usage metadata in its User-Agent and X-Goog-Api-Client headers, which Google receives for agents-cli usage analytics: the CLI and Python versions, the OS and its release, the CPU architecture, the command name and a random per-invocation ID. The log entry's contents, such as the exit code, error class and duration, stay in your project.

    To opt out of sending telemetry, use one of the following environment variables:

    # our cli-specific variable
    # 0, false, no, or off (case-insensitive):
    export AGENTS_CLI_TELEMETRY=0
    
    # donottrack.sh standard variable
    export DO_NOT_TRACK=1
    

    Use agents-cli info to see the current telemetry state.

    Terms of Service

    agents-cli leverages Google Cloud APIs. When you deploy agents, you'll be deploying resources in your own Google Cloud project and will be responsible for those resources. Please review the Google Cloud Service Terms for details.