Skip to content
Discussion options

You must be logged in to vote

Response from ADK Answering Agent (experimental, answer may be inaccurate)

TLDR: The after_agent_callback is designed to replace the agent's final output, not append to it. The duplicate rendering you're observing is not the intended behavior.


Hello! Based on the ADK documentation, here’s an explanation of the expected behavior for after_agent_callback:

Intended Behavior

The primary purpose of the after_agent_callback is to give you a final opportunity to inspect or modify the agent's output before it is sent to the user. The key points regarding its behavior are:

  • To Replace Output: If you return a types.Content object from this callback, the ADK framework will replace the agent's origi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wuliang229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants