ADK가 뭐지?
추상화가 엄청 잘 돼 있는 AI Agent 개발 kit다
구글에서 만들었고 그렇다보니 Gemini 나 구글 생태계에 최적화 돼 있긴하지만 특정 모델이나 배포환경에 종속되지 않고 다른 프레임워크와도 호환되도록 설계됐다.
Java나 Python 코드 베이스로 에이전트 로직, 도구 및 오케스트레이션을 직접 정의할 수 있다.

장점
- 멀티 에이전트 시스템 설계 : 여러 에이전트를 계층적으로 구성해서 AgentTool 호출을 사용해서 모듈식의 확장 가능한 솔류션을 구할 수 있다.
- 풍부한 도구 생태계 : 사용자 지정함수 (FunctionTool)이나 AgentTool 도구로 외부 의존성(DB,검색) 와의 상호작용을 지원한다.
- 유연한 오케스트레이션 : LLM기반 동적 라우팅을 함께 사용해서 복잡한 에이전트 플로우 구성 가능
- 통합 개발자 도구 : 로컬에서도 쉽게 개발 가능 UI 와 CLI 지원
- 네이티브 스트리밍 지원 : 양방향 스트리밍을 기본적으로 지우너해서 실시간 대화형 환경 구축 가능
근데 아직 사용해보지 않은 지금 이 시점에서는 너무 추상화 돼서 오히려 핏한 AI Agent서비스를 만들기에는 부적합하지 않나? 그냥 langchain써서 fit하게 만드는게 비즈니스 요구사항에 맞추기 더 쉽지않을까? 하는 우려가 있다. 일단 공부 ㄱㄱ
빠른 시작
# 가상 환경 생성
python -m venv .venv
# 가상 환경 활성화 (macOS/Linux)
source .venv/bin/activate
# ADK 설치
pip install google-adk
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() == "new york":
return {
"status": "success",
"report": (
"The weather in New York is sunny with a temperature of 25 degrees"
" Celsius (77 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() == "new york":
tz_identifier = "America/New_York"
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 the time and weather in a city."
),
tools=[get_weather, get_current_time],
)
gemini 키 받아서 env설정하고 명령줄에 adk web을 치면 디버깅할 수 있는 ui 서버가 띄워진다


QuickStart 테스트 끝
'AI' 카테고리의 다른 글
| ADK(Agent Development Kit) 스터디 1주차 (3) Workflow agent 개념 (0) | 2025.07.14 |
|---|---|
| ADK(Agent Development Kit) 스터디 1주차 (2) agent and Tools (1) | 2025.07.14 |
| ADK(Agent Development Kit) 스터디 1주차 (0) 사전준비 (2) | 2025.07.08 |
| LangChain study 1주차 (2) | 2025.06.10 |
| Google Cloud Model Armor 정리 (1) | 2025.05.02 |