Test your agent

As you design your agent in Copilot Studio, you can use the Test agent pane to see how the agent leads a customer through the conversation.

To help you find and fix unexpected behavior, you can enable tracking between topics to take you through the agent conversation step by step, and go to the corresponding node in the authoring canvas.

Use the Test your agent pane to walk through your agent conversations as a user. It's a good way to make sure your topics are working and that conversations flow as you expect.

Preview a conversation

  1. If the Test your agent pane is hidden, open it by selecting Test at the top of any page.

    Screenshot of the Test button.

  2. In the field at the bottom of the Test your agent pane, enter some text. If the text is similar to a trigger phrase for a topic, that topic begins.

  3. Select the agent response in the Test your agent pane. This takes you to the topic and the node that sent the response. Nodes that have fired have a colored checkmark and a colored bottom border.

    Screenshot of the node displaying a colored checkmark and border.

    As you continue the conversation within the active topic, notice that each node that fires is marked with the checkbox and bottom border, and centered on the canvas.

  4. If you would like to follow the whole conversation automatically, as it moves from topic to topic, turn on Tracking at the top of the Test your agent pane.

    Screenshot of the topic-to-topic toggle.

  5. Continue the conversation until you're satisfied that it flows as intended.

You can update a topic at any time while interacting with the test agent. Simply save your topic to apply changes and continue the conversation with your agent.

Your conversation is not automatically cleared when you save a topic. If at any point you want to clear the conversation from your test agent and start over, select the Reset icon.

Screenshot showing the location of the Reset icon.

Test variable values

You can observe the values of your variables as you test your agent.

  1. Select Variables on the secondary toolbar to open the Variables pane.

    Screenshot of the secondary toolbar with a link to open the Variables pane.

  2. Switch to the Test tab and expand the desired variable categories.

    As you proceed with your test conversation, you can monitor the value of the variables in use.

    Screenshot of the Test tab of the Variables pane showing one topic variable with a value and one that doesn't have a value.

  3. To inspect variable properties, select the desired variable. The Variable properties panel appears.

    Screenshot of the Variables properties panel.

For information about using the Variables pane to test slot filling, see Use entities and slot filling in agents.

Save conversation snapshots

While you're testing your agent, you can capture the content of the conversation, and diagnostics data, and save it as a file. You can then analyze the data to troubleshoot issues, such as the agent not responding in the way you expect.

Warning

The snapshot file contains all your agent content, which may include sensitive information.

  1. At the top of the Test your agent pane, select the More icon (), then select Save snapshot.

    Screenshot of the Save Snapshot option.

    A message appears, notifying you that the snapshot file might include sensitive information.

  2. Select Save to save the agent content and conversational diagnostics in a .zip archive named botContent.zip.

    The botContent.zip archive contains two files:

    • dialog.json contains conversational diagnostics, including detailed descriptions of errors.
    • botContent.yml contains the agent's topics and other content, including entities and variables.

Manage connections

If your agent requires user connections, to manage the connections used by your test chat, select the More icon () at the top of the test pane, then select Manage connections.

Note

Help us improve Copilot Studio by reporting issues. Use the Flag icon near the top of the test pane to submit your conversation ID to Microsoft. The ID is a unique identifier that Microsoft uses to troubleshoot issues in a conversation. Other information, such as what is stored in a conversation snapshot file, is not sent when you report an issue. All information collected remains anonymous and will be used to help improve copilot quality.