นำเข้าเอเจนต์ Google ADK — เอเจนต์เดียวบน Gemini
Agent Config ของaggrega import โดย
นำ
| โฟลเดอร์ | สิ่ง |
|---|---|
source/ | การsupport_agent/root_agent.yaml ไฟล์ .aggrega-config.yaml ที่support_agent/import-answers.yaml ซึ่ง |
draft/ | ไฟล์aggrega import support_agent --target compose เขียน โดยrelease.lock และstdout.txt สำหรับimport.txt สำหรับ |
การ
ใน checkout ของcheck.sh รันdraft/ เปรียบAGGREGA_CATALOG_DIRS
ร่างตัวอย่าง
คุณ
เขียน
aggrega draft --example import-google-adkจาก
cd import-google-adkบิลด์
การนำsource/ โดยAGGREGA_CATALOG_DIRS หรือworkspace.catalog_dirs — จะsupport_agent/import-answers.yaml แล้ว pull สิ่ง
cd sourceaggrega import support_agent --target composeaggrega build --release release.yamlอิมเมจ
กับผู้ช่วย AI
ผู้
ใช้เครื่องมือของ Aggrega เท่านั้น และอย่าสร้างโฟลเดอร์เอง หากโฟลเดอร์พื้นที่ทำงานยังไม่มีโฟลเดอร์ `import-google-adk` ให้เรียกเครื่องมือ `draft` หนึ่งครั้งโดยตั้ง `example` เป็น `import-google-adk` และไม่ระบุ `dir` เครื่องมือจะเขียนตัวอย่างลงในโฟลเดอร์ `import-google-adk` ใหม่ ซึ่งโฟลเดอร์ `source` ของโฟลเดอร์นั้นเก็บสิ่งที่ตัวอย่างนี้นำเข้า จากนั้นเรียกเครื่องมือ `import` โดยตั้ง `workspace_root` เป็น `import-google-adk/source` ตั้ง `source` เป็น `support_agent` และตั้ง `target` เป็น `compose` เครื่องมือจะอ่านคำตอบที่ต้องใช้จาก `import-answers.yaml` ที่อยู่ในโฟลเดอร์ `support_agent` เขียนร่างลงใน `import-google-adk/source` และ pull สิ่งที่ร่างเหล่านั้นต้องใช้ จากนั้นเรียกเครื่องมือ `validate` โดยตั้ง `workspace_root` เป็น `import-google-adk/source` และตั้ง `release` เป็น `release.yaml` และเรียกเครื่องมือ `build` โดยตั้ง `workspace_root` เป็น `import-google-adk/source` ตั้ง `release` เป็น `release.yaml` และตั้ง `write` เป็น true แล้วบอกฉันว่าบิลด์เขียนไฟล์ใดบ้าง ไฟล์เหล่านั้นอยู่ใน `import-google-adk/source/dist/`ทดสอบ
เมื่อDockerfile ของ
curl -sS -X POST http://127.0.0.1:8000/run -H 'Content-Type: application/json' \ -d '{"app_name": "support_agent", "user_id": "u1", "session_id": "s1", "new_message": {"role": "user", "parts": [{"text": "Where is my order 1234? Answer in one short sentence."}]}}'คีย์ Gemini ที่Internal Server Error และ
google.genai.errors.ClientError: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'API key not valid. Please pass a valid API key.', 'status': 'INVALID_ARGUMENT', [… omitted: the error's details]}}เมื่อ--target helm บน
kubectl port-forward -n <namespace> svc/support-agent-default 8000:8000