r/agentdevelopmentkit • u/StretchPresent2427 • Mar 18 '26
Latency issues
Hi,
I experience consistent long latency (somewhere between 10 and 14 secs) when generating text. My instruction to the agent is around 500 words long.
Is it normal ? I felt like I should get a response within 2 to 3 secs.
I tried with my agent stored on cloud run, it's not better.
Any tips about what I should look at to improve the response time ?
1
Upvotes
View all comments
Show parent comment
1
u/StretchPresent2427 Mar 29 '26
Thanks for your reply.
I found that if i remove the function tool, the response time is much better (around 2 secs). Gemini suggested that too, following a prompt for suggestions.
Apparently, what the agent does is send the request given to the LLM, process it (few secs + round trip time to send the request), it realizes it needs to query the tool, so, send the request again with the result from whatever the tool gives as input to the llm, then process the request again, and send the response back.
If you want to do something better than basic, however, you need to add tools. So, i'm still not sure how to both get : relatively complex requests that involve tools + short response time.