Prepare

Completed

You're building a declarative agent for Microsoft 365 Copilot that's grounded in custom content ingested to Microsoft 365. You're building a Copilot connector that ingests external content to Microsoft 365. Here, we discuss the project business logic and target behavior. We also cover the accounts and software you need.

Project specification

The Copilot connector:

  • ingests external content to Microsoft 365 one time
  • makes the ingested content available to everyone in the organization

The declarative agent:

  • is available within Microsoft 365 Copilot
  • provides examples of how users can ask it questions
  • answers a user's questions using the information from the ingested content
  • in the answer, includes a reference to the relevant piece of information
  • politely refuses to answer questions not related to its function
  • admits when it doesn't have relevant information to answer a user's question

Setup

To complete this challenge, you need a Microsoft 365 tenant with the Microsoft 365 Copilot license, Visual Studio Code, and the Microsoft 365 Agents Toolkit extension.

Get a Microsoft 365 tenant with the Microsoft 365 Copilot license

To complete this exercise, you need a Microsoft 365 tenant with the Microsoft 365 Copilot license. You access Microsoft 365 Copilot through the Microsoft 365 tenant. You need the Microsoft 365 Copilot license to get access to semantic index and be able to ground agents in external content ingested to Microsoft 365.

Use sample documents

Here we provide sample markdown files for you to use in the challenge. The markdown files represent company policies stored in an external system.

Install Visual Studio Code

You build the agent using Visual Studio Code. Visual Studio Code is an IDE that provides you with tooling to build agents for Microsoft 365 Copilot. To install Visual Studio Code for your operating system, visit https://code.visualstudio.com/.

Install Microsoft 365 Agents Toolkit extension for Visual Studio Code

Microsoft 365 Agents Toolkit is a Visual Studio Code extension that helps developers build agents for Microsoft 365 Copilot. It provides you with the project boilerplate and tasks to automate building and deploying agents. To install the Microsoft 365 Agents Toolkit extension for Visual Studio Code visit https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension.

To get started, use the Microsoft 365 Agents Toolkit to create a new app with the declarative agent without an action template.