Skip to content

Bug: get_fast_api_app() fails with App class - "ValueError: Unsupported tool type" #2959

@AlfredoJF

Description

@AlfredoJF

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:

  1. Create agent module with both root_agent and App objects
  2. Use get_fast_api_app() to serve the agent for Google Cloud Run deployment following Deploy - Cloud Run - Python - gcloud - CLI
  3. Access the graph visualisation endpoint
  4. 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:

  1. Update get_node_name() to handle App objects
  2. Filter out App objects in agent discovery
  3. Add full App class support to graph visualisation

Metadata

Metadata

Labels

web[Component] This issue will be transferred to adk-web

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions