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.
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.
Agent APIs are a set of interfaces introduced in Microsoft Power Apps that allow components to interact with topics created in Microsoft Copilot Studio. These APIs are available in two forms:
Context.Copilot
methods used for PCF controls. This is the subject of this article.- Xrm.Copilot namespace used for client scripts in model-driven apps.
These APIs are designed to enhance integration with Microsoft Copilot Studio (MCS), enabling more intelligent and responsive app experiences. The APIs leverage the MCS agent configured as the Interactive agent in the model app designer. See more at Working with an interactive agent.
API | Description |
---|---|
copilot.executeEvent | Executes a Microsoft Copilot Studio topic based on the registered Event Name. Returns an array of type MCSResponse. |
copilot.executePrompt | Executes a Microsoft Copilot Studio topic based on the trigger queries registered in the topic. Returns an array of type MCSResponse. |
Accessibility
When creating a code component, ensure the following best practices in code component accessibility checks are followed to have an accessible experience.
Related articles
FAQ for Agent APIs and Agent Response component
Copilot
executeEvent
executePrompt
Working with an interactive agent
Power Apps component framework overview
Create your first code component
Learn Power Apps component framework
Xrm.Copilot (Client API reference)
Add agent response with the form designer (preview)