Edit

Share via


Add agent response with the form designer (preview)

[This article is prerelease documentation and is subject to change.]

Add the agent response component to a model-driven app form, which can directly call a Microsoft Copilot Studio topic and display the response to the user. This builds on the Agent API executeEvent and simplifies usage by not requiring a new custom component. The implicit context of the app, page, and record are available in Copilot Studio.

This component supports the following responses from Copilot Studio:

  • Markdown
  • Adaptive card
  • Image
  • Video

Important

  • This is a preview feature.
  • Preview features aren’t meant for production use and might have restricted functionality. These features are subject to supplemental terms of use, and are available before an official release so that customers can get early access and provide feedback.

Prerequisites

Requires the Allow users to analyze data using an AI-powered chat experience in canvas and model-driven apps environment setting enabled for model-driven apps. More information: Copilot environment settings

Add an agent response component to a form

  1. Open the form designer to create or edit a form. More information: Create a form or Edit a form

  2. In the form designer, select Component on the command bar.

  3. In the Components pane, expand Artificial Intelligence

  4. Drag Agent Response onto the form canvas. Agent response in components pane.

  5. In the Add Agent Response dialog, enter the Event name from the topic in Copilot Studio in the Static value box. More information: Find the event name for a topic in Copilot Studio Configure agent response event name

    Note

    The Bind to table column option isn't supported for this component.

  6. Select Save and publish on the command bar.

  7. Open the form in a model-driven app to test the component.

    Note

    The form designer preview displays the warning message "Agent Response is only available when you play the app" since live preview isn't yet supported.

Find the event name for a topic in Copilot Studio

  1. Open the topic in Copilot Studio and find the Trigger node.
  2. Verify the trigger type is A custom client event occurs or Event received.
  3. Within the Trigger node, select Edit. Copilot Studio Trigger custom client event.
  4. Within the On Event Activity properties pane, copy the Event name property string value to be passed from the agent response component. More information: Change the trigger for a topic Copilot Studio Trigger On Event property pane.

Limitations

The following component properties are currently not supported:

  • Label
  • Hide label
  • Hide on phone
  • Lock
  • Read-only
  • Component width
  • Component height
  • Bind to table column

The component isn't supported for mobile or tablets.

FAQ for Agent APIs and Agent Response component

Agent API executeEvent

Overview of the model-driven form designer
Add, configure, move, or delete components on a form