We're using llamaindex agents created via FunctionCallingAgentWorker.from_tools and some of our tools are other agents or return the result of calling chat with another agent. We've noticed that the final reply from the agent which calls the tool often appears to be responding to the result of its own tool call, and ignoring the user's message.
Why might this be happening and is there any way to ensure that the result of a tool call informs the agent's response to the user, instead of being responded to by the agent?
Nailed it Logan! That seems to have worked, prepended the response with "This is tool output, use it to inform your response to the user instead of responding to it directly"