Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
In Azure AI Foundry workflows, when dealing with a sequential multi-agent setup where you need to combine outputs from multiple agents into a single input for a downstream agent, you can follow these guidelines:
- Intermediate Aggregation Agent: Consider creating an intermediate agent that specifically handles the aggregation of outputs from Agent 1 and Agent 2. This agent can take both outputs as inputs, process them (e.g., concatenate or summarize), and then provide a single output that can be passed to Agent 3.
- Output Composition: If you need to merge outputs, you can define a structured format for the output from Agents 1 and 2. For instance, you could format the outputs as a JSON object or a string that clearly delineates the two outputs. This way, Agent 3 can parse the input appropriately.
- InvokeAzureAgent Usage: When using the
InvokeAzureAgent, ensure that the combined output from the intermediate agent adheres to the expected input format. Since the action allows only a singlemessagesinput variable, you might need to serialize the combined outputs into a single string or structured format that meets the normalization requirements for Teams/Copilot workflows. - Testing and Validation: Before deploying the workflow, thoroughly test the aggregation logic to ensure that it does not violate any execution contracts or message normalization requirements. This will help in identifying any potential runtime issues early on.
By following these steps, you can effectively manage the outputs from multiple agents while ensuring compatibility with Azure AI Foundry and Teams workflows.