-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Summary
I'm trying to run a multi-agent setup using google-adk==1.9.0, structured as follows. When running adk web from one level above the main_agent directory, I get the following error:
{"error": "[WIP] _load_from_yaml_config: _load_from_yaml_config is not ready for use."}
I want to confirm if this is expected behavior or a bug in the ADK library.
Project Structure
main_agent/
- init.py
- agent.py
- agent_tools.py
- sub_agents/
-- sub_agent1/
--- init.py
--- agent.py
-- sub_agent2/
--- init.py
--- agent.py
-- sub_agent3/
--- init.py
--- agent.py
main_agent/agent.py
from .sub_agents.sub_agent1.agent import sub_agent_1
from .sub_agents.sub_agent2.agent import sub_agent_2
from .sub_agents.sub_agent3.agent import sub_agent_3
from google.adk.agents import Agent
from .agent_tools import tool_1, tool_2, tool_3
sub_agent_1.tools = [tool_1]
sub_agent_2.tools = [tool_2]
sub_agent_3.tools = [tool_3]
main_agent = Agent(
name="main_agent",
description="xxxxxxxx",
instruction="You are an agent xxxxxxxxxxxx.",
sub_agents=[sub_agent_1, sub_agent_2, sub_agent_3],
model="gemini-2.0-flash"
)
sub_agents/sub_agent1/agent.py (example)
from google.adk.agents import Agent
sub_agent_1 = Agent(
name="sub_agent_1",
description="xxxxxx",
tools=[],
instruction="xxxxxxxx",
model="gemini-2.0-flash"
)
Steps to Reproduce
Install google-adk==1.9.0
Run adk web from the directory one level above main_agent/
Observe the error message in the logs or browser:
json
Copy
Edit
{"error": "[WIP] _load_from_yaml_config: _load_from_yaml_config is not ready for use."}
Expected Behavior
ADK should be able to load agents defined purely in Python without relying on YAML configuration.
Environment
OS: 15.5 (24F74)
Python version: 3.12.4
google-adk version: 1.9.0
How you are running it: adk web
Additional Context
I am not using a .yaml file, just Python-based agent definitions.
Is _load_from_yaml_config being called automatically even if I define agents in Python?