google-agents-cli-publish
Skill6.1k starsChanged 3 months agoApache-2.0View on GitHub
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini Enterprise", "publish to Gemini Enterprise", or needs guidance on the agents-cli publish gemini-enterprise command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
Trending
Less talk lately.about the whole repository
Who's talking about google/agents-cli
- @jeanphi-baconnais.gitlab.io“⛅ Deploying an agent on Agent Runtime is very easy with agents-cli github.com/google/agent... This raises …”Bluesky · Jun 25, 2026 · 3 likes
- @epicvibecoder.bsky.social“google turns your coding assistant into an ai agent expert. agents cli is google's cli and skills for …”Bluesky · Jul 1, 2026 · 2 likes
- A Hacker News story“Google: CLI and skills for building agents on Gemini Enterprise Agent Platform”Hacker News · Apr 23, 2026 · 2 points
- @pythonhub.dev“google / agents-cli The CLI and skills that turn any coding assistant into an expert at creating, …”Bluesky · Jul 28, 2026 · 1 likes
- sudosubin/agents.nix“agent-plugins.github.google.agents-cli: 1.8.0 → 1.9.0”GitHub · Oct 6, 2026
The biggest 5 of 23 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 23
Talked about on GitHub, Bluesky and Hacker News (23 times).
On GitHub · 17
- Oct 6, 2026agent-plugins.github.google.agents-cli: 1.8.0 → 1.9.0 — sudosubin/agents.nix0 reactions
- Oct 4, 2026agent-plugins.github.google.agents-cli: init at 1.8.0 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.google.agents-cli: 1.7.0 → 1.8.0 — sudosubin/agents.nix0 reactions
- Sep 28, 2026google-agents-cli: upstream update — robomotionio/robomotion-skills0 reactions
- Sep 27, 2026agent-skills.github.google.agents-cli: init at 1.7.0 — sudosubin/agents.nix0 reactions
12 more on GitHub
- Jul 10, 2026evals run_inference (local ADK agent): strips multimodal prompt parts (inline_data) before Runner.run_async — googleapis/python-aiplatform0 reactions
- Jul 3, 2026Agent Skills — leowux/blog0 reactions · 1 comment
- Jun 30, 2026📱 SNS 콘텐츠 - 2026-06-30 23:20 KST — leaf468/autothreads0 reactions
- Jun 30, 2026🤖 AI 트렌드 리포트 - 2026-06-30 23:20 KST — leaf468/autothreads0 reactions
- Jun 25, 2026New skill: /google-google-agents-cli-publish (safe risk) — aiskillstore/marketplace0 reactions
- Jun 25, 2026New skill: /google-google-agents-cli-deploy (low risk) — aiskillstore/marketplace0 reactions
- Jun 25, 2026New skill: /google-google-agents-cli-scaffold (safe risk) — aiskillstore/marketplace0 reactions
- Jun 25, 2026New skill: /google-google-agents-cli-eval (low risk) — aiskillstore/marketplace0 reactions
- Jun 25, 2026New skill: /google-google-agents-cli-observability (safe risk) — aiskillstore/marketplace0 reactions
- Jun 22, 2026New skill: /google-google-agents-cli-workflow (safe risk) — aiskillstore/marketplace0 reactions
- Jun 20, 2026New skill: /google-google-agents-cli-adk-code (low risk) — aiskillstore/marketplace0 reactions
- May 21, 2026Setup: Bootstrap KickOut backend with google-agents-cli — ale-sanchez-g/kickout0 reactions
On Bluesky · 5
- Jun 25, 2026⛅ Deploying an agent on Agent Runtime is very easy with agents-cli github.com/google/agent... This raises so many questions about the… — @jeanphi-baconnais.gitlab.io3 likes and reposts
- Jul 1, 2026google turns your coding assistant into an ai agent expert. agents cli is google's cli and skills for creating, evaluating and deploying ai… — @epicvibecoder.bsky.social2 likes and reposts
- Jul 28, 2026google / agents-cli The CLI and skills that turn any coding assistant into an expert at creating, evaluating, and deploying AI agents on… — @pythonhub.dev1 likes and repost
- Jul 6, 2026公式で確認できたのは、7スキルで scaffold/eval/deploy/publish を回せること。これは本当。 ただし前提もある。Python 3.11+、uv、Node.js、認証。公開後の Google Cloud 資源は自分の責任。… — @sara-echosphere.bsky.social0 likes and reposts · 1 reply
- Jun 30, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 google / agents-cli ⭐ 3,813 (+433) 🗒 Python The CLI and skills that turn any coding assistant into… — @github-trending.bsky.social0 likes and reposts · 1 reply
On Hacker News · 1
- Apr 23, 2026Google: CLI and skills for building agents on Gemini Enterprise Agent Platform2 points
In this repository15 other files it gives its agents.
- extensions/langchain/template/AGENTS.mdAGENTS.md
- agents-cli-langchainSkill
- google-agents-cli-adk-codeSkill
- google-agents-cli-deploySkill
- google-agents-cli-evalSkill
- google-agents-cli-observabilitySkill
- google-agents-cli-scaffoldSkill
- google-agents-cli-workflowSkill
- google-agents-cli-adk-codeSkill
- google-agents-cli-deploySkill
- google-agents-cli-evalSkill
- google-agents-cli-observabilitySkill
- google-agents-cli-publishSkill
- google-agents-cli-scaffoldSkill
- google-agents-cli-workflowSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 141
When deployment_metadata.json exists, the command automatically:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Gemini Enterprise Registration
Requires: A deployed agent. For Agent Runtime,
deployment_metadata.json(created byagents-cli deploy) enables auto-detection. For Cloud Run or GKE, provide the agent card URL and flags directly.
Prerequisites
- Agent must be deployed — the agent must be running and reachable
- Gemini Enterprise app must exist — Create one in Google Cloud Console → Gemini Enterprise → Apps before registering
deployment_metadata.json(Agent Runtime only) — Created automatically byagents-cli deploy; contains the agent runtime ID, deployment target, the A2A flag, and the agent directory- Text-based agent — Live/voice (bidi) agents are not supported by Gemini Enterprise, which has no
/run_livetransport. Register a text-based agent instead.
Required Permissions for A2A on Cloud Run
roles/run.servicesInvokergranted to the Discovery Engine service account (service-<PROJECT_NUMBER>@gcp-sa-discoveryengine.iam.gserviceaccount.com) on the Cloud Run service.
Registration Modes
A2A Registration
Every scaffolded agent serves the Agent-to-Agent protocol. A2A is the default — and only — registration type on Cloud Run and GKE (no reasoning engine to invoke natively). It also works on Agent Runtime via --registration-type a2a. For an ADK agent there the CLI warns against it, because Gemini Enterprise can invoke Agent Runtime natively via :streamQuery — prefer ADK registration in that case. For an agent built on another framework there is no ADK app to invoke natively, so A2A is the right mode on every target and the warning is expected. Pass the agent card URL and the command fetches the card and registers it; display name and description default to the card's name/description.
# A2A on Cloud Run / GKE. The card path depends on the project's language:
# Python -> /a2a/{app_name}/.well-known/agent-card.json
# Go -> /.well-known/agent-card.json
agents-cli publish gemini-enterprise \
--agent-card-url https://my-service-abc123.us-east1.run.app/a2a/app/.well-known/agent-card.json \
--gemini-enterprise-app-id projects/123456/locations/global/collections/default_collection/engines/my-appPass --display-name / --description to override the card defaults. On Agent Runtime, the card URL auto-builds from deployment_metadata.json if you omit --agent-card-url.
ADK Registration (default on Agent Runtime)
ADK projects only. The agent must be deployed to Agent Runtime as an ADK app, since registration invokes it through
:streamQuery. An agent on another framework registers over A2A, so deploy it to Cloud Run or GKE and publish from there.
This is the default and recommended registration for ADK agents on Agent Runtime: Gemini Enterprise invokes the agent natively via :streamQuery on its reasoning engine resource, authenticating end-to-end. Under the hood, :streamQuery dispatches to the AdkApp's streaming_agent_run_with_events method — when debugging an ADK invocation, search the runtime's reasoning_engine_stderr logs for that method name to trace the failure. It's also the path to use when the agent needs an OAuth authorization (--authorization-id). The agent is registered directly via its reasoning engine resource name; no agent card URL is needed.
agents-cli publish gemini-enterprise \
--registration-type adk \
--agent-runtime-id projects/123456/locations/us-east1/reasoningEngines/789 \
--gemini-enterprise-app-id projects/123456/locations/global/collections/default_collection/engines/my-app \
--display-name "My Agent" \
--description "Handles customer queries" \
--tool-description "Answers questions about products"Programmatic Mode (CI/CD)
The command is non-interactive by default — pass all required values via flags or environment variables. This makes it safe for CI/CD pipelines.
Via flags
agents-cli publish gemini-enterprise \
--agent-runtime-id "$AGENT_RUNTIME_ID" \
--gemini-enterprise-app-id "$GEMINI_ENTERPRISE_APP_ID" \
--display-name "Production Agent" \
--registration-type adkVia environment variables
Most flags have an env var alternative (--metadata-file, --interactive, and --list do not):
export AGENT_RUNTIME_ID="projects/123456/locations/us-east1/reasoningEngines/789"
export GEMINI_ENTERPRISE_APP_ID="projects/123456/locations/global/collections/default_collection/engines/my-app"
export GEMINI_DISPLAY_NAME="Production Agent"
export GEMINI_DESCRIPTION="Handles customer queries"
agents-cli publish gemini-enterpriseInteractive Mode (--interactive)
Pass --interactive (or -i) to be guided through any missing values with interactive prompts. The command will list available Gemini Enterprise apps, offer to auto-detect the agent runtime ID from metadata, and prompt for display name and description.
agents-cli publish gemini-enterprise --interactiveComplete Flag Reference
| Flag | Env Var | Description |
--agent-runtime-id | AGENT_RUNTIME_ID | Agent Runtime resource name (auto-detected from deployment_metadata.json) |
--gemini-enterprise-app-id | ID or GEMINI_ENTERPRISE_APP_ID | Gemini Enterprise app full resource name |
--display-name | GEMINI_DISPLAY_NAME | Display name in Gemini Enterprise |
--description | GEMINI_DESCRIPTION | Agent description |
--tool-description | GEMINI_TOOL_DESCRIPTION | Tool description (ADK mode only, defaults to description) |
--registration-type | REGISTRATION_TYPE | adk or a2a (defaults to adk for an ADK agent on Agent Runtime, a2a everywhere else, including any non-ADK framework) |
--agent-card-url | AGENT_CARD_URL | Agent card URL for A2A registration |
--deployment-target | DEPLOYMENT_TARGET | agent_runtime, cloud_run, or gke (sets the default registration type — ADK on Agent Runtime, A2A on Cloud Run / GKE — and the A2A auth method) |
--project-id | GOOGLE_CLOUD_PROJECT | GCP project ID for billing |
--project-number | PROJECT_NUMBER | GCP project number (used for Gemini Enterprise lookup) |
--authorization-id | GEMINI_AUTHORIZATION_ID | OAuth authorization resource name |
--metadata-file | — | Path to deployment metadata (default: deployment_metadata.json) |
--interactive / -i | — | Enable interactive prompts |
--list | — | List Gemini Enterprise apps in the current project and exit |
Auto-Detection from Metadata
When deployment_metadata.json exists, the command automatically:
- Reads the agent runtime ID (
remote_agent_runtime_id) - Determines the registration type: defaults to ADK (native
:streamQuery) on Agent Runtime, and A2A on Cloud Run / GKE (which have no reasoning engine). A project scaffolded with another framework serves no ADK app, so it defaults to A2A on every target. Override with--registration-type. - Determines the deployment target for authentication
This means that for the simplest case (an ADK agent on Agent Runtime, registered as ADK), you only need to provide the Gemini Enterprise app ID:
agents-cli publish gemini-enterprise \
--gemini-enterprise-app-id projects/123456/locations/global/collections/default_collection/engines/my-appAgent Registry (agents and MCP servers)
Agent Registry (Preview) is the Google Cloud fleet-wide catalog of agents and MCP servers, separate from a Gemini Enterprise app.
Agents deployed to a managed runtime (Agent Runtime on Gemini Enterprise
Agent Platform) are auto-registered — no extra step after agents-cli deploy.
Manage them with gcloud (requires roles/agentregistry.editor):
# List / inspect agents
gcloud agent-registry agents list --project PROJECT --location LOCATION
gcloud agent-registry agents describe AGENT_NAME
# Update endpoint/metadata — edit the Service resource, not the Agent
gcloud agent-registry services update AGENT_NAME \
--display-name "..." --description "..." \
--interfaces "url=ENDPOINT_URL,protocolBinding=http-json"
# Register an external MCP server: not auto-introspected, so upload a
# toolspec.json (its tools/list response, max 10 KB). No us/eu multi-region.
gcloud agent-registry services create SERVER_NAME --location=LOCATION \
--mcp-server-spec-type=tool-spec --mcp-server-spec-content=toolspec.json \
--interfaces="url=SERVER_URL,protocolBinding=jsonrpc" # or http-json, grpc
# Remove: delete the underlying runtime agent (auto-registered) OR, for
# manually registered agents/servers, delete the Service resource
gcloud agent-registry services delete NAMETerraform: google_agent_registry_service with an mcp_server_spec block.
Docs: https://docs.cloud.google.com/agent-registry/manage-agents · https://docs.cloud.google.com/agent-registry/register-mcp-servers
Troubleshooting
| Issue | Solution |
| "Session not found" after registration | Python projects on google-cloud-aiplatform <= 1.128.0 hit a known SDK bug — upgrade it, redeploy, then re-register |
--registration-type is required | Non-interactive mode needs --registration-type when no deployment_metadata.json exists |
| "Gemini Enterprise App ID is required" | Provide --gemini-enterprise-app-id or set the ID / GEMINI_ENTERPRISE_APP_ID env var |
| Re-publishing the same agent | Registration is idempotent — re-running updates the existing registration in place instead of creating a duplicate |
| HTTP 403 on registration | Check that your account has Discovery Engine Editor permissions on the Gemini Enterprise project |
| Debugging ADK invocation failures on Agent Runtime | Gemini Enterprise calls the agent via the AdkApp's streaming_agent_run_with_events method (the native :streamQuery contract). Grep the runtime's reasoning_engine_stderr logs for streaming_agent_run_with_events to find the underlying error |
| "Could not fetch agent card" | Verify the agent is running and the URL is correct; for Cloud Run, ensure gcloud auth login is done. A Live/voice agent drops its A2A card and cannot be published — Gemini Enterprise does not support Live agents |
Related Skills
/google-agents-cli-deploy— Deployment targets, CI/CD pipelines, and production workflows (also covers Agent Gateway governed ingress/egress and Semantic Governance awareness)/google-agents-cli-workflow— Development workflow, coding guidelines, and operational rules/google-agents-cli-scaffold— Project creation and enhancement withagents-cli scaffold create/scaffold enhance
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

