Extend Microsoft Copilot with prompt actions (preview)

Note

Extending with prompt actions is only available for some Copilot experiences.

  1. Sign in to Copilot Studio and select Library on the side navigation pane.

  2. Select + Add an item.

    You're prompted to select a Microsoft Copilot to extend.

  3. Select one of the Copilot experiences to extend.

    Note

    For this example, we've chosen Copilot for Microsoft 365.

    You're then prompted to choose between extending the Copilot with a New copilot or a New action.

  4. Select New action.

    A New action menu appears.

    Screenshot of New action window.

  5. Select Prompt.

    The Add a prompt action wizard opens.

Create a prompt action

In the wizard, follow these steps in sequence.

Action details

  1. Enter a name and description for the action.

    These details are used by the copilot to perform a semantic matching of the action with the user query.

  2. Under Solution, a dropdown lists all solutions available within the current environment. If you defined a preferred solution, then it's preselected, otherwise select the solution you want to use or leave it for the wizard to autocreate a new solution for this action.

    Screenshot of Action details step of Add a prompt action.

  3. Select Next.

Create a prompt

Describe the task you want your copilot to perform using natural language.

  1. In the Prompt field, enter instructions and data required to generate response-pertinent details for the use case.

    To enable Copilot to pass important pieces of information at runtime to the prompt action, add input variables. Write your own instructions or begin from one of the existing prompt templates.

    Examples of prompts are Summarize text, Extract information from text, and Classify text.

    Screenshot of Create prompt step of Add a prompt action.

  2. Try out your prompt by selecting Test prompt.

    Your prompt is generated and appears in the Prompt response field. You might need to revise and iterate on your prompt to meet your needs.

    Note

    Make sure your input variable has test data before you test.

  3. When you're satisfied with the prompt response, select Save custom prompt.

Select action parameters

This step ensures descriptive input and output names are selected such that Copilot is able to prefill it with information from user utterance and consume the output from the prompt action.

  1. In the Input parameters section, add the input variables that the prompt action needs to generate the response.

    These are the variables that you want to pass to the prompt action at runtime. You can add multiple input variables.

  2. In the Output parameters section, add the output variables that the prompt action generates.

    These are the variables that you want to receive from the prompt action at runtime.

Review and test

This step presents the opportunity for a copilot developer to test the prompt plugin by side-loading it in the Copilot for Microsoft 365.

  1. To test the prompt plugin, select Test action.

  2. Select Open to test to open the Copilot chat in a new window. Open the flyout to see the action and toggle it on.

    The action appears with a beaker icon under the connector chosen with format Test-Action name.

  3. You can now test the plugin by trying the prompts you expect a user to use. You can also use the –developer on command to get more information on prompt execution. Once you're satisfied with the results, return to the Copilot Studio window.

  4. After you test the prompt and verify that it performs as expected, select Publish.

    Screenshot of Review and test step of Add a prompt action.

Publish

  1. On the Review and test step, select Publish to see the confirmation message.

    Your prompt action is now published to Copilot for Microsoft 365. It might take a few minutes for your action to show up in copilot experiences. Meanwhile, you can review information about using and administering actions in Copilot for Microsoft 365.

After you create your action, you need to enable it for use in Microsoft Copilot.

For more information about building and using prompt plugins, see AI Builder prompts.