Skip to content

The agent doesn't work as expected when "skip_summarization" is set to True in AgentToolΒ #3881

@slilichenko

Description

@slilichenko

In the code, the skip_summarization of Agent Tool causes the parent context to emit an event with "is_final_response()" returning True. This causes base flow interruption, which means that the loop ends with the last function response. But most of the UIs, including ADK web, don't display the output of the tool response and it appears that the agent is stuck. Furthermore, if the agent is supposed to continue working on the response, perhaps by calling other tools with the output of the first AgentTool call as input - it does't happen because the response is marked as final.

The documentation is a bit confusing because a) it doesn't cover these nuances and b) if you open the code snippet the "how it works session" covers what's not in the code (it describes what the way things works with skip_summarization = False).

IMHO, it's a code bug or a design flaw, or a documentation bug. A reproducible case: if you update this simple agent to use skip_summarization - the answer is never displayed to the user via ADK web interface. The skip summarization path generates 4 events vs 5 with summarization; the last event being the function response (and the function response text is never displayed in the ADK web UI). Happy to provide detailed screenshots if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    core[Component] This issue is related to the core interface and implementation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions