Communitygithub.com

majiayu000/claude-skill-registry-data

使用 Google ADK Python(Agent Development Kit)建立 AI 代理。適用於多代理系統、工作流程代理(順序/並行/迴圈)、Vertex AI 部署、工具整合及人機協作流程。

claude-skill-registry-data 是什麼?

這個技能詳細介紹了 Google 的 Agent Development Kit(ADK)Python 版本,這是一個開源、以程式碼為先的工具包,用於建置、評估和部署 AI 代理。它支援多種代理類型,包括由 LLM 驅動且能動態路由的 LlmAgent,以及用於可預測管線的結構化工作流程代理(如 SequentialAgent、ParallelAgent 和 LoopAgent)。ADK 提供豐富的工具生態系,包含 google_search 和 code_execution 等預建工具,以及將自訂 Python 函式轉換為工具的功能。此技能涵蓋從安裝、實作模式(單一代理、多代理系統、自訂工具、工作流程和人類確認流程)到部署選項(Cloud Run、Vertex AI 和自訂基礎架構)的所有內容。它強調最佳實務,例如模組化設計、版本控制、系統性評估,以及使用內建 UI 進行測試和除錯。

相容平台✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/majiayu000/claude-skill-registry-data/tree/HEAD/agent/google-adk-python-hoanghd218-landing-page-ai-kien

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Google ADK Python 技能

您是 Google Agent Development Kit (ADK) Python 的專家指南——這是一個開源、程式碼優先的工具包,用於建置、評估和部署 AI 代理。

何時使用此技能

當使用者需要以下功能時,請使用此技能:

  • 建置具備工具整合與編排能力的 AI 代理
  • 建立具有階層協調機制的多代理系統
  • 為可預測的管線實作工作流程代理(順序、並行、迴圈)
  • 將 LLM 驅動的代理與 Google 搜尋、程式碼執行或自訂工具整合
  • 將代理部署到 Vertex AI Agent Engine、Cloud Run 或自訂基礎架構
  • 系統性地評估和測試代理效能
  • 實作工具執行的人機協作(Human-in-the-Loop)核准流程

核心概念

代理類型

LlmAgent:由 LLM 驅動的代理,能夠進行動態路由和自適應行為

  • 使用名稱、模型、指令、描述和工具來定義
  • 支援用於委派和協調的子代理
  • 根據上下文進行智慧決策

工作流程代理:結構化、可預測的編排模式

  • SequentialAgent:按定義順序執行代理
  • ParallelAgent:同時執行多個代理
  • LoopAgent:使用迭代邏輯重複執行

BaseAgent:自訂代理實作的基礎

關鍵元件

工具生態系:

  • 預建工具(google_search、code_execution)
  • 作為工具的自訂 Python 函式
  • OpenAPI 規格整合
  • 用於人類核准的工具確認流程

多代理架構:

  • 階層式代理組合
  • 針對特定領域的專業代理
  • 用於委派的協調代理

安裝

# 穩定版本(推薦)
pip install google-adk

# 開發版本(最新功能)
pip install git+https://github.com/google/adk-python.git@main

實作模式

單一代理搭配工具

from google.adk.agents import LlmAgent
from google.adk.tools import google_search

agent = LlmAgent(
    name="search_assistant",
    model="gemini-2.5-flash",
    instruction="您是一個樂於助人的助理,負責搜尋網路資訊。",
    description="用於網路查詢的搜尋助理",
    tools=[google_search]
)

多代理系統

from google.adk.agents import LlmAgent

# 專業代理
researcher = LlmAgent(
    name="Researcher",
    model="gemini-2.5-flash",
    instruction="使用網路搜尋徹底研究主題。",
    tools=[google_search]
)

writer = LlmAgent(
    name="Writer",
    model="gemini-2.5-flash",
    instruction="根據研究撰寫清晰、引人入勝的內容。",
)

# 協調代理
coordinator = LlmAgent(
    name="Coordinator",
    model="gemini-2.5-flash",
    instruction="將任務委派給研究員和作家代理。",
    sub_agents=[researcher, writer]
)

自訂工具建立

from google.adk.tools import Tool

def calculate_sum(a: int, b: int) -> int:
    """計算兩個數字的總和。"""
    return a + b

# 將函式轉換為工具
sum_tool = Tool.from_function(calculate_sum)

agent = LlmAgent(
    name="calculator",
    model="gemini-2.5-flash",
    tools=[sum_tool]
)

順序工作流程

from google.adk.agents import SequentialAgent

workflow = SequentialAgent(
    name="research_workflow",
    agents=[researcher, summarizer, writer]
)

並行工作流程

from google.adk.agents import ParallelAgent

parallel_research = ParallelAgent(
    name="parallel_research",
    agents=[web_researcher, paper_researcher, expert_researcher]
)

人機協作

from google.adk.tools import google_search

# 需要確認的工具
agent = LlmAgent(
    name="careful_searcher",
    model="gemini-2.5-flash",
    tools=[google_search],
    tool_confirmation=True  # 執行前需要核准
)

部署選項

Cloud Run 部署

# 將代理容器化
docker build -t my-agent .

# 部署到 Cloud Run
gcloud run deploy my-agent --image my-agent

Vertex AI Agent Engine

# 部署到 Vertex AI 以實現可擴展的代理託管
# 與 Google Cloud 的受管基礎架構整合

自訂基礎架構

# 在本地或自訂伺服器上執行代理
# 完全控制部署環境

模型支援

針對 Gemini 最佳化:

  • gemini-2.5-flash
  • gemini-2.5-pro
  • gemini-1.5-flash
  • gemini-1.5-pro

模型無關:雖然針對 Gemini 最佳化,但 ADK 透過標準 API 支援其他 LLM 提供者。

最佳實務

  1. 程式碼優先理念:在 Python 中定義代理,以實現版本控制、測試和靈活性
  2. 模組化設計:為特定領域建立專業代理,並組合成系統
  3. 工具整合:善用預建工具,並以自訂函式擴充
  4. 評估:針對測試案例系統性地測試代理
  5. 安全性:為敏感操作實作確認流程
  6. 階層式結構:使用協調代理處理複雜的多代理工作流程
  7. 工作流程選擇:為可預測的管線選擇工作流程代理,為動態路由選擇 LLM 代理

常見使用案例

  • 研究助理:網路搜尋 + 摘要 + 報告生成
  • 程式碼助理:程式碼執行 + 文件 + 除錯
  • 客戶支援:查詢路由 + 知識庫 + 升級
  • 內容創作:研究 + 寫作 + 編輯管線
  • 資料分析:資料擷取 + 處理 + 視覺化
  • 任務自動化:包含條件邏輯的多步驟工作流程

開發 UI

ADK 包含用於以下功能的內建介面:

  • 互動式測試代理行為
  • 除錯工具呼叫和回應
  • 評估代理效能
  • 迭代代理設計

資源

實作工作流程

實作 ADK 代理時:

  1. 定義需求:識別代理功能和所需工具
  2. 選擇架構:單一代理、多代理或工作流程
  3. 選擇工具:預建工具、自訂函式或 OpenAPI 整合
  4. 實作代理:使用指令和工具建立代理定義
  5. 本地測試:使用開發 UI 進行迭代
  6. 加入評估:為系統性驗證建立測試案例
  7. 部署:選擇 Cloud Run、Vertex AI 或自訂基礎架構
  8. 監控:追蹤代理效能並迭代

請記住:ADK 將代理開發視為傳統軟體工程——使用版本控制、撰寫測試,並遵循工程最佳實務。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

majiayu000/claude-skill-registry-data

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry-data

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry-data

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry-data

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry-data

Analyzes current state and user query to answer BMad questions or recommend the next workflow or agent. Use when user says what should I do next, what do I do now, or asks a question about BMad

majiayu000/claude-skill-registry-data

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry-data

Portfolio allocation and rebalancing optimizer. Manages asset allocation across stocks/cash/bonds, performs periodic rebalancing, and ensures diversification according to market regime and risk tolerance.

majiayu000/claude-skill-registry-data

Create a hilarious and ultra-realistic video of an anthropomorphic animal acting like a human vlogger in a real-world setting.

majiayu000/claude-skill-registry-data

Speech-to-text transcription and translation via OpenAI Audio API -- models, response formats, timestamps, prompting, streaming, chunking, and diarization

majiayu000/claude-skill-registry-data

This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.

majiayu000/claude-skill-registry-data

小省导购员数字人带货版即梦视频提示词生成系统,基于四大智能体协同(提示词生成师、质量管控师、知识库运维师、跨环节适配师),按照"主体+运动+场景+(镜头语言+光影+氛围)"公式输出中英文双版提示词,适配5s短视频。确保人物一致性、视觉连贯性、情绪连贯性,支持知识库智能复用和跨工具适配(Suno音乐、AI绘画),为数字人带货视频提供高质量提示词生成服务。

majiayu000/claude-skill-registry-data

Upload and manage files using Google Gemini File API via scripts/. Use for uploading images, audio, video, PDFs, and other files for use with Gemini models. Supports file upload, status checking, and file management. Triggers on "upload file", "file API", "upload image", "upload PDF", "upload video", "file management".

majiayu000/claude-skill-registry-data

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry-data

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry-data

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

majiayu000/claude-skill-registry-data

Conduct domain and industry research. Use when the user says "lets create a research report on [domain or industry]

majiayu000/claude-skill-registry-data

Conduct market research on competition and customers. Use when the user says "create a market research report about [business idea]".

majiayu000/claude-skill-registry-data

Conduct technical research on technologies and architecture. Use when the user says "create a technical research report on [topic]".

majiayu000/claude-skill-registry-data

Understand an existing codebase through systematic exploration

majiayu000/claude-skill-registry-data

Builds, edit or validate Agent Skill through conversational discovery. Use when the user requests to "Create an Agent", "Optimize an Agent" or "Edit an Agent".

相關技能