-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
get_fast_api_app() crashes when agent modules contain the new App class (introduced in ADK 1.14.0+) during graph visualisation with "ValueError: Unsupported tool type".
To Reproduce
Steps to reproduce the behaviour:
- Create agent module with both
root_agentandAppobjects - Use
get_fast_api_app()to serve the agent for Google Cloud Run deployment following Deploy - Cloud Run - Python - gcloud - CLI - Access the graph visualisation endpoint
- See error:
ValueError: Unsupported tool type
Minimal reproduction code:
# agent/agent.py
from google.adk.agents.llm_agent import LlmAgent
from google.adk.apps import App
from google.adk.plugins.base_plugin import BasePlugin
class MyPlugin(BasePlugin):
pass
root_agent = LlmAgent(model="gemini-2.0-flash", name="agent", ...)
app = App(name="app", root_agent=root_agent, plugins=[MyPlugin()])# main.py
from google.adk.cli.fast_api import get_fast_api_app
app = get_fast_api_app(agents_dir="./agent", ...)Expected behaviour
get_fast_api_app() should either handle App objects properly or ignore them during agent discovery. The web interface should work without crashing the graph visualisation endpoint.
Screenshots
Desktop (please complete the following information):
- OS: macOS
- Python version(python -V): 3.13
- ADK version(pip show google-adk): google-adk==1.14.1
Model Information:
- Are you using LiteLLM: No
- Which model is being used(e.g. gemini-2.5-pro): gemini-2.5-flash
Additional context
This is a regression introduced in ADK 1.14.0 with the new App class. The issue occurs in agent_graph.py line 77 where get_node_name() doesn't recognise App class objects, only LlmAgent/Agent types.
Workarounds tested:
- Renaming App variable ❌
- Standard project structure ❌
- Using only root_agent ❌ (plugins require App class)
This affects users upgrading to ADK 1.14.0+ who need App class features (plugins, multi-agent, etc.).
Potential solutions:
- Update
get_node_name()to handle App objects - Filter out App objects in agent discovery
- Add full App class support to graph visualisation