adk-web icon indicating copy to clipboard operation
adk-web copied to clipboard

ADK web eats up error and never responds

Open shobsi opened this issue 3 months ago • 3 comments

** Please make sure you read the contribution guide and file the issues in the right place. ** Contribution guide.

Describe the bug I am running an agent with ToolboxSyncClient. The agent.py looks like this:

from google.adk.agents.llm_agent import Agent
from toolbox_core import ToolboxSyncClient

toolbox = ToolboxSyncClient("http://127.0.0.1:5000")

#Load all the tools
tools = toolbox.load_toolset('my-bq-toolset')

root_agent = Agent(
    model='gemini-2.5-flash',
    name='root_agent',
    description='''An intelligent eCommerce analytics agent that helps users understand product performance, customer return behavior, and order issues using real-time data from BigQuery. The agent uses three tools powered by Model Context Protocol (MCP) to retrieve and explain insights related to - Returned orders and customer issues, - Best-selling product trends, - High-return customers and potential churn risks.''',
    instruction='''You are a helpful agent who can answer natural language questions about order cancelled, product sales performance, and customer return rates. It uses two tools. Select the appropriate tool based on the user's intent.
  - Use the most_recent_cancelled_order tool when the user is asking about the most recent  order that was cancelled.
  - Use the ask_data_insights tool  for any question that does not fit the other three tools. This tool is designed to answer complex, ad-hoc data analysis questions.
Always respond in a clear and business-friendly tone. Where appropriate, summarize numerical values in round figures. If a tool returns no results, acknowledge that politely and suggest refining the question''',
tools=tools,
)

where the tools.yaml looks like

sources:
  my-bq-source:
    kind: bigquery
    project: iamtests-315719
    location: US

tools:
  most_recent_cancelled_order:
    kind: bigquery-sql
    source: my-bq-source
    description: Find most recent cancelled order for a user.
    parameters:
      - name: user_id
        type: string
        description: the user_id to search in orders table.
    statement: SELECT o.order_id,o.status AS order_status,o.created_at AS order_date,oi.product_id,p.name AS product_name,oi.sale_price,oi.status AS item_status,oi.returned_at FROM `thelook_ecommerce.orders` o JOIN `thelook_ecommerce.order_items` oi ON o.order_id = oi.order_id JOIN `thelook_ecommerce.products` p ON oi.product_id = p.id WHERE CAST(o.user_id AS STRING) = ?  AND oi.status = 'Cancelled' ORDER BY o.created_at DESC,oi.created_at DESC LIMIT 1;
  ask_data_insights:
    kind: bigquery-conversational-analytics
    source: my-bq-source
    description: Analyzes and answers complex, ad-hoc, or analytical questions about your business data that cannot be answered by the other available tools. This tool is used as a fallback when other tools cannot answer. Use The projectId as iamtests-315719 and datatsetId as look_ecommerce and tableId are users, products, orders and order_items.
toolsets:
  my-bq-toolset:
    - most_recent_cancelled_order
    - ask_data_insights

There are some configuration issues in the tools.yaml, but that's not the point here. In fact that's what that helped discover the bad user experience.

For a user question ask_data_insights tool is triggers, but no response was given to the user. On the terminal you can clearly see that an error was returned from the tools execution.

To Reproduce Please share a minimal code and data to reproduce your problem. Steps to reproduce the behavior:

  1. Install adk-python and toolbox-core
  2. Create an agent with agent.py as mentioned above
  3. Run adk web from the terminal
  4. Open http://127.0.0.1:8000/dev-ui/
  5. Ask question, e.g. "select 5 users from thelook_ecommerce dataset who have had more than 2 cancelled orders"
  6. Observe paste/5616836762402816 on the terminal

Expected behavior When ask_data_insights tool call failed, it should have been clearly communicated to the user with the reason.

Screenshots

  1. screen/A9e7zdwyqe5Rk3C
  2. screen/Bi5RZTCU4Z59n6V

Desktop (please complete the following information):

  • OS: [e.g. macOS, Linux, Windows]
  • Python version(python -V):
  • ADK version(pip show google-adk):

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used(e.g. gemini-2.5-flash)

Additional context Add any other context about the problem here.

shobsi avatar Sep 16 '25 02:09 shobsi

Hello @shobsi can you please reattach the screenshots in the chat? looks like they got missing in the process.

akshaypachpute-1998 avatar Sep 24 '25 14:09 akshaypachpute-1998

Image This is what I am able to see on the ADK web UI

akshaypachpute-1998 avatar Sep 25 '25 08:09 akshaypachpute-1998

Image

This is what we are getting with all the correct configuration.

I still acknowledge the issue with the ADK eating up the error logs and never responds and I am checking root cause for this.

akshaypachpute-1998 avatar Sep 25 '25 08:09 akshaypachpute-1998