
Google Agents Cli Publish
Register a deployed Google ADK agent with Gemini Enterprise using agents-cli publish after runtime or Cloud Run/GKE is live.
Overview
google-agents-cli-publish is an agent skill for the Launch phase that registers a deployed ADK agent with Gemini Enterprise via agents-cli publish gemini-enterprise.
Install
npx skills add https://github.com/google/agents-cli --skill google-agents-cli-publishWhat is this skill?
- Covers agents-cli publish gemini-enterprise with programmatic and interactive flows
- Documents ADK vs A2A registration modes and flag reference for Cloud Run and GKE
- Auto-detects Agent Runtime targets from deployment_metadata.json created by deploy
- Troubleshooting for permissions including roles/run.servicesInvoker for A2A on Cloud Run
- Explicit boundary: use google-agents-cli-deploy for deployment, not this skill
- Requires agents-cli binary; metadata version 0.3.0 in skill header
Adoption & trust: 12.4k installs on skills.sh; 2.7k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent is deployed but not yet registered in Gemini Enterprise, so colleagues cannot invoke it through the enterprise app.
Who is it for?
Builders using Google ADK and agents-cli who finished deploy (or Cloud Run/GKE) and need enterprise registration documented end to end.
Skip if: First-time deployment, local-only agents, or teams without a Gemini Enterprise app created in Cloud Console.
When should I use this skill?
User wants to publish an agent, publish my ADK agent, register with Gemini Enterprise, publish to Gemini Enterprise, or needs agents-cli publish gemini-enterprise guidance.
What do I get? / Deliverables
You complete ADK or A2A registration with correct flags or auto-detected metadata so the agent appears in your Gemini Enterprise app—after deploy, not instead of it.
- Agent registered in Gemini Enterprise (ADK or A2A mode)
- Correct publish command with flags or interactive completion
- Resolved IAM notes for Cloud Run A2A invoker role when applicable
Recommended Skills
Journey fit
Publishing to Gemini Enterprise is the distribution step that makes a deployed agent discoverable and usable inside the enterprise app—not the deploy itself. Canonical shelf is launch/distribution because the skill covers registration modes (ADK vs A2A), agent card URLs, and enterprise app wiring rather than build or infra provisioning.
How it compares
Post-deploy enterprise registration guide—not the deploy skill and not a generic MCP GitHub workflow.
Common Questions / FAQ
Who is google-agents-cli-publish for?
Indie and solo builders shipping Google ADK agents who use agents-cli and must register production endpoints with Gemini Enterprise.
When should I use google-agents-cli-publish?
After agents-cli deploy (or equivalent Cloud Run/GKE reachability), when you say publish an agent, register with Gemini Enterprise, or need ADK vs A2A publish flags—not during initial deploy.
Is google-agents-cli-publish safe to install?
It is procedural documentation for a Google CLI; review the Security Audits panel on this Prism page and treat enterprise registration as touching production identities and Cloud IAM.
Workflow Chain
Requires first: google agents cli deploy
SKILL.md
READMESKILL.md - Google Agents Cli Publish
# Gemini Enterprise Registration > **Requires:** A deployed agent. For Agent Runtime, `deployment_metadata.json` (created by `agents-cli deploy`) enables auto-detection. For Cloud Run or GKE, provide the agent card URL and flags directly. ## Prerequisites 1. **Agent must be deployed** — the agent must be running and reachable 2. **Gemini Enterprise app must exist** — Create one in Google Cloud Console → Gemini Enterprise → Apps before registering 3. **`deployment_metadata.json`** (Agent Runtime only) — Created automatically by `agents-cli deploy`; contains the agent runtime ID, deployment target, and A2A flag ## Required Permissions for A2A on Cloud Run - **`roles/run.servicesInvoker`** granted to the Discovery Engine service account (`service-<PROJECT_NUMBER>@gcp-sa-discoveryengine.iam.gserviceaccount.com`) on the Cloud Run service. --- ## Registration Modes ### ADK Registration (default) For standard ADK agents deployed to Agent Runtime. The agent is registered directly via its reasoning engine resource name. ```bash agents-cli publish gemini-enterprise \ --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" ``` ### A2A Registration For agents using the Agent-to-Agent protocol. Requires an agent card URL — the command fetches the card and registers it. ```bash # A2A on Cloud Run agents-cli publish gemini-enterprise \ --registration-type a2a \ --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-app \ --display-name "My A2A Agent" # A2A on Agent Runtime (card URL is auto-constructed from metadata) agents-cli publish gemini-enterprise \ --registration-type a2a \ --gemini-enterprise-app-id projects/123456/locations/global/collections/default_collection/engines/my-app ``` --- ## 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 ```bash 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 adk ``` ### Via environment variables Every flag has an env var alternative: ```bash 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-enterprise ``` --- ## Interactive 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 descri