Is there any way to retry the last tool call or task when LLM call throws error? #2756
-
So I'm creating an agent that calls multiple tools in succession, and there are times when the model is Overloaded and throws an error and breaks the workflow. Is there a way to catch the error and resume the rest of the tool call or task. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: You can handle errors and resume your workflow by using the Hi @ynaiborlang, that's a great question. Dealing with intermittent errors is a common challenge when building robust agents. The ADK provides several mechanisms to handle these situations: 1. Handling Tool Execution Errors with
|
Beta Was this translation helpful? Give feedback.
You can set the retry config on Gemini model so it retries automatically for you. https://github.com/google/adk-python/blob/main/src/google/adk/models/google_llm.py#L62