Share via

How to pass outputs from multiple agents as input to a downstream agent in Azure AI Foundry workflows

S K, Raghav 60 Reputation points
2026-01-07T05:25:49.9033333+00:00

In an Azure AI Foundry workflow, I have a sequential multi-agent setup where each agent performs a distinct task:

Agent 1 produces Output A

Agent 2 produces Output B

Both outputs are stored in separate workflow variables

The challenge arises with Agent 3, which needs to process both Output A and Output B together.

However, the InvokeAzureAgent action allows specifying only a single messages input variable. There is no clear or documented mechanism to:

Pass multiple agent outputs simultaneously

Merge or compose multiple agent outputs into a single, valid input for the next agent

Preserve clear separation of context while still enabling combined processing

Attempting to pass arrays or combined message structures results in execution or runtime issues, especially in Teams/Copilot scenarios where strict message normalization is enforced.


Clarification Needed

I would like guidance on the recommended and supported pattern to handle this scenario, specifically:

How to combine outputs from multiple agents into a single input for a downstream agent

Whether there is an official pattern (e.g., summarization, concatenation, or intermediate aggregation agent)

How to do this while remaining compatible with:

InvokeAzureAgent execution contracts

  Teams / Copilot workflows
  
     Text-only message normalization requirements
     

Expected Outcome

A supported workflow design that allows:

Multiple upstream agent outputs to be consumed by a single downstream agent

  • Clear orchestration without violating Foundry or Teams execution constraintsIn an Azure AI Foundry workflow, I have a sequential multi-agent setup where each agent performs a distinct task:
    • Agent 1 produces Output A
    • Agent 2 produces Output B
    • Both outputs are stored in separate workflow variables
    The challenge arises with Agent 3, which needs to process both Output A and Output B together. However, the InvokeAzureAgent action allows specifying only a single messages input variable. There is no clear or documented mechanism to:
    • Pass multiple agent outputs simultaneously
    • Merge or compose multiple agent outputs into a single, valid input for the next agent
    • Preserve clear separation of context while still enabling combined processing
    Attempting to pass arrays or combined message structures results in execution or runtime issues, especially in Teams/Copilot scenarios where strict message normalization is enforced.

    Clarification Needed

    I would like guidance on the recommended and supported pattern to handle this scenario, specifically:
    1. How to combine outputs from multiple agents into a single input for a downstream agent
    2. Whether there is an official pattern (e.g., summarization, concatenation, or intermediate aggregation agent)
    3. How to do this while remaining compatible with:
      • InvokeAzureAgent execution contracts
      • Teams / Copilot workflows
      • Text-only message normalization requirements

    Expected Outcome

    A supported workflow design that allows:
    • Multiple upstream agent outputs to be consumed by a single downstream agent
    • Clear orchestration without violating Foundry or Teams execution constraints
Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-01-07T05:26:05.9233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    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:

    1. 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.
    2. 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.
    3. 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 single messages input 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.
    4. 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.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.