Add an agent node to an agent flow

Note

This article reflects the classic experience in Microsoft Copilot Studio. The classic experience includes the classic authoring experiences for both agents and workflows. Learn about the two agent experiences in Classic vs. new agent experience. Learn about the two workflow experiences in Workflows overview.

The agent node lets a flow hand a step over to an AI agent that can reason, call tools, and pull from knowledge sources before returning a result. Use it whenever a step needs judgment, multi-step orchestration, or information from outside the flow itself.

By using the agent node, you can:

  • Call an existing agent.
  • Give the agent a natural-language instruction, including dynamic content from earlier steps.
  • Equip the agent with tools (Model Context Protocol (MCP) servers and connectors) so it can take action.
  • Ground the agent in knowledge (SharePoint sites, public websites) so it can answer from your content.
  • Use the agent's response in later steps of the flow.

In agent flows, you can either select an existing published agent or create a new published agent from the agent builder experience and then call it from the flow.

Add an agent node

  1. In Copilot Studio, go to Flows and open an existing agent flow or create a new one.

    • New flow: You land on the Designer page to configure a trigger.
    • Existing flow: You land on the Overview page, and you have to go to the Designer page.
  2. Select the Insert a new action icon at the point in the flow where you want to call an agent.

  3. In Add an action, under AI capabilities, select Run an agent. A Run an agent node appears in the flow.

Choose an existing agent for the agent node

In the run and agent editor, under Agent, you can select one of two options:

  • Select an existing agent: Select a published agent from a list. The agent runs with whatever instructions, tools, and knowledge it was already configured with.

  • Create a new agent: Select New to create a new agent. This opens a new browser tab with the agent builder experience. Build and publish your agent there, then return to the flow designer to select it from the list of existing agents.

If you select an existing agent, skip to Send a message to the agent.

Create a new agent for the agent node

When you select New, you open the agent builder experience in a new browser tab. In the agent builder, you configure the agent's instructions, knowledge, and capabilities.

When you finish building the agent, publish it, return to the flow designer, and select it from the list of existing agents.

Send a message to an existing agent

When you select an existing agent, the node shows a Message field. Use this field to tell the agent what to do for this run. The agent's instructions, tools, and knowledge are already set on the published agent.

In the Message field, write the prompt for this run. Use the dynamic content picker to insert tokens from earlier steps so the agent reasons over real run-time data.

Request human assistance when unsure

Turn on Request human assistance when unsure if you want the agent to escalate to a human when it can't proceed on its own. When an escalation occurs, the agent sends a request for input by email to the connection owner.

This option is useful when the agent's task might require interpretation that goes beyond its instructions or available knowledge. For example, if an agent is reviewing expense reports and finds an unusual charge that doesn't match any policy, it can flag the report for a person to decide rather than making an incorrect approval.

Use the agent response in your agent flow

When the agent node runs, the agent flow waits for the agent to complete its task. The agent response then becomes available as dynamic content that you can use in any subsequent step.

To use the agent response in a downstream action:

  1. Select the action where you want to use the response (for example, a Send an email or Update a row action).

  2. In the field where you want to insert the response, open the dynamic content picker.

  3. Look for the output from the Run an agent step and select agent response.

Common ways to use the agent response:

  • Insert the response into the body of an email or a message.
  • Define a condition to branch your agent flow based on what the agent returned.
  • Save the response to a variable or data source for later reference.

Automation scenarios

An agent node is at its best as one step in a longer workflow. Earlier steps gather and normalize the inputs, the agent does the reasoning, and later steps act on the result across multiple systems.

Triage incoming support tickets

A workflow triggers when a new ticket is created in Dataverse. Earlier steps pull the ticket body, attachments, and the customer's recent case history. The agent node reads everything, grounds itself in the product knowledge base (SharePoint), and returns a structured output with category, priority, suggested_owner, and draft_reply. Later steps branch on priority to page the on-call engineer for outages, otherwise assigning the ticket and queuing the draft reply for review.

Review expense reports against policy

A workflow triggers when an expense report is submitted. Earlier steps load the line items and convert non-USD amounts so the agent reasons over a single basis. The agent node grounds itself in the policy SharePoint site and returns a per-line compliant flag plus reason. Later steps either autoapprove and post the journal entry to the accounts payable system, or start an Approvals action with the agent's reasoning attached and wait for a finance reviewer.

Prepare a meeting briefing

A workflow runs each morning, lists the day's meetings from Outlook, and loops over each one. For every meeting, an earlier step pulls account context from Dynamics 365. The agent node then uses Work IQ to scan recent mail and Teams threads with the attendees and returns talking points, open risks, and recommended questions. Later steps format that output into an HTML briefing emailed 30 minutes before the meeting and post it as an adaptive card on Teams.

Frequently asked questions

When should I use an inline agent and when should I use an existing agent?

Use an inline agent when the agent's job is specific to one workflow and you want everything, including instructions, tools, knowledge, and output, to travel with the workflow. Inline agents are faster to set up and easier to reason about because the configuration is right next to the steps that use it.

Use an existing agent when the same agent is shared across multiple workflows or surfaces (for example, also chatted with in Teams), or when the agent is owned by a different team and you just want to call it.

When should I use an agent node and when should I use a prompt node?

Both add AI to a workflow, but they're built for different jobs.

Capability Agent node Prompt node
Tool orchestration Full access to all agent tools Code interpreter only
Knowledge sources All supported knowledge sources Dataverse only
Human review Yes No
Task complexity Complex tasks. The agent orchestrator can take multiple turns. Simple tasks that can be carried out in a single turn

Use the agent node when the step needs reasoning, tool orchestration, or grounded knowledge. Use the prompt node when you just need the model to transform or generate text.

Can the inline agent be reused outside this workflow?

No. An inline agent is scoped to its workflow. If you find yourself building the same inline agent in multiple workflows, promote it to a published agent and call that agent from each workflow instead.