Repository navigation
Closed
Closed
Copy link
Labels
eval[Component] This issue is related to evaluationrequest clarification[Status] The maintainer need clarification or more information from the author
Description
I have a root agent that I run via App so that I can handle its tool errors using ReflectAndRetryToolPlugin.
If I try to run evals for that agent, the evals use the root_agent directly, rather than via App
To Reproduce
Create a simple setup of an agent with a failing tool and an app using it, then create some evalset for it. The exception will not be handled
# Create the orchestrator agent with the AgentTools
root_agent = Agent(
name="SomeAgent",
model=ORCHESTRATOR_LLM_MODEL,
instruction=prompt,
tools=[
some_failing_tool
],
)
app = App(
root_agent=root_agent,
name="app",
plugins=[
ReflectAndRetryToolPlugin(
max_retries=3,
throw_exception_if_retry_exceeded=False, # Return message instead of raising
),
],
)
Expected behavior
I expect the evals to use the app rather then the agent if available
Desktop (please complete the following information):
- OS: macOs
- Python version(python -V): 3.13
- ADK version(pip show google-adk): 1.22
Model Information:
- Are you using LiteLLM: Yes/No: No
- Which model is being used(e.g. gemini-2.5-pro): gemini-2.5-pro
Additional context
Take a look at
adk-python/src/google/adk/cli/cli_tools_click.py
Lines 735 to 756 in a9b853f
| try: | |
| eval_service = LocalEvalService( | |
| root_agent=root_agent, | |
| eval_sets_manager=eval_sets_manager, | |
| eval_set_results_manager=eval_set_results_manager, | |
| user_simulator_provider=user_simulator_provider, | |
| ) | |
| inference_results = asyncio.run( | |
| _collect_inferences( | |
| inference_requests=inference_requests, eval_service=eval_service | |
| ) | |
| ) | |
| eval_results = asyncio.run( | |
| _collect_eval_results( | |
| inference_results=inference_results, | |
| eval_service=eval_service, | |
| eval_metrics=eval_metrics, | |
| ) | |
| ) | |
| except ModuleNotFoundError as mnf: | |
| raise click.ClickException(MISSING_EVAL_DEPENDENCIES_MESSAGE) from mnf |
It seems to me that LocalEvalService is using the root_agent directly
Reacted by kpopioek, Miłosz Poruba, Lucas Barzotto and seb-gyde
Metadata
Metadata
Assignees
Labels
eval[Component] This issue is related to evaluationrequest clarification[Status] The maintainer need clarification or more information from the author
Activity
Fix: Use App (with plugins) for eval when available
Fix: Use App (with plugins) for eval when available
Fix: Use App (with plugins) for eval when available
fix: Add AppInferenceAdapter to remove cli dependency and enable App-…
adk-bot commentedon Dec 18, 2025
Notification: The author has updated the issue description. Maintainers, please review.
adk-bot commentedon Dec 26, 2025
This issue has been automatically marked as stale because it has not had recent activity for 7 days after a maintainer requested clarification. It will be closed if no further activity occurs within 7 days.
surajksharma07 commentedon May 13, 2026
@klys-equinix the eval path calls EvaluationGenerator._generate_inferences_from_root_agent, which constructs Runner(agent=root_agent, ...) and completely bypasses the App, so any plugins registered there never fire.
Worth trying as a workaround: drive your eval turns directly via Runner(app=app, session_service=InMemorySessionService()) — that should keep your ReflectAndRetryToolPlugin active and give you the retry behaviour you're expecting.
If that works for your setup, the proper fix would need to thread the App reference through _generate_inferences_from_root_agent and use Runner(app=app) there instead.
Could you give the workaround a try and confirm it resolves things on your end ?
surajksharma07 commentedon May 25, 2026
@klys-equinix Just checked the current source — LocalEvalService still only accepts root_agent in its constructor through v2.1.0, so the App bypass hasn't been fixed.
EvaluationGenerator._generate_inferences_from_root_agent still constructs Runner(agent=root_agent) directly, meaning plugins on the App never fire during eval.
PR #3836 by @ishanrajsingh was closed without merging, so the fix didn't land.
If you'd like to upstream this, a fresh PR against the current codebase targeting LocalEvalService.init to accept an optional app parameter would be the right path.
In the meantime, driving eval turns directly via Runner(app=app, session_service=InMemorySessionService()) is the best interim workaround to keep ReflectAndRetryToolPlugin active.
Closing since there's been no update for two weeks — feel free to reopen with a repro or to track a new PR if you pick this up!