Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Tutorial: Create declarative agents by using Microsoft 365 Agents Toolkit
A declarative agent is a customized version of Microsoft 365 Copilot that you can use to create personalized experiences by declaring specific instructions, actions, and knowledge. This guide provides information about how to build a declarative agent by using Microsoft 365 Agents Toolkit.
The agent that you build in this tutorial targets licensed Microsoft 365 Copilot users. You can also build agents for Microsoft 365 Copilot Chat users, with limited capabilities. For details, see Microsoft 365 Copilot developer licenses.
Note
Microsoft 365 Government tenants don't support publishing agents through the Microsoft 365 Agents Toolkit.
👁 Screenshot shows the answer from the declarative agent in Microsoft 365 Copilot.
For overview information, see Declarative agents for Microsoft 365 Copilot.
Note
Declarative agents based on Microsoft 365 Copilot are now supported in Word and PowerPoint.
Prerequisites
Before you start, make sure that Microsoft 365 Copilot is available for your organization.
The following options are available for your development environment:
- A sandbox Microsoft 365 organization with Copilot (available in limited preview through TAP membership).
- An eligible Microsoft 365 or Office 365 production environment with a Microsoft 365 Copilot license.
The following resources are required to complete the steps described in this article:
Note
The screenshots and references to user interface of the Microsoft 365 Agents Toolkit in this document were generated using the latest Release version, 6.0. Pre-Release versions of Agents Toolkit may differ from the user interface in this document.
You should be familiar with the following standards and guidelines for declarative agents for Microsoft 365 Copilot:
- Standards for compliance, performance, security, and user experience described in Microsoft Teams Store validation guidelines.
Create a declarative agent
Start by creating a basic declarative agent.
Open Visual Studio Code.
Select Microsoft 365 Agents Toolkit > Create a New Agent/App.
👁 A screenshot of the Create a New Agent/App button in the Agents Toolkit sidebar
Select Declarative Agent.
👁 A screenshot of the New Project options with Agent selected
Select No Action to create a basic declarative agent.
Select Default folder to store your project root folder in the default location.
Enter
My Agentas the Application Name and press Enter.In the new Visual Studio Code window that opens, select Microsoft 365 Agents Toolkit, then select Provision in the Lifecycle pane.
👁 A screenshot of the Provision option in the Lifecycle pane of Agents Toolkit
Test the agent
Go to the Copilot application at https://m365.cloud.microsoft/chat.
Next to the New Chat button, select the conversation drawer icon.
Select the declarative agent My Agent.
Enter a question for your declarative agent and make sure it replies with "Thanks for using Microsoft 365 Agents Toolkit to create your declarative agent!"
👁 A screenshot of an answer from the declarative agent in Microsoft 365 Copilot
Next step
Feedback
Was this page helpful?
