Skip to content

Inconsistent Agent Responses and Tool Selection in ADK — How to Enforce Retry or Recovery? #5454

@hitflame

Description

@hitflame

Title: Inconsistent Agent Responses and Tool Selection in ADK — How to Enforce Retry or Recovery?

Body:

Hi team,

I’ve been working with ADK agents and noticed some inconsistent behavior during execution. Specifically:

  • In some cases, the agent’s response does not follow the given instructions.
  • In other cases, the agent fails to select or invoke the appropriate tool when it should.

In these situations, I would like to have better control over the agent’s behavior—particularly the ability to trigger a retry or force the agent to “recover” and attempt the task again according to the original instructions.

My questions are:

  1. Is there a recommended way to enforce stricter adherence to instructions in ADK agents?
  2. Can we programmatically detect when the agent fails to follow instructions or skips tool usage?
  3. What mechanisms are available to trigger a retry or re-run of the agent in such cases?
  4. Are there best practices for guiding the agent to consistently choose tools when needed?

Any guidance or examples would be greatly appreciated.

Thanks!

Metadata

Metadata

Labels

core[Component] This issue is related to the core interface and implementationquestion[Component] This issue is asking a question or clarificationrequest clarification[Status] The maintainer need clarification or more information from the author

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions