I know how structured output parser works, it gets attached to an ai agent, but my question is, say I have 4-5 tools in the same AI agent like send email, create task, how can i tell each of my tools to output in a specific way like send email must output email, subject, body etc, task must have start date, end date, description, time etc, since I only have one structured output thats responsible for the whole agent but I have different fields expecting from each tools, how to acheive this?
Here’s a workflow that uses two sub agents to output different json formats and complete their job before going back to the main tool.
If this response helped you, please click the heart to show that it is useful If this response solved your issue, mark it as the solution to help the community
It will probably not be more expensive. Your agent that did everything all together was most likely running multiple times in a decision making process.
Determining what the need was, then sending something to a tool.
With this new approach, you are simply defining the path to have more control of the output.
If this response helped you, please click the heart to show that it is useful If this response solved your issue, mark it as the solution to help the community