🤖

adk-pythonの__init__.pyのimportでつまづく(adk web)

に公開

https://github.com/google/adk-samples/tree/main/agents/llm-auditor/llm_auditor
上記のサンプルを参考にする。
ディレクトリ名が紛らわしいのでllm-auditor(root)/llm_auditorroot/llm_auditorとする。
rootadk webを実行する。たとえばuv run adk web

  • root/llm_auditor/__init__.py
from . import agent
  • root/llm_auditor/sub_agents/critic/__init__.py
from .agent import critic_agent
  • root/llm_auditor/sub_agents/critic/agent.py
critic_agent = Agent(
    model='gemini-2.0-flash',
    name='critic_agent',
    instruction=prompt.CRITIC_PROMPT,
    tools=[google_search],
    after_model_callback=_render_reference,
)

Discussion