-
Notifications
You must be signed in to change notification settings - Fork 858
Description
Hi everyone, could you please help me with an unexpected behavior I’m seeing when using AG-UI?
I have a root agent (ADK) that orchestrates four subagents, which are used as tools.
I’m including a custom tool directly in the body of the /ag-ui request.
I tested two approaches:
1. In the messages field, I added a system role defining how the custom tool should be used, and also described it under "description".
2. In the second test, I removed the system role completely.
This custom tool must always be called at the end of the agent’s reasoning, to “format” the response for the frontend.
However, I’ve noticed some inconsistent behavior:
• Sometimes, the root_agent returns SSE messages (TEXT_MESSAGE_CONTENT) before calling the custom tool (which is fine).
• Other times, after a subagent response, the system calls the tool directly, without any assistant message being streamed beforehand.
Questions
• What is the expected behavior here?
Should the tool defined in the body request be visible to all agents (including subagents used as tools), or only to the root agent?
• Is there a way to force the execution of a tool through a request parameter?
ag-ui-adk==0.3.1
ag-ui-protocol==0.1.9