Add a workflow as a tool to an agent

Note

Features in this article are powered by the GitHub Copilot harness, which uses Copilot Credits for usage-based billing. Learn more about Copilot Credits in Overview of billing for agents powered by the GitHub Copilot harness.

Usage-based billing applies to using, building, testing, and evaluating agents. These actions might consume Copilot Credits.

Workflows can be added to agents as tools to create larger automation scenarios.

To add a flow as a tool to an agent, the flow must satisfy the following criteria:

  • Have the When an agent calls the flow trigger and a Respond to the agent action.
  • Be configured to respond in real time, not asynchronously. The Asynchronous response toggle must be set to Off under Networking in the Respond to the agent action settings.
  • Be published.
  • Respond to the agent within the 100-second action limit. Optimize the flow logic, queries, and the amount of data returned so that a typical run is below this 100-second limit.

If you don't already have a workflow configured for use with an agent, create one in the workflow designer. For more information, see Edit and manage your workflow in the designer.

Add a workflow to an agent as an agent-level tool

When you add a workflow at the agent level, the agent orchestrator can trigger it directly at runtime.

  1. In Copilot Studio, select Agents, and then select the agent that you want to add the workflow to.

  2. Go to Tools and select Add a tool. The Add tool panel appears.

  3. To list the workflows that are available as tools, select Workflows. The available workflows are listed. The list includes published workflows that have the When an agent calls the flow trigger and a Respond to the agent action.

    If the workflow you want to add isn't listed, make sure the workflow is published and that it has the When an agent calls the flow trigger and a Respond to the agent action.

  4. Select the workflow you want to add. The workflow is added as a tool to the agent, and a tab for the workflow appears in the agent's list of tools.

Configure the workflow as an agent tool

  1. Once you add the workflow to the agent, select the workflow tab in the agent's list of tools. The Workflow details panel appears.

  2. On the Details tab, you can view the workflow's name and description. Write a clear description of the workflow's purpose and functionality to help the agent understand when to use it. You can also view information about any input parameters that the workflow requires and output parameters the workflow produces.

  3. Select Save as needed to save configuration changes.