FR (Agents) - Add Input Variables and Structured Outputs

When creating an Agentic system you often have Agents calling other Agents. Currently, when this happens the 1st (or parent) Agent generates what it thinks it should pass along to the next Agent as a message. Without strict instructions, a single input to the 1st Agent can result in multiple different messages being generated to send to the 2nd Agent. You can lower Temperature to minimize these fluctuations in what's generated by the 1st Agent, but if we could define a JSON structure for the agent to use we can debug better and we can control what's sent to Agents down the pipeline. One of the problems I've seen is having to adjust the instructions every now and then for the 2nd and 3rd Agents to properly handle some weird input it got from a parent Agent. This naturally leads into Input Variables as well, both custom and built-in. Access to the variables used to call an Agent (like params.input or params.trigger_method) would let us use this information in the Instructions (like 1 Agent sending the basic instructions to a 2nd Agent who has instructions built around the output of the calling Agent like the pic below)

this is much harder to achieve using only strings

+1 Yes, structured outputs is a big lack at the moment. Would be great to have an eta for this.

I was thinking about this on my drive home and I realized it would probably be easier to just put a spot to add a transformer on the Agent GUI, then the structure of the output and mapping/casting to types and whatnot can be handled by us.... basically lets us handle post-processing at the Agent, which makes more sense (if Agents handle parameters when sending requests, shouldn't they handle the response as well?) than having us handle it in every location we use said Agent (or even worse, handling it in every Agent that uses it and having to add custom prompts for each) -- EEEEVVVIIILLLLL duplicate code