Slide 6
Slide 6 text
4.
主要コンポーネントのコードリーディング (2/3)
ルートエージェント ( travel_concierge/agent.py )
の例 (
簡略版)
from google.adk.agents import Agent
from travel_concierge import prompt
from travel_concierge.sub_agents.inspiration.agent import inspiration_agent
# ... 他のサブエージェントやツールをインポート ...
travel_concierge_agent = Agent(
name="travel_concierge_root_agent",
model="gemini-1.5-flash", # 使用するLLMモデル
description="A travel concierge agent...",
instructions=prompt.ROOT_AGENT_INSTRUCTIONS, # エージェントへの指示
sub_agents=[inspiration_agent, /* ... */], # サブエージェントのリスト
tools=[/* ... */], # 利用可能なツールのリスト
)
Agent クラスのインスタンスとして定義します。
主要な設定項目: name , model , description , instructions , sub_agents , tools 。
6