google-agents-cli-adk-code

โดย google

ทักษะนี้ควรใช้เมื่อผู้ใช้ต้องการ "เขียนโค้ดเอเจนต์", "สร้างเอเจนต์ด้วย ADK", "เพิ่มเครื่องมือ", "สร้าง callback", "กำหนดเอเจนต์", "ใช้การจัดการสถานะ" หรือต้องการรูปแบบและตัวอย่างโค้ด Python API ของ ADK (Agent Development Kit) ซึ่งเป็นส่วนหนึ่งของชุดทักษะ Google ADK โดยให้ข้อมูลอ้างอิงด่วนสำหรับประเภทเอเจนต์ นิยามเครื่องมือ รูปแบบการประสานงาน callback และการจัดการสถานะ ห้ามใช้สำหรับการสร้างโปรเจกต์ใหม่ (ให้ใช้ google-agents-cli-scaffold) หรือการปรับใช้...

npx skills add https://github.com/google/agents-cli --skill google-agents-cli-adk-code

ADK Code Reference

Before using this skill, activate /google-agents-cli-workflow first — it contains the required development phases and scaffolding steps.

Prerequisites

  1. Run agents-cli info — if it shows project config, skip to the reference below
  2. If no project exists: run agents-cli scaffold create <name>
  3. If user has existing code: run agents-cli scaffold enhance .

Do NOT write agent code until a project is scaffolded.

Python only for now. This reference currently covers the Python ADK SDK. Support for other languages is coming soon.

Quick Reference — Most Common Patterns

from google.adk.agents import Agent

def get_weather(city: str) -> dict:
    """Get current weather for a city."""
    return {"city": city, "temp": "22°C", "condition": "sunny"}

root_agent = Agent(
    name="my_agent",
    model="gemini-3.6-flash",
    instruction="You are a helpful assistant that ...",
    tools=[get_weather],
)

References

The first two are cheatsheets for common patterns; for broad or deep knowledge, go to the source (docs index or installed package).

ReferenceWhen to read
references/adk-python.mdCore ADK API: Agent, tools, callbacks, plugins, state, artifacts, multi-agent systems, SequentialAgent / ParallelAgent / LoopAgent, custom BaseAgent, ManagedAgent (server-hosted first-party agents), A2A protocol, A2UI. Default for most agents.
references/adk-workflows.mdGraph-based Workflow API (ADK 2.0): nodes, edges, fan-out/fan-in, HITL, parallel processing. Use when you need explicit graph topology.
curl https://adk.dev/llms.txtDocs index (every page title + URL). Fetch it, then WebFetch the specific page for anything beyond the cheatsheets.
Installed ADK packageExact signatures and symbols — inspect the source (see "Inspecting ADK Source Code" in references/adk-python.md).

Related Skills

  • /google-agents-cli-workflow — Development workflow, coding guidelines, and operational rules
  • /google-agents-cli-scaffold — Project creation and enhancement with agents-cli scaffold create / scaffold enhance
  • /google-agents-cli-eval — Evaluation methodology, dataset schema, and the eval-fix loop
  • /google-agents-cli-deploy — Deployment targets, CI/CD pipelines, and production workflows

Skills เพิ่มเติมจาก google

google-agents-cli-eval
google
ทักษะนี้ควรใช้เมื่อผู้ใช้ต้องการ "รันการประเมิน", "ประเมิน ADK agent ของฉัน", "เขียนชุดข้อมูลประเมิน", "วิเคราะห์ข้อผิดพลาดในการประเมิน", "เปรียบเทียบผลการประเมิน", "ปรับแต่ง agent" หรือต้องการคำแนะนำเกี่ยวกับระเบียบวิธีการประเมินของ Agent Platform และ Quality Flywheel ครอบคลุมเมตริกการประเมิน โครงสร้างชุดข้อมูล การให้คะแนนแบบ LLM-as-judge และสาเหตุข้อผิดพลาดทั่วไป ห้ามใช้สำหรับรูปแบบโค้ด API (ใช้ google-agents-cli-adk-code), การปรับใช้ (ใช้ google-agents-cli-deploy) หรือการสร้างโครงโปรเจกต์ (ใช้...
developmenttestingdata-analysis
google-agents-cli-workflow
google
ทักษะนี้ควรใช้เมื่อผู้ใช้ต้องการ "พัฒนาเอเจนต์", "สร้างเอเจนต์โดยใช้ ADK", "รันเอเจนต์ในเครื่อง", "ดีบักโค้ดเอเจนต์", "ทดสอบเอเจนต์", "ปรับใช้เอเจนต์", "เผยแพร่เอเจนต์", "ตรวจสอบเอเจนต์" หรือต้องการแนวทางการพัฒนาและโค้ดของ ADK (Agent Development Kit) จุดเริ่มต้นสำหรับการสร้างเอเจนต์ ADK ทำงานตลอดเวลา — ให้เวิร์กโฟลว์เต็มรูปแบบ (โครงสร้าง, สร้าง, ประเมิน, ปรับใช้, เผยแพร่, สังเกตการณ์), กฎการรักษาโค้ด, คำแนะนำในการเลือกโมเดล และ...
developmentdevopstesting
google-agents-cli-deploy
google
ทักษะนี้ควรใช้เมื่อผู้ใช้ต้องการ "ปรับใช้เอเจนต์", "ปรับใช้ ADK เอเจนต์ของฉัน", "ตั้งค่า CI/CD", "กำหนดค่าความลับ", "แก้ไขปัญหาการปรับใช้" หรือต้องการคำแนะนำเกี่ยวกับ Agent Runtime, Cloud Run หรือเป้าหมายการปรับใช้ GKE ครอบคลุมขั้นตอนการปรับใช้ บัญชีบริการ การย้อนกลับ และโครงสร้างพื้นฐานสำหรับการผลิต เป็นส่วนหนึ่งของชุดทักษะ Google ADK (Agent Development Kit) ห้ามใช้สำหรับรูปแบบโค้ด API (ให้ใช้ google-agents-cli-adk-code) การประเมินผล (ให้ใช้ google-agents-cli-eval) หรือ...
developmentdevops
google-agents-cli-scaffold
google
This skill should be used when the user wants to "create an agent project", "start a new ADK project", "build me a new agent", "add CI/CD to my project", "add deployment", "enhance my project", or "upgrade my project". Part of the Google ADK (Agent Development Kit) skills suite. Covers `agents-cli scaffold create`, `scaffold enhance`, and `scaffold upgrade` commands, template options, deployment targets, and the prototype-first workflow. Do NOT use for writing agent code (use...
developmentdevops
google-agents-cli-observability
google
ทักษะนี้ควรใช้เมื่อผู้ใช้ต้องการ "ตั้งค่าการติดตาม", "ตรวจสอบเอเจนต์ ADK ของฉัน", "กำหนดค่าการบันทึก", "เพิ่มความสามารถในการสังเกตการณ์", "ดีบักทราฟฟิกที่ใช้งานจริง" หรือต้องการคำแนะนำเกี่ยวกับการตรวจสอบเอเจนต์ ADK (Agent Development Kit) ที่ปรับใช้แล้ว ครอบคลุม Cloud Trace, การบันทึก prompt-response, BigQuery Agent Analytics, การบูรณาการกับบุคคลที่สาม (AgentOps, Phoenix, MLflow, ฯลฯ) และการแก้ไขปัญหา เป็นส่วนหนึ่งของชุดทักษะ Google ADK (Agent Development Kit) ห้ามใช้สำหรับการตั้งค่าการปรับใช้ (ใช้...
developmentdevopsapi
google-agents-cli-publish
google
ทักษะนี้ควรใช้เมื่อผู้ใช้ต้องการ "เผยแพร่เอเจนต์", "เผยแพร่เอเจนต์ ADK ของฉัน", "ลงทะเบียนเอเจนต์กับ Gemini Enterprise", "เผยแพร่ไปยัง Gemini Enterprise" หรือต้องการคำแนะนำเกี่ยวกับคำสั่ง agents-cli publish gemini-enterprise ครอบคลุมโหมดการลงทะเบียน ADK เทียบกับ A2A การใช้งานแบบโปรแกรมและแบบโต้ตอบ การอ้างอิงแฟล็ก การตรวจจับอัตโนมัติจากข้อมูลเมตาการปรับใช้ และการแก้ไขปัญหา เป็นส่วนหนึ่งของชุดทักษะ Google ADK (Agent Development Kit) ห้ามใช้สำหรับการปรับใช้ (ใช้...
developmentdevopsapi