google-agents-cli-publish
ما الذي تفعله
توجه هذه المهارة تسجيل وكيل منشور في تطبيق Gemini وAgent Registry. وهي للمطورين الذين يريدون أن يظهر وكيلهم ويكون قابلًا للاستخدام داخل Gemini.
متى تستخدمها
- ✓عندما يكون وكيلك منشورًا وتريد تسجيله لدى Gemini.
- ✓عندما تريد عرض الوكلاء في Agent Registry أو تحديثهم أو حذفهم.
- ✓عندما تريد تسجيل خادم MCP لوكيل.
رابط المهارة
https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-publish/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“سجّل وكيل ADK المنشور لدي لدى Gemini حتى يستطيع الناس استخدامه من تطبيق Gemini.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تتحقق المهارة من أن الوكيل منشور وقابل للوصول، ثم تسجله باستخدام أداة agents. وفي حالة Agent Runtime، تقرأ ملف تفاصيل النشر لتجد الوكيل تلقائيًا.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Gemini Registration
Requires: A deployed agent. For Agent Runtime in Gemini platform,
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 app must exist — Create one in the Google Cloud console 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 the Gemini app, 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 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
الأسئلة الشائعة
ما الذي يجب أن يكون صحيحًا قبل التسجيل؟
يجب أن يكون الوكيل منشورًا وقابلًا للوصول، ويجب أن يوجد تطبيق Gemini في Cloud console.
هل تعمل مع وكلاء الصوت المباشر؟
لا، يذكر الوصف أن الوكلاء المباشرين أو الصوتيين غير مدعومين، لذلك تحتاج إلى وكيل نصي.
هل تحتاج إلى صلاحيات إضافية على Cloud Run؟
نعم، يحتاج حساب خدمة Discovery Engine إلى صلاحية استدعاء خدمة Cloud Run.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 6.3k
- الترتيب
- #14372
- الترخيص
- Apache-2.0
- آخر تحديث
- 27/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
google-agents-cli-adk-code
6.3kيساعد وكيلك على كتابة كود للوكلاء الذكيين باستخدام Google ADK، بما فيه الأدوات وردود الاستدعاء والحالة وأنماط التنسيق.
google-agents-cli-deploy
6.3kيساعد وكيلك على نشر وكيل ذكاء اصطناعي على Google Cloud، ويغطي Agent Runtime وCloud Run وGKE والأسرار وCI/CD والمعالجة.
google-agents-cli-eval
6.3kيساعد وكيلك على تقييم وكيل ذكاء اصطناعي باستخدام مجموعات اختبار وتسجيل النقاط، ثم معرفة سبب فشل الإجابات.
google-agents-cli-observability
6.3kيساعد وكيلك على إعداد التتبع والتسجيل والمراقبة لوكيل ذكاء اصطناعي منشور على Google Cloud، حتى ترى ما يفعله.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.