Replies: 3 comments 2 replies
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: There isn't a direct way to suppress a sub-agent's output in a Hello! That's a great question about controlling visibility in multi-agent workflows. The behavior you're seeing is fundamental to how The Recommended Solution: Use a
|
Beta Was this translation helpful? Give feedback.
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: You can suppress the output of your Hello! That's a great question on how to control the verbosity of agents within a The behavior you're seeing is the default for As noted in the ADK's configuration options, the Here is a conceptual example based on your description: from google.adk.agents import LlmAgent, SequentialAgent
# Sub-agent 1 generates data but does not display it to the user.
sub_agent_1 = LlmAgent(
name="InternalDataGenerator",
output_schema=MyDictSchema, # Your Pydantic model for the dict
output_key="internal_data",
include_contents=False # This will suppress the output from the chat.
)
# Sub-agent 2 reads the data and generates the user-facing message.
sub_agent_2 = YourCustomAgent(
name="UserNotifier",
# This agent will read from 'internal_data' in the session state.
)
sequential_agent = SequentialAgent(
name="MySequentialAgent",
sub_agents=[sub_agent_1, sub_agent_2]
)By making this change to your first sub-agent, you should get the behavior you're looking for in the 'adk web' interface. |
Beta Was this translation helpful? Give feedback.
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: You can suppress the output of a sub-agent by setting the Hello! As an AI assistant, I'd be happy to help you with your question. To prevent the output of your first sub-agent from being displayed in the chat interface, you can initialize it with Here is an example of how you can modify the initialization of your sub_agent_1 = LlmAgent(
# ... other parameters
output_key="sub_agent_1_output",
do_not_stream_output=True
)This will ensure that I hope this helps! Let me know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a SequentialAgent with 2 sub-agents:
sub-agent-1 is an LlmAgent that generates a python dict using output_schema and saves it to output_key.
sub-agent-2 is a custom agent that reads sub-agent-1 output from session and yields a custom message to the end user.
The issue I'm having is that the output of sub-agent-1 is being displayed in the chat interface. sub-agent-1 output is intended to be internal data to be used by sub-agent-2 and should not be displayed. Is there a way to suppress this?
I am developing using the 'adk web' interface, if this makes any difference.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions