Aller au contenu
Skillpedia
Agents6.3k · #14372

google-agents-cli-publish

Ce qu’il fait

Cette compétence guide l'enregistrement d'un agent déployé auprès de l'application Gemini et de l'Agent Registry. Elle s'adresse aux développeurs qui veulent que leur agent apparaisse et soit utilisable dans Gemini.

Quand l’utiliser

  • ✓Quand votre agent est déployé et que vous voulez l'enregistrer auprès de Gemini.
  • ✓Quand vous voulez lister, mettre à jour ou supprimer des agents dans l'Agent Registry.
  • ✓Quand vous voulez enregistrer un serveur MCP pour un agent.

Lien du skill

https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-publish/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-publish/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Enregistre mon agent ADK déployé auprès de Gemini pour que les gens puissent l'utiliser depuis l'application Gemini.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

La compétence vérifie que l'agent est déployé et joignable, puis utilise l'outil en ligne de commande agents pour l'enregistrer. Pour Agent Runtime, elle lit le fichier de détails du déploiement afin de trouver l'agent automatiquement.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Gemini Registration

Requires: A deployed agent. For Agent Runtime in Gemini platform, 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 app must exist — Create one in the Google Cloud console 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
  4. Text-based agent — Live/voice (bidi) agents are not supported by the Gemini app, which has no /run_live transport. Register a text-based agent instead.

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. For an ADK agent there the CLI warns against it, because the Gemini app 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 \
  --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

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)

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: the Gemini app 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 \
  --registration-type adk \
  --agent-runtime-id projects/123456/locations/us-east1/reasoningEngines/789 \
  --gemini-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 \
  --agent-runtime-id "$AGENT_RUNTIME_ID" \
  --gemini-app-id "$GEMINI_APP_ID" \
  --display-name "Production Agent" \
  --registration-type adk

Via 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_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 pub
Questions fréquentes

Que doit-il être vrai avant l'enregistrement ?

L'agent doit déjà être déployé et joignable, et l'application Gemini doit exister dans la console Cloud.

Fonctionne-t-elle avec les agents vocaux en direct ?

Non, la description indique que les agents en direct ou vocaux ne sont pas pris en charge, il faut donc un agent textuel.

Faut-il des permissions supplémentaires sur Cloud Run ?

Oui, le compte de service Discovery Engine doit avoir le droit d'invoquer le service Cloud Run.

Détails

Description originale de l’auteur

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini 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

repo: google/agents-cli

Popularité

Étoiles GitHub
6.3k
Position au classement
#14372
Licence
Apache-2.0
Mis à jour
27/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires