現象
GoogleのAgent Development Kitで adk web
コマンドを実行し、 http://127.0.0.1:8000
にアクセスしたところ、下図のように「Failed to load agents. To get started, run adk web in the folder that contains the agents. Warning: No agents found in current folder.」が表示されました。
環境
項目 | バージョン |
---|---|
OS | macOS Sequoia 15.6.1 |
Google ADK | 1.13.0 |
原因
adk web
コマンド実行時に、カレントディレクトリを agent.py
のあるディレクトリにしていたため。
例えば、以下のディレクトリ構造でカレントディレクトリが leisure_recommend
の場合、No agents found in current folder.
が表示されます。
google_adk/
└── leisure_recommend/
└── agent.py
解決策
カレントディレクトリを agent.py
が格納されているディレクトリ、前述の例における google_adk
に移動してから adk web
を実行すると、正しくエージェントが検出されるようになります。