/google-agents-cli:google-agents-cli-publishfrom google-agents-cli
Registers deployed agents in Gemini Enterprise and Agent Registry. Handles publishing, listing, updating, and removing agents and MCP servers.
Ships in google-agents-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run agents-cli info first: it prints the language and deployment target the sections below key off.
Before checking the prerequisites, read the framework's skill for this stage: the skill the project's guidance file (CLAUDE.md, GEMINI.md or AGENTS.md) names. On ADK, call the Skill tool with google-agents-cli-adk-code and read its references/adk-publish.md. No Skill tool: read its SKILL.md directly (../<skill-name>/ for a bundled skill, .agents/skills/<skill-name>/ for an extension's).
Optional, after a deploy: agents-cli publish gemini registers the agent with a Gemini Enterprise app (the Console now calls it a Gemini app). publish gemini-enterprise still works as a hidden alias. agents-cli publish gemini --help lists every flag and its env var. Not deployed yet: call the Skill tool with google-agents-cli-deploy.
Done when publish prints the registered agent and the user confirms it answers in the Gemini Enterprise app.
agents-cli publish gemini --list shows the apps in the project.deployment_metadata.json from agents-cli deploy is in the project.agents-cli publish gemini \
--gemini-app-id projects/123456/locations/global/collections/default_collection/engines/my-app
The command reads the runtime ID from deployment_metadata.json and picks the registration type from the metadata. Override with --registration-type or --agent-runtime-id. Without metadata, non-interactive mode needs --registration-type.
On Agent Runtime the default type is adk: the Gemini app calls the engine through :streamQuery, with no agent card. It works only for a framework that declares the ADK runtime contract. Before you choose between adk and a2a, check the framework's skill: it says which one the agent supports there and which to prefer (on ADK, adk-publish.md prefers adk).
Every scaffolded agent serves A2A, and A2A is the only registration type on Cloud Run and GKE. Pass the card URL; display name and description default to the card's name and description, and --display-name and --description override them.
agents-cli publish gemini \
--agent-card-url https://my-service-abc123.us-east1.run.app/a2a/app/.well-known/agent-card.json \
--gemini-app-id projects/123456/locations/global/collections/default_collection/engines/my-app
The card path depends on the language, whatever the framework:
/a2a/{app_name}/.well-known/agent-card.json/.well-known/agent-card.jsonOn Cloud Run, first grant roles/run.servicesInvoker on the service to service-PROJECT_NUMBER@gcp-sa-discoveryengine.iam.gserviceaccount.com.
On Agent Runtime, --registration-type a2a without --agent-card-url builds the card URL from the metadata. The card sits behind the /api passthrough: .../reasoningEngines/v1/{resource}/api/<card path>.
An agent that needs OAuth user consent passes --authorization-id projects/PROJECT_NUMBER/locations/global/authorizations/AUTH_ID.
The command is non-interactive by default, so pass values as flags or env vars (GEMINI_APP_ID, AGENT_RUNTIME_ID, GEMINI_DISPLAY_NAME, GEMINI_DESCRIPTION, AGENT_CARD_URL, REGISTRATION_TYPE):
export GEMINI_APP_ID="projects/123456/locations/global/collections/default_collection/engines/my-app"
export GEMINI_DISPLAY_NAME="Production Agent"
agents-cli publish gemini
-i prompts for missing values instead: it lists the apps and offers the runtime ID from metadata. Re-running updates the existing registration in place.
Agent Registry (Preview) is the project-wide catalog of agents and MCP servers, separate from any Gemini Enterprise app. Agent Runtime agents register automatically on deploy; for A2A projects deploy also stores the served agent card on the engine, so the entry lists as an A2A agent with the card's skills. Manage entries with gcloud agent-registry (needs roles/agentregistry.editor; see its --help). Change an endpoint or metadata on the Service resource, not the Agent. An external MCP server's spec is its tools/list response (max 10 KB; no us or eu multi-region). To remove an auto-registered agent, delete the runtime agent, but ask the user first: that deletes the deployment and its managed sessions.
Terraform: google_agent_registry_service with an mcp_server_spec block. Docs: manage agents, register MCP servers.
| Symptom | Fix |
|---|---|
| "Session not found" after registering | Python projects on google-cloud-aiplatform 1.128.0 or older: upgrade it, redeploy, re-register |
--registration-type is required | No deployment_metadata.json: pass --registration-type |
| "Gemini app ID is required" | Pass --gemini-app-id or set GEMINI_APP_ID |
| HTTP 403 | Discovery Engine Editor on the app's project; on Cloud Run, the run.servicesInvoker grant above |
| "Could not fetch agent card" | Check the agent runs and the URL is right; for Cloud Run, gcloud auth login. A Live agent has no card and can't be published |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
gemini-enterprise, agent-registry, a2a, agents-cli, agent-publishing
Generated from the plugin's indexed repository (google/agents-cli) — no native marketplace selected
npx claudepluginhub p/google-google-agents-cli7 skills in this plugin
/google-agents-cli-adk-codeWrites and fixes ADK agent code in Python, Go, Java, Kotlin and TypeScript: tools, callbacks, state, sub-agents, graph workflows, MCP, Live voice and the ADK recipe catalog. Use when the project uses ADK or the user names it, and they want to add a tool, connect an MCP server, restructure into sub-agents or workflow steps, change the model or stream responses.
/google-agents-cli-deployDeploys agents with agents-cli to Agent Runtime, Cloud Run or GKE. Use when the user wants to deploy or go to production, add a deployment target or CI/CD, set up Terraform, secrets or IAM, test or roll back a deployed agent, put it behind Agent Gateway, use CMEK, or run batch inference from BigQuery.
/google-agents-cli-Other plugins' skills for the same job