Describe the Bug:
Runner reports App name mismatch detected warning when app_name is set to SFC_agent, but the root agent uses the official base class google.adk.Agent (defined in google/adk/agents), which is inferred as agents, causing a WARNING on every startup.
Steps to Reproduce:
- Install
google-adk==1.20.0 in Docker slim environment with Python 3.12
- Create a root agent using
google.adk.Agent base class directly
- Run
adk api_server --host 0.0.0.0 --port 8080 with app_name set to SFC_agent (or default from working directory)
- Send any request to the API
- Observe WARNING in logs:
WARNING - App name mismatch detected. The runner is configured with app name "SFC_agent", but the root agent was loaded from ".../site-packages/google/adk/agents", which implies app name "agents".
Expected Behavior:
- Explicitly set
app_name should override the inferred result without generating a warning; or
- Provide an option to disable/ignore this check; or
- Document that using the built-in base class directly will trigger this check and provide recommended practices
Observed Behavior:
Every startup generates WARNING:
WARNING - App name mismatch detected. The runner is configured with app name "SFC_agent", but the root agent was loaded from ".../site-packages/google/adk/agents", which implies app name "agents".
Environment Details:
- ADK Library Version (pip show google-adk): 1.20.0
- google cloud run
- Python Version (python -V): 3.12
Model Information:
- Are you using LiteLLM: No
- Which model is being used: gemini-3-flash-preview
🟡 Optional Information
Regression:
N/A - First version used
Logs:
WARNING - App name mismatch detected. The runner is configured with app name "SFC_agent", but the root agent was loaded from ".../site-packages/google/adk/agents", which implies app name "agents".
Screenshots / Video:
N/A
Additional Context:
Workaround: Define a local subclass class RootAgent(Agent): pass in the project and use it, so the inferred path falls within the project package, which eliminates the warning.
Minimal Reproduction Code:
from google.adk import Agent
def get_current_time(city: str) -> dict:
return {"status": "success", "city": city, "time": "10:30 AM"}
root_agent = Agent(
model="gemini-3-flash-preview",
name="root_agent",
description="Tells the current time in a specified city.",
instruction="Use get_current_time.",
tools=[get_current_time],
)
How often has this issue occurred?:
Describe the Bug:
Runner reports
App name mismatch detectedwarning whenapp_nameis set toSFC_agent, but the root agent uses the official base classgoogle.adk.Agent(defined ingoogle/adk/agents), which is inferred asagents, causing a WARNING on every startup.Steps to Reproduce:
google-adk==1.20.0in Docker slim environment with Python 3.12google.adk.Agentbase class directlyadk api_server --host 0.0.0.0 --port 8080with app_name set toSFC_agent(or default from working directory)WARNING - App name mismatch detected. The runner is configured with app name "SFC_agent", but the root agent was loaded from ".../site-packages/google/adk/agents", which implies app name "agents".Expected Behavior:
app_nameshould override the inferred result without generating a warning; orObserved Behavior:
Every startup generates WARNING:
Environment Details:
Model Information:
🟡 Optional Information
Regression:
N/A - First version used
Logs:
Screenshots / Video:
N/A
Additional Context:
Workaround: Define a local subclass
class RootAgent(Agent): passin the project and use it, so the inferred path falls within the project package, which eliminates the warning.Minimal Reproduction Code:
How often has this issue occurred?: