Contoso IT - A declarative Copilot sample

With the declarative copilot, you can build a custom version of Copilot that can be used for specific scenarios, such as for specialized knowledge, implementing specific processes, or simply to save time by reusing a set of AI prompts. For example, a grocery shopping Copilot declarative copilot can be used to create a grocery list based on a meal plan that you send to Copilot.

This sample is about a declarative Copilot for an IT scenario. With this Copilot, you can:

  • Ask questions about the IT policies of the Contoso company
  • Get information about support tickets
  • Open a new support ticket

Get started with the template

Prerequisites

To run this app template in your local dev machine, you will need:

  1. First, select the Teams Toolkit icon on the left in the VS Code toolbar.
  2. In the Account section, sign in with your Microsoft 365 account if you haven't already.
  3. Create Teams app by clicking Provision in "Lifecycle" section.
  4. Select Preview in Copilot (Edge) or Preview in Copilot (Chrome) from the launch configuration dropdown.
  5. Once the Copilot app is loaded in the browser, click on the "…" menu and select "Copilot chats". You will see your declarative copilot on the right rail. Clicking on it will change the experience to showcase the logo and name of your declarative copilot.
  6. Ask a question to your declarative copilot and it should respond based on the instructions provided.

Please note: the sample contains a fictional SharePoint site as data source. If you want to use a real SharePoint site in your organization, just replace the URL in the capabilities section of the declarativeCopilot.json file:

"capabilities": [
    { 
        "name": "OneDriveAndSharePoint",
        "items_by_url": [
        {
                "url": "https://contoso.sharepoint.com/sites/ContosoIT"
            }
        ]
    }
]

What's included in the template

Folder Contents
.vscode VSCode files for debugging
appPackage Templates for the Teams application manifest, the GPT manifest and the API specification
env Environment files

The following files can be customized and demonstrate an example implementation to get you started.

File Contents
appPackage/declarativeCopilot.json Define the behaviour and configurations of the declarative copilot.
appPackage/manifest.json Teams application manifest that defines metadata for your declarative copilot.

The following are Teams Toolkit specific project files. You can visit a complete guide on Github to understand how Teams Toolkit works.

File Contents
teamsapp.yml This is the main Teams Toolkit project file. The project file defines two primary things: Properties and configuration Stage definitions.

Addition information and references