Share via


Trigger agent evaluations with connectors

Use the Microsoft Copilot Studio connector to run maker evaluations in automated workflows without writing direct REST API calls. This approach works well for low-code and no-code solutions built with Power Automate, tools, and agent flows.

What connectors do

Connectors allow you to perform actions related to your Copilot Studio agents. The connector acts as a proxy or "wrapper" around APIs, so you can do everything the API can without needing to code your own. You can use connectors to perform agent evaluation as part of a larger automation sequence, and connect agent evaluation actions and results to other apps and services.

The actions you can use for agent evaluation are:

How to use the connector for evaluations

You can add these actions in multiple ways, depending on how you want to create and maintain your automations:

Example scenario: scheduled evaluations

A simple automation is a scheduled flow that runs evaluations and publishes results for monitoring.

Consider the following scenario:

  1. A Recurrence trigger in Power Automate or Flows or Copilot Studio starts a flow on a schedule (such as daily or weekly).

  2. The trigger calls Evaluate Agent for a selected test set.

  3. The flow checks run status by using Get Agent Test Run Details to check if the evaluation run state is complete.

  4. When the evaluation finishes running, the flow takes the results from Get Agent Test Run Details and sends them to a database, formats them for an email alert, or a Power BI dashboard that measures agent quality over time.

You can create this automation using any of the methods described earlier. This pattern gives teams a repeatable quality signal without manual API orchestration.

Find the Copilot Studio Connection ID

When you run an evaluation by using a connector, you can optionally add a user profile to authenticate connections during the evaluation. To find your mcsConnectionId:

  1. Go to Power Automate.

  2. Open the Connections page.

  3. Select the Microsoft Copilot Studio connection.

  4. Copy the mcsConnectionId from the URL: .../connections/shared_microsoftcopilotstudio/{mcsConnectionId}/details