Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
To use an agent flow as a tool that an agent can call, the flow must meet the following requirements:
- Have the When an agent calls the flow trigger and a response action of Respond to the agent.
- 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.
- 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 limit. Actions in the flow that need to run longer can be placed after the Respond to the agent action to continue to run up to the flow run duration limit of 30 days. Learn more in Speed up agent flow execution with express mode.
When you create an agent flow in Copilot Studio as a new tool added to an agent, the required flow trigger and response action are added for you. You can also modify an existing flow for use with agents by updating it to use this trigger and response action.
For comprehensive guidance on building agent flows, see Agent flows and workflows overview and Build an agent flow with natural language.
Prerequisites
- Access to Copilot Studio with a license that includes the use of flows in Copilot Studio.
Create a new agent flow from the Flows page
In Copilot Studio, go to the Flows page from the left pane.
Select New flow > Agent flow.
The agent flows designer opens with a starter template that includes the required When an agent calls the flow trigger and Respond to the agent action.
Add input parameters to the trigger as needed for your scenario.
Add the actions your flow needs to perform between the trigger and the response action.
Add output parameters to the Respond to the agent action to return data to the agent.
Select Publish to save and publish the flow.
After the flow is published, add it to your agent as a tool.
Manage which connections are used by the flow
In a supported authenticated agent, cloud flows can be configured to use user credentials when they're run as part of a generative orchestration plan or called from a topic. Using the flow in a supported channel doesn't require any special configuration in your agent. Customers are able to manage their connections while using the agent.
Cloud flows in environments using customer-managed keys (CMK) can't yet be run with customer credentials as part of generative orchestration plans or from topics. Ensure the run-only settings for cloud flows in CMK environments are set to specific connections instead of Provided by run-only user.