Rate this post

This article explains the concept of executing an agent within a Power Automate flow, how the process works, and when to use different execution actions. It also walks through a practical scenario demonstrating how one agent can trigger a flow that calls another agent to perform independent processing.

Understanding the Concept of Executing an Agent

Executing an agent is an action within a Power Automate flow that allows you to call an agent and trigger it to perform specific steps.

When this action is used:

  1. The Power Automate flow sends a message to a Copilot agent to start a conversation.

  2. The flow immediately proceeds to the next step without waiting for the agent to complete processing.

For example, if the first action in a flow is Execute Agent, the flow will call the agent but will not wait for any response. It simply continues executing the next step in the flow.

When the Execute Agent Action Is Useful

This behavior is useful when you want to:

  • Initiate an independent conversation

  • Trigger a background operation

  • Execute an agent whose results are not required in the overall workflow

In other words, if an agent performs an activity independently after being triggered — and that activity does not affect the rest of the flow — then Execute Agent is the correct action to use.

This type of execution is asynchronous, meaning:

  • The agent runs independently

  • The flow continues immediately

  • The agent’s output cannot be reliably used in subsequent flow steps

Execute Agent vs Execute Agent and Wait

There are two related actions:

Execute Agent

  • Asynchronous

  • Calls the agent and continues immediately

  • Does not wait for a response

  • Cannot reliably use agent output

Execute Agent and Wait

  • Synchronous

  • Calls the agent and waits for processing to complete

  • Returns a response that can be used in later steps

In simple terms:

  • Use Execute Agent if you only need to trigger the agent

  • Use Execute Agent and Wait if you need the agent’s response

Parameters and Response Structure

When executing an agent, you can pass the following parameters:

  • Conversation ID

  • Environment ID

  • Body or message

The agent can return:

  • Agent response body

  • Conversation ID

  • Agent response

However, when using asynchronous execution, the flow may move forward before the agent finishes processing. Because of this timing issue, the returned response may not be available or meaningful at the moment the flow attempts to use it.

Therefore, relying on agent output in asynchronous execution typically does not make sense.

Example Scenario: Calling an Agent from a Flow

Consider an example where a cruise ship agent exists. The goal is to call this agent using a Power Automate flow.

Environment Requirements

A common mistake is creating the agent and the flow in different environments. To avoid errors:

  • The agent and flow must exist in the same environment

  • The flow should be solution-aware

  • Create or select a solution within the correct environment before building the flow

You can either:

  • Create a custom solution

  • Use an existing solution associated with your agent

Creating the Flow

Once inside the solution:

  1. Create a new automated flow

  2. Name the flow appropriately (for example, “Execute Agent Feb 2026”)

  3. Add triggers such as:

    • When an agent calls the flow

    • Respond to the agent

Save the flow and ensure it is properly renamed.

Flow Structure and Logic

Inside the flow:

  • The trigger allows an agent to call the flow

  • The flow can process logic (for example, a compose action)

  • The Execute Agent action is added to call another agent

You can select which agent to call and pass parameters such as a message.

Example message passed to the agent:

cruise from Netherlands

The flow may also include logic for responding to Copilot, handling inputs, and defining output parameters.

However, if asynchronous execution is used, output values may be empty because processing might not yet be complete when the flow reaches the response step.

Why Agent Output May Not Be Available

Here is what happens during asynchronous execution:

  1. Flow execution reaches Execute Agent

  2. The flow calls the agent

  3. The agent begins processing

  4. The flow immediately continues running

Since the agent is still processing, response values may not exist yet. That is why output handling often provides no meaningful data in this scenario.

Publishing the Flow

If no output is required, remove unnecessary response variables and publish the flow.

At this point:

  • The flow calls the cruise ship agent

  • The agent processes independently

Calling the Flow from Another Agent

Next, another agent (for example, an ALM demo agent) can call the flow.

Steps:

  1. Create a new topic inside the second agent

  2. Define an intent such as “cruise details”

  3. Add a tool that executes the flow created earlier

Now the architecture looks like this:

Agent A → calls flow → flow calls Agent B → Agent B processes independently

Execution Behavior

When the second agent is triggered:

  1. The topic is identified

  2. The flow execution begins

  3. Authentication may be required

  4. The flow calls the cruise ship agent

  5. The cruise ship agent processes the message independently

The calling agent does not need the response from the cruise ship agent.

Monitoring Execution

To verify execution:

  • Check the run history of the flow

  • Confirm successful execution

  • Review agent activity logs

The cruise ship agent will show activity triggered through the flow, including:

  • The message passed (“cruise from Netherlands”)

  • Processing performed

  • Generated response

Even though a response exists, it was not required for the original workflow.

Typical Use Cases for Execute Agent

This action is ideal when triggering independent activities such as:

  • One-time background operations

  • Scheduled services (daily, weekly, etc.)

  • On-demand processes

  • Independent processing tasks

  • System maintenance or automation jobs

The key idea: the agent runs independently and its output is not needed.

Summary

Executing an agent in Power Automate allows a flow to trigger agent activity.

There are two execution approaches:

  • Execute Agent

    • Asynchronous

    • Triggers processing only

    • Does not wait for response

  • Execute Agent and Wait

    • Synchronous

    • Waits for processing

    • Returns response

If your goal is simply to trigger an independent agent operation, use Execute Agent. The flow will send the message, continue execution, and return control without waiting for results.

If you need the agent’s output, use Execute Agent and Wait instead.