Applies To
Microsoft365.com Microsoft Office

Agents in SharePoint are scoped AI assistants that can help you stay on track by simplifying complex tasks and providing guidance based on what you're working on. Create your own by naming it, choosing its sources, and defining your behavior. You can build an agent that is tailored to your team's needs and content and share them with your teammates to be used in Teams or Copilot Chat.

What you need

You can create new agents or edit an existing agent if you:

Where you can create an agent in SharePoint

After signing into your SharePoint site with edit permissions, you can create your own agent from:

Note: The agent only answers questions using information from sites, pages, and files that the user already has access to and have been included as the agent's sources. To get information from all the sources you want the agent to use, you may need to update permissions for yourself or the people you want to share the agent with.

Create an agent from the site homepage

On the site home page, select New > Agent

The screenshot of creating new copilot agent from site homepage

Create an agent from the command bar of a document library or a List

On a document library, you can choose Create an agent for all supported files in this library. This will be available under the AI actions menu.

Screenshot showing button to create an agent from a SharePoint document library.

Similarly, the AI actions menu along with the button to create an agent is available when viewing a SharePoint List too.

Create an agent from the context menu of selected file(s)

Instead of creating an agent for all files in a document library, sometimes you may want to just include some files. In this case, you can select the files you want, then select Create an agent from the context menu by either right clicking or selecting the ellipsis next to one of the selected files:

Screenshot showing button to create agent from file or folder selection context menu​​​​​​​

Create an agent from the agent chat pane

On any site, page, or document library, select the Copilot button on the upper right to open the agent. Then select the dropdown next to the current agent, then select Create an agent.

The screenshot of creating a new copilot agent from the chat pane

No matter where you choose to create your agent from, once you select Create an agent, the agent is immediately ready, scoped to your selection. You can choose to customize its branding, purpose, scope and behavior, and Create the agent.

Screenshot showing the SharePoint agent builder when creating a new agent.

Where can you find your agent file?

The Copilots folder

Every time you create an agent, it is stored as a .agent file.

If you create it from the site's homepage, the .agent file is automatically stored under Site contents > Site Assets > Copilots.

screenshot of where copilot agents are saved if created from home page

Document library

If you create an agent from other places, the agent is automatically saved to the current document library folder, in the place where you originally created it.

screenshot of copilot agents saved to the current document library folder​​​​​​​

You can edit the agent at the end of the creation or later by:

  • Customizing its branding and purpose

  • Adding or removing which sites, pages, and files your agent should include as knowledge sources beyond the current SharePoint site.

  • Refining the agent's behavior by writing customized prompts tailored to the purpose and scope of the agent. 

FAQ and data handling

To learn more about agent, see Frequently asked questions.

For more information on how Microsoft 365 Copilot works, see Data, Privacy, and Security for Microsoft 365 Copilot.​​​​​​​