Skip to main content
< All Articles

How to create a Copilot Agent in SharePoint

Posted on September 24, 2025
SharePoint

I have already written several articles on Copilot and how it can help increase productivity by enabling you to analyze and summarize information stored in SharePoint and OneDrive. One recent feature rolled out in SharePoint is the ability to create your own custom Copilot Agents. In this article, I would like to explain what the Copilot Agent is, how to create one, and its use cases.

What is Copilot Agent in SharePoint?

In the context of SharePoint, think of a Copilot Agent as your personal assistant that helps you make sense of content stored in SharePoint. Using natural language prompts, it can help you summarize the content stored in SharePoint (documents, pages, lists) and answer specific queries about it. The idea behind the custom SharePoint Copilot agent is that you can customize its behavior and functionality by specifying the exact sources for information (i.e., specific files and folders), among other properties.

4 Locations where you can create/source a Copilot Agent

As of the writing of this article, the Copilot Agent on a Site can be grounded (sourced on) 4 locations:

  • Site (Copilot Agent created by default)
  • Document Library(ies)
  • Folder(s)
  • File(s)

Site Copilot Agent (Default)

Every SharePoint Site in SharePoint has a default Copilot agent whose scope is the entire site. To access the Site Copilot Agent, click on the Copilot logo in the top ribbon. The default site agent will be listed first in the menu.

  1. As an example, I have a Quality Department SharePoint Site with various information related to Quality/QMSQuality Department SharePoint site home page with news tiles and an events web part
  2. Once you click on the Copilot logo, you will see the default Site Copilot agent listed with sample chat prompts. Of course, you can also type your own questions as well and interact with it via the chat window.SharePoint site Copilot agent panel with suggested prompts and a question box
  3. Below is a sample response from the Copilot Chat to one of the queriescreate a Copilot Agent in SharePoint

Nuances about Default Site Copilot Agent

  • A Microsoft Copilot license is required for this to work
  • Each SharePoint site has a default Site Agent – it cannot be altered or deleted
  • In case the site is registered as a Hub, the default Site Copilot Agent’s scope is the entire Hub
  • Anyone with Site Visitors or above can interact with the default site copilot agent
  • Site agent understands pages and document libraries (but not lists, as of the writing of this post)

How to create a Copilot Agent on a Document Library, Folder, or File

  1. To create a custom Copilot agent for a library, folder, or file, simply click on Create an agent from the document libraryDocument library toolbar with the Create an agent button highlighted
  2. The custom Copilot agent, grounded for the entire library, will be created immediately; however, you can customize it further by clicking the Edit button.Create your new agent screen showing the Documents folder source and Edit button
  3. This is where you can customize some important aspects of the Agent. For example, under the Overview Tab, you can change the title, logo, and purpose of the agent (this will provide invaluable information to users on what to expect from the Agent).create a Copilot Agent in SharePoint
  4. Under the Sources Tab, you can add additional libraries, folders, or files that will be the extra sources for the Agent. For example, some of your documents/policies might be residing on a different site/library altogether!create a Copilot Agent in SharePoint
  5. Under the Behavior Tab, you can customize the initial chat prompts the user will see. You can also provide some sample instructions for the Agent on its tone (i.e., serious, professional, humorous) when it responds.create a Copilot Agent in SharePoint
  6. Once you Save the changes, you will notice the Agent file appear in a Document Library, along with the other files.Document library with the new Quality Policies Agent.agent file highlighted among PDF files
  7. Just as we created a Copilot Agent for the entire library above, we can also create a Custom Copilot Agent for a select few files.create a Copilot Agent in SharePoint
  8. The Process from that point forward is identical to what we covered aboveCreate your new agent screen based on two selected PDF files, with the Edit button Agent Overview tab with name, purpose fields and Save and close button
  9. And finally, the process is the same for a folder tooDocument library folder selected with the Create an agent command highlighted in the menu

Approving Custom Copilot Agents

Once the agents are created, they reside within the source document library. However, if you want those Agents to be available from the Site Copilot drop-down menu for all the users, you must approve them. To do so:

  1. Navigate to the Copilot Agent you want to make available to all the usersApproving Custom Copilot Agents
  2. Once chosen, click the 3 dots next to it and select Set as approvedApproving Custom Copilot Agents
  3. On the next screen, confirm by clicking Set as an approved agent buttonDialog to set an agent as approved with the approval button highlighted
  4. You will then receive a confirmation messageSuccess message confirming the agent is now set as approved for the site
  5. The above steps will make the Agent available from the drop-down menu to all the Site VisitorsCopilot agent picker listing Quality Policies Agent under Approved for this site
  6. You will also notice that the Copilot Agent file for this approved agent disappeared from the document library. It has actually been moved to the Site Assets Library, inside Copilot > Approved SubfolderSite Assets Copilots Approved folder containing the Quality Policies Agent file

Sharing Custom Copilot Agents

  1. Since Copilot Agents are just *.agent files, they can be shared with others, just like any other fileSharing Custom Copilot Agents Sharing Custom Copilot Agents
  2. You can also share an Agent with the Teams ChannelAgent menu with the Copy link for Teams option highlightedLink copied message advising to paste the link in a Teams group chat
  3. The above step allows you to paste the Agent within the Teams channelTeams chat showing Quality Policies Agent welcome message with suggested prompts
  4. This allows users to interact with the Agent using the @ mention.Sharing Custom Copilot Agents

Nuances about Custom Copilot Agents

  • A Microsoft Copilot license is required for this to work
  • Custom Copilot agents can be created for entire document libraries, specific files, or folders
  • For custom agents created for the document library, folder, or file, anyone with Site Member (Edit) or Site Owner (Full Control) can edit the agent
  • Up to 20 sources can be chosen for each custom agentCreate agent dialog on the Sources tab, noting up to 20 sources per agent
  • Once created, the agents reside as .agent files within the location where they were created. If you create an agent for the entire library or a file/folder within the root of the document library, it will also reside there. However, if you create an agent for a file or folder several levels deep, the agent will also reside there, within the exact location where the source content resides!Document library subfolder with a KPI Policy agent file created beside its source files
  • Once approved, agents are moved inside the Site Assets Library, inside the Copilot > Approved subfolderSite Assets Copilots Approved folder containing an approved Quality Policies Agent file
  • Users must have proper access (read-only at a minimum) to the Agent sources for the Agent to work (also known as Security Trimming)
  • To approve the Custom Copilot Agent, you must be the Site Owner (Admin) of the Site
  • You can change the default Copilot agent that loads on a site, too, by replacing the Site Default Copilot Agent with the custom one you createdCopilot agent menu with the Set as site default option highlighted
  • Since Copilot Agent is just a file within a document library, it supports Version History. That means you can restore an older version of the Agent if necessary.SharePoint Version history pane for a Copilot agent file listing versions 1.0 through 6.0
Gregory Zelfond, the SharePoint Maven - profile photo

About Me

I’m Greg Zelfond, a U.S. based SharePoint consultant, and I provide affordable out-of-the-box SharePoint consulting, training, and configuration assistance to small and medium-sized businesses all over the world.

Need help?