google-agents-cli-publish

Instructions for publishing a deployed Google agent to Gemini Enterprise, Google's workplace service for finding and using business information and tools. It covers the agents-cli publish gemini-enterprise command and Agent Registry registration.

In plain words
What is it for?
Use it to register an agent running on Agent Runtime, Cloud Run, or GKE, including agents exposed through the Agent-to-Agent protocol. It also helps configure the required Google Cloud permissions.
Why use it?
It explains the prerequisites, permissions, deployment details, and registration choices needed before Gemini Enterprise can reach the agent. This avoids trying to register an agent that is not deployed or accessible.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/google/agents-cli/google-agents-cli-publish
Any agent
npx skills add google/agents-cli --skill google-agents-cli-publish
Clone the repo
git clone --depth 1 https://github.com/google/agents-cli

Made for: Claude Code, Codex.

Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,538 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00147 $0.02538
Opus 5 $0.00073 $0.01269
Sonnet 5 $0.00029 $0.00508
Haiku 4.5 $0.00015 $0.00254

Measured 2d ago against content hash 8b85fed38437, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

google-agents-cli-publish scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/google-agents-cli-publish/SKILL.md · 208 lines

How it starts

The opening of the file, as written. The whole thing — 208 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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, the A2A flag, and the agent directory

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

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, though the CLI warns against it: Gemini Enterprise invokes Agent Runtime natively via :streamQuery, so prefer ADK there. 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
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-app

Pass --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)

This is the default and recommended registration for Agent Runtime deployments: 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.

Read the full file on GitHub · 208 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 208 lines · 147 tokens per session scan A 8b85fed38437

Subscribe to this mod's changes

google-agents-cli-publish is a skill published in the GitHub repository google/agents-cli (5,759 stars, last pushed 4d ago), licensed Apache-2.0. It adds 147 tokens to every session and 2,538 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.