Create a Custom Copilot Agent for SharePoint Online
Copilot Agents Rolling Out to Targeted Release Tenants
On October 23, 2024, Microsoft published message center notification MC916296 (Microsoft 365 roadmap item 416297) to announce the rollout of Copilot agents in SharePoint Online to targeted release tenants. Worldwide deployment to targeted release tenants is due to finish in early November 2024 with general availability following to all tenants (with Microsoft 365 Copilot licenses) completing in late December 2024.
Microsoft included Copilot agents in SharePoint Online as part of their Wave 2 announcement on September 16, 2024. At the time, I thought that Copilot agents were the most interesting part of Wave 2. Copilot pages, another major part of the announcement, are a nice way to capture the output from Copilot queries, but having an agent automatically created for SharePoint sites to query just the content from that site seemed like more useful functionality. I was therefore very happy to see Copilot agents show up in my tenant.
Default Copilot Agent for Sites
When users have a Microsoft 365 Copilot license, they see a Copilot option in the navigation bar when a document library is open. Selecting Copilot opens the default agent for the site, which responds to user prompts by reasoning over Office documents and PDF files stored in the site. Limiting Copilot to a predefined set of files from a site stops Copilot using a wider search to find information in any file it can access across the tenant or through a web search if permitted by the tenant. It’s a way of getting a precise response from information held in a site.
Creating a Custom Copilot Agent
Site members with create and edit permissions (for a site owned by a Microsoft 365 group, any group member) can create a Copilot agent to create an even more precise search. For instance, I store the source Word documents for every article that I write (including this one) in some folders in a SharePoint Online site. Using the Create a Copilot agent option, I created a custom Copilot agent to reason over the articles. The entire operation took less than a minute, which is kind of startling.
The Sources tab of the wizard selects the folders or file for Copilot to process (Figure 1). You can select the entire site or any of the folders or individual files from the site, including from any document library if the site includes more than the default document library. The name of the agent can be between 4 and 42 characters.
The Behavior tab allows you to tailor the sample prompts shown to users and how Copilot will respond. In Figure 2, I’ve changed the tone for the responses from professional to formal and modified one of the starter prompts.
After saving the agent, Copilot creates a file in the document library for the agent and adds the agent to the recently used list of agents (Figure 3). If you make a mistake with an agent, simply delete the file. The file is also used to share agents. For instance, you can create a sharing link for the agent and include it in email or a Teams chat. If the people who see the link have access to the documents processed by the agent, they can use the sharing link to access the agent.
The list of recently used agents includes agents from other sites. You don’t need to navigate to a specific site to use its agents because they can be invoked from elsewhere in SharePoint.
Using the agent is like any other Copilot interaction. You compose a prompt (question) and submit it to Copilot for processing. Copilot restricts its search to the set of files defined for the agent. Figure 4 shows a sample interaction where I asked Copilot to search for anything that I have written about Copilot Pages, and it duly found the Word document source for the published article.
Microsoft says that the current release does not include the ability to interact with a Copilot agent in a Teams chat, nor does it include the extension to Copilot Studio to customize agents. Another missing feature is the ability for site owners to approve agents or to define a default agent for a site. Microsoft says that these features will be available later in 2024.
The Advantage of Precise Searches
Since its debut, Microsoft 365 Copilot has been plagued by oversharing issues caused when Copilot responses include unexpected information. The source for the information is available to the signed-in user, which is why Copilot can access the content, and is usually a result of flawed site permissions or overly-generous sharing. Copilot agents offer more precise responses and I can see them being very useful in sites that hold specific information like product documentation when you really don’t want results to be polluted by some random document found in a site that no one remembers.
Learn about using SharePoint Online and the rest of Office 365 by subscribing to the Office 365 for IT Pros eBook. Use our experience to understand what’s important and how best to protect your tenant.