Skip to content

[BUG]: Tool not found for Data Science agent #676

@magallardo

Description

@magallardo

data_science

Description of issue

After running a few interactions with the agent, I get the error below

Environment

e.g.

  • OS & Architecture: macOS 14.1 (Apple Silicon/arm64)
  • Python version: 3.12

Reproduction steps or code

- Hi, what data do you have access to?
- I need more details in the train table. What countries exist? How many stores are there?
- Please generate a plot with total sales per country.
- What kinds of forecasting models can I train in BQML?
- Yes
- Approved
- Yes
- yes
- 30 days
- Italy

Error log


  GoogleTool(
2025-11-20 17:01:40,688 - ERROR - adk_web_server.py:1404 - Error in event_generator: Function call_analytics_agent is not found in the tools_dict.
Traceback (most recent call last):
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/cli/adk_web_server.py", line 1394, in event_generator
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/runners.py", line 428, in run_async
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/runners.py", line 412, in _run_with_trace
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/runners.py", line 498, in _exec_with_plugin
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/runners.py", line 401, in execute
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/agents/base_agent.py", line 307, in run_async
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/agents/base_agent.py", line 297, in _run_with_trace
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/agents/llm_agent.py", line 395, in _run_async_impl
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 356, in run_async
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 424, in _run_one_step_async
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 522, in _postprocess_async
    async for event in agen:
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 645, in _postprocess_handle_function_calls_async
    if function_response_event := await functions.handle_function_calls_async(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/functions.py", line 198, in handle_function_calls_async
    return await handle_function_call_list_async(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/functions.py", line 244, in handle_function_call_list_async
    function_response_events = await asyncio.gather(*tasks)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/functions.py", line 278, in _execute_single_function_call_async
    tool, tool_context = _get_tool_and_context(
                         ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/test/google/adk-samples/python/agents/data-science/.venv/lib/python3.12/site-packages/google/adk/flows/llm_flows/functions.py", line 649, in _get_tool_and_context
    raise ValueError(
ValueError: Function call_analytics_agent is not found in the tools_dict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestpythonPull requests that update python code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions