If you have edit permissions on a SharePoint site, you can create new agents or edit an existing agent. You can build an agent that is tailored to your team’s needs and content and share them with your teammates in Teams chat. 

With site edit permissions, you can create your own agent and edit a previously customized agent 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. 

Note: The agent only answers your questions using information from sites, pages, and files that you already have access to and have 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 

After signing into your SharePoint site, there are four places where you can create an agent from:  

  • SharePoint homepage

  • The command bar of a document library

  • The context menu of the selected file(s) in a document library

  • Agent chat pane

From the SharePoint homepage 

On the site home page, select New > Agent 

   The screenshot of creating new copilot agent from site homepage

From the command bar of a document library 

On a document library, you can choose Create an agent for all supported files in this library. 

The screenshot of Create new copilot agent from document library

From the context menu of the selected file(s) in a document library 

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:

The screenshot of creating a new copilot agent by selecting files​​​​​​​

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 Open agent directly without further adjustments, or you can select Edit to customize its branding, purpose, scope and behavior.  

The screenshot of editing a Copilot agent

Where can you find your agent file? 

Every time you create an agent, it is stored as a .agent file. If you create it from the homepage of a site, the .agent file is automatically stored under Site contents > Site Assets > Copilots.  

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

If you create an agent from other places, it 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

Edit an agent 

During creation

If you select Try it after the agent is created, you can edit the agent later from the agent chat pane. Or, if you select Edit, you can begin finetuning the agent's identity, sources, and behavior as following.  

  • Under Identity, give the agent a new name, describe the purpose of the agent and how to use it.

screenshot of the starter UI to edit a copilot agent

  • Under Sources, you can modify the selection of files and sites that your agent uses to gather information. It is possible to include additional sites and documents that are outside your current SharePoint site as sources for your agent. It's important to remember that users interacting with the agent will only receive information from sources they already have access to.

The screenshot of adding knowledge resources to copilot agent

screenshot of selecting more files to add to copilot agent 

  • Under Behavior, create a welcome message for the users of your agent, then provide a few starter prompts and instructions for the agent to follow. Use the test panel on the right to try it out and adjust your instruction and starter prompts.

screenshot of editing copilot agent behavior

Edit an existing agent

You can edit an agent you just created, or you can edit an existing agent. To edit an agent, simply select it from the agent chat pane and then choose Edit.

Notes: 

  • You can't edit or share the ready-made-agent. 

  • When a SharePoint hub site is included as the source for the agent, it automatically includes its associated sites. Your agent will use information from both the hub site and its associated sites to respond.

  • If an agent is shared in Teams, once it is edited in Copilot Studio, the original agent won't work in Teams anymore.

  • When you share an agent with others, make sure they have access to the sources for optimal experience.

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.​​​​​​​

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.