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

Agent does not return a response when query takes too long

Open leebaro opened this issue 1 year ago • 6 comments

Hello.

I used the data science agent from the following adk-sample to query data from a database: https://github.com/google/adk-samples/tree/main/python/agents/data-science

From my observation, when I send a query that takes a long time to process, the agent starts running but does not provide any answer.

Instead of asking the same question again, when I simply request “Please give me the answer,” the agent responds without querying the database.

In summary, it seems that when the query takes too long, the agent ends its turn without returning an answer.

How can I resolve this issue when it happens?

Would using LongRunningFunctionTool help? If so, an example would be very helpful.

Image

leebaro avatar Aug 26 '25 07:08 leebaro

Did it give you the correct answer when you asked later, or it simply hallucinated?

boyangsvl avatar Aug 27 '25 03:08 boyangsvl

It gives me the correct answer.

leebaro avatar Aug 27 '25 05:08 leebaro

We have discovered an issue in the ADK on handling results from an agent tool. https://github.com/google/adk-python/pull/2745

Please try once this fix hit release (sometime next week). Or you can try using the ADK from GitHub source.

Please let me know if this fix works for you. Thanks!

boyangsvl avatar Aug 27 '25 05:08 boyangsvl

Thank you. I'll give it a try.

leebaro avatar Aug 28 '25 01:08 leebaro

@leebaro can you please verify if the change indeed fixes the issue you saw.

The fix was release last week (https://github.com/google/adk-python/releases/tag/v1.13.0)

For now, I am going to optimistically close this issue. Please, re-open it if you continue to face the problem.

ankursharmas avatar Sep 02 '25 21:09 ankursharmas

@ankursharmas Thank you. I will upgrade to 1.13.

leebaro avatar Sep 03 '25 02:09 leebaro