Microsoft Copilot Toolkit Supports Automatic Publishing of Your Agent

In the previous article (Customizing Your Copilot Agent), I introduced how to customize your agent for Microsoft 365 Copilot, which allows Microsoft 365 Copilot to assist you in answering questions in specific domains and completing highly personalized tasks.
In the above text, I mentioned a PowerShell module we developed ourselves, Microsoft Copilot Toolkit (https://github.com/code365opensource/microsoft.copilot.toolkit), which can generate the agent you want with a single line of code. This module is particularly suitable for those who often use PowerShell, and it can also achieve bulk and automated creation of agents.
This module has now been released to the official market, with over 2000 downloads, and I have received quite a bit of feedback, with the most requested feature being whether it can automatically assist administrators in publishing, relieving the pain of manual installation. Today is Sunday, sitting in the winter sun, I have upgraded this module to version 0.1.6, perfectly providing this feature.
Microsoft Copilot Toolkit Supports Automatic Publishing of Your Agent
If you haven’t used the Microsoft Copilot Toolkit yet, you can install this module using the following command:
Install-Module -Name microsoft.copilot.toolkit -scope CurrentUser
If you have already installed it, you can update it using the following command:
Update-Module -Name microsoft.copilot.toolkit -scope CurrentUser
Below is a simple example; this update added the publish parameter. If you specify this parameter, it will automatically pop up a dialog box for you to log in and authorize, currently requiring administrator privileges to publish.

Please note that this “Declarative agent builder in PowerShell” is what I registered to help you log in and authorize; it shows “unverified” here because I haven’t formally gone through the approval process, which requires a company license to get verified.

Microsoft Copilot Toolkit Supports Automatic Publishing of Your Agent
New-DeclarativeAgent `  -name "M365AP team agent" `  -instructions "You help people to understand and culture of M365 AP team, and answer another questions based on the knowledge source."`   -onedriveOrSharePointUrls "https://microsoft.sharepoint.com/teams/szo365fnd" `  -publish
If all goes well, this tool will automatically help you create the agent, package it as a zip file, and upload it to the enterprise application directory under your identity, providing a direct installation link (so you can share it with your colleagues).
Microsoft Copilot Toolkit Supports Automatic Publishing of Your Agent
Clicking this link will invoke your Teams in the browser, and the installation prompt will automatically pop up as shown below.
Microsoft Copilot Toolkit Supports Automatic Publishing of Your Agent
You can also guide users to the interface below for installation.
Microsoft Copilot Toolkit Supports Automatic Publishing of Your Agent
Upon successful installation, you will receive the following prompt.
Microsoft Copilot Toolkit Supports Automatic Publishing of Your Agent
Clicking “Open in Copilot” will take you to the Copilot interface, and then into your exclusive agent interface, as shown below.
Microsoft Copilot Toolkit Supports Automatic Publishing of Your Agent
Welcome everyone to try it out and give me feedback.

Leave a Comment