Agent Development Kit (ADK) とは
Agent Development Kit (ADK) とは

Agent Development Kit (ADK) とは、AIエージェントの開発とデプロイのための柔軟でモジュール化されたフレームワークです。ADKは、一般的なLLM(大規模言語モデル)やオープンソースの生成AIツールと連携して使用でき、GoogleのエコシステムとGeminiモデルとの緊密な統合に重点を置いて設計されています。ADKを使うことで、GeminiモデルやGoogle AIツールを活用したシンプルなエージェントを簡単に始められる一方、より複雑なエージェントアーキテクチャやオーケストレーションに必要な制御と構造も提供します。
Let's get started !
Quick Start(what u can)
lets deep dive into official documents, modify it.
Configuration & Environments
Using GCP for Environment.
Config on terminal
pip install google-sdk #for install adk library
pip show google-sdk # (optional)for check installation
understanding contents in agent.py
import datetime
from zoneinfo import ZoneInfo
from google.adk.agents import Agent
def get_weather(city : str) -> dict:
"""Retrieves the current weather report for a specified city.
Args:
city (str): The name of the city for which to retrieve the weather report.
Returns:
dict: status and result or error msg.
"""
if city.lower() == "dublin":
return {
"status" : "sccess",
"report" : (
"The weather in Dublin is cloudy with a temperature of 8 degrees"
" Celsius (47 degrees Fahrenheit)."
),
}
else:
return {
"status" : "error",
"error_message" : f"Weather information for '{city}' is not available."
}
def get_current_time(city : str) -> dict:
"""Returns the current time in a specified city.
Args:
city (str): The name of the city for which to retrieve the current time.
Returns:
dict: status and result or error msg.
"""
if city.lower() == "dublin":
tz_identifier = "Europe/Dublin" #https://gist.github.com/Soheab/3bec6dd6c1e90962ef46b8545823820d#etc
else:
return {
"status": "error",
"error_message" : (
f"Sorry, I don't have timezone information for {city}."
)
}
tz = ZoneInfo(tz_identifier)
now = datetime.datetime.now(tz)
report = (
f'The current time in {city} is {now.strftime("%Y-%m-%d %H:%M:%S %Z%z")}'
)
return {"status": "success", "report": report}
root_agent = Agent(
name = "weather_time_agent",
model = "gemini-2.0-flash",
description = (
"Agent to answer questions about the. time and weather in a city."
),
instruction = (
"You are a helpful agent who can answer user questions about time and weather in a city."
),
tools = [get_weather, get_current_time]
)
name (Required): Every agent needs a unique string identifier. This name is crucial for internal operations, especially in multi-agent systems where agents need to refer to or delegate tasks to each other. Choose a descriptive name that reflects the agent's function (e.g., customer_support_router, billing_inquiry_agent). Avoid reserved names like user.
description (Optional, Recommended for Multi-Agent): Provide a concise summary of the agent's capabilities. This description is primarily used by other LLM agents to determine if they should route a task to this agent. Make it specific enough to differentiate it from peers (e.g., "Handles inquiries about current billing statements," not just "Billing agent").
model (Required): Specify the underlying LLM that will power this agent's reasoning. This is a string identifier like "gemini-2.0-flash". The choice of model impacts the agent's capabilities, cost, and performance. See the Models page for available options and considerations.
マンチカン航海士の知恵袋
マンチカン航海士が記事全文を読んでいるニャ... 🐾