Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
Features in this article are powered by the Copilot chat harness, which uses the billing options described in Licensing for agents powered by the standard harness.
Microsoft 365 Copilot provides default experiences for engaging with content and resources from across an organization. While the default functionality provides many useful capabilities, sometimes customers need to interact with a more focused conversational assistant, accessible directly within Microsoft 365 Copilot. An example of where a more focused assistant is useful is when you need support for a specific subject area with specialized vocabulary, grounded on a subject-specific knowledge base.
You can help Microsoft 365 Copilot handle these situations by extending it with a specialized agent built in Copilot Studio.
You can add agents to Microsoft 365 Copilot in two different ways:
- Custom agents
- Agents for Microsoft 365 Copilot
Note
Agents for Microsoft 365 Copilot are called declarative agents in Microsoft 365 Copilot. Learn more about Microsoft 365 Copilot extensibility.
This article covers:
- Authoring a custom agent
- Authoring an agent for Microsoft 365 Copilot
- Adding tools and knowledge to an agent
- Publishing a custom agent to Microsoft 365 Copilot and Microsoft Teams
What are agents for Microsoft 365 Copilot, tools, knowledge, and suggested prompts?
The following table provides detailed information about the distinctions between agents for Microsoft 365 Copilot, tools, knowledge, and suggested prompts.
| Name | Definition |
|---|---|
| Custom agent | A custom agent is an agent you build from scratch. A custom agent can include a wide range of capabilities, including knowledge, tools, and suggested prompts. You author custom agents in a conversational interface that generates prompts for the Copilot Studio model. You can publish custom agents to Microsoft 365 Copilot and Teams channel, but you can also use them with other channels. |
| Agent for Microsoft 365 Copilot | You create an agent to use in Microsoft 365 Copilot by authoring instructions to promot Microsoft 365 Copilot. The instructions define a set of runtime behaviors, personalities, and rules that govern the agent's interactions. An agent for Microsoft 365 Copilot extends Microsoft 365 Copilot, and you can equip it with knowledge. These agents can also be used directly as an agent in Microsoft Teams. |
| Tool | The mechanism that lets an agent call out to other systems and retrieve data or perform other actions. Tools are single-turn interactions. Tools can use authentication, and can include parameters and other functionalities. See Add tools to custom agents. |
| Knowledge | Knowledge refers to information that lives within your Microsoft 365 tenant, including SharePoint, and Graph connectors. |
| Suggested prompt | Suggested prompts are maker-authored prompts in an agent that make it easy for customers to do common or sophisticated actions with the agent. |
Keeping agents secure
Microsoft 365 customers and partners can use Copilot Studio to build agents that extend Microsoft 365 Copilot with custom instructions and grounding knowledge, and tools invoked via REST API descriptions configured by the agent. Tools grab data that influences the behavior of your Microsoft 365 Copilot, including data from untrusted sources like emails and support tickets. Bad actors can create payloads in these untrusted sources to manipulate the agent's behavior, such as incorrectly answering questions or invoking custom tools.
To protect your agent from bad actors, use the controls in Copilot Studio to configure secure connectors used for knowledge and custom tools.
Prerequisites
- Users and makers must have a license to use Microsoft 365 Copilot.
- Makers must have permissions to create in and have access to a Copilot Studio environment.
Create and configure a custom agent
For more information about creating and configuring custom agents, see the following articles:
Create an agent for Microsoft 365 Copilot
Creating agents for Microsoft 365 Copilot in Copilot Studio is similar to creating custom agents, but the starting point is different: you start from the Microsoft 365 Copilot page.
To create an agent for Microsoft 365 Copilot:
On the side bar, select Agents.
Select Microsoft 365 Copilot from the list of agents.
Select Add on the Agents card. A configuration form appears.
Add a name for the agent. The maximum length for the name is 42 characters. The name can't include angle brackets (
<and>).When you're done, select Create. An overview page for the agent appears.
The agent is now created. You can interact with it in the test chat, or add more capabilities and knowledge to it.
You can see the newly created agent under the Agents tab on the Microsoft 365 Copilot agent page. Because the agent isn't a custom agent, it doesn't appear in the main agents list.
Configure basic settings for an agent for Microsoft 365 Copilot
Set up the agent's basic features:
- Replace the default icon if desired. The image file for the agent icon must be in PNG format and less than 72 KB in size.
- Enter a brief description of what you want your agent to do.
- Provide more detailed instructions to direct how your agent behaves and list tasks it can accomplish.
Add knowledge to an agent for Microsoft 365 Copilot
You can add several types of knowledge to an agent for Microsoft 365 Copilot:
| Name | Definition |
|---|---|
| SharePoint files, folders, and sites | SharePoint resources in the organization. Microsoft 365 Copilot uses the credentials of the user to ensure they only get answers from information they have access to. |
| Teams chats and meetings | Content from Microsoft Teams chats and meetings. Microsoft 365 Copilot uses the credentials of the user to ensure they only get answers from information they have access to. |
| Emails | Content from Outlook emails. Microsoft 365 Copilot uses the credentials of the user to ensure they only get answers from information they have access to. |
| Websites | The agent can also use public web search (via Bing) to retrieve web results. |
| Other data sources via Copilot (Graph) connectors | Connectors are data sources configured by the tenant admin to add knowledge to Microsoft 365 Copilot and agents. Learn more in Microsoft 365 Copilot connectors overview. |
To add knowledge to the agent:
Return to the agent overview page.
On the Knowledge card, select the search bar to open the knowledge source selector.
Select a data source from the sources available to you. Different options are available:
- Search for a source by name.
- Filter by type of source by selecting the Files, Sites, Chats, or Meetings tabs.
- Add knowledge from a public website by entering the URL.
- Add all content from your emails by selecting My emails.
- Add all content from your SharePoint sites by selecting My SharePoint files, folders, and sites.
- Add all content from your Teams chats and meetings by selecting My Teams chats and meetings.
You can add multiple knowledge sources with a mix of types to an agent.
Select desired toggles to further configure knowledge use:
- Search all websites: With the toggle turned off, the agent only uses specified website URLs you provide. With the toggle turned on, the agent uses Bing to search the web for answers to questions.
- Only use specified sources: With the toggle turned on, the agent only uses the knowledge sources you specified.
- Reference org chart and profile info: With the toggle turned on, the agent can use information from the organization's chart and user profiles.
Add other data sources via Copilot (Graph) connectors. The tenant admin configures these connectors to add knowledge to Microsoft 365 Copilot and agents.
When you configure the knowledge sources, the agent with knowledge is immediately available in the test chat. Close the knowledge panel, select the Start new test session
icon at the top of the test panel, and then try asking questions that the knowledge sources should cover.
Note
If the agent doesn't return results, submit feedback to Microsoft for analysis and product improvement.
Add capabilities
From the Capabilities card on the agent overview page, use the toggles to turn on output capabilities for your agent:
- Create code, graphs, and documents: When you turn on this capability, the agent can generate code, graphs, and documents (Word, Excel, or PowerPoint) in response to user prompts.
- Create images: When you turn on this capability, the agent can generate images in response to user prompts.
Add suggested prompts
When users first interact with an agent, they often don't know what they can ask or don't understand the richness of the agent. As a result, they tend to ask simple questions. Microsoft 365 Copilot addresses this issue by providing a suggested prompts experience. Suggested prompts present the user with easy prompts to get started.
You can edit suggested prompts or create your own at any time from the Suggested prompts section on the overview page.
One way to use the suggested prompts is as a shortcut for simple questions you expect users to ask. However, they're also an opportunity to present more sophisticated prompts that the user might not otherwise understand are possible.
Within suggested prompts, agent authors have full access to the capabilities of the Microsoft 365 Copilot large language model, including the tools and knowledge you added. Consider creating sophisticated prompts that help users achieve common tasks easily.
Publish a custom agent to the Teams + Microsoft 365 channel
Extend Microsoft 365 Copilot with a custom agent by publishing the agent to the Teams + Microsoft 365 channel. Learn more in Connect and configure an agent for Teams and Microsoft 365.
Publish and configure an agent for Microsoft 365 Copilot
When an agent for Microsoft 365 Copilot works as you expect in the Copilot Studio test experience, you're ready to publish. Once published, an agent for Microsoft 365 Copilot is ready to upload to the organization's catalog. Unlike a standalone Copilot Studio agent, an agent for Microsoft 365 Copilot isn't automatically deployed to Microsoft 365 Copilot and Teams when published.
Publish your agent
Go back to the agent's overview page.
Select Publish on the top right.
The information on the next form populates the catalog entry in your organization's Office and Teams Catalogs and the Microsoft Admin Center Integrated Apps list. The Microsoft 365 Copilot language model doesn't use this information.
Fill in the fields as needed and select Publish.
When the operation completes, the Availability options page appears.
Note
When you select Publish, a bot resource is provisioned in your tenant's Microsoft Entra ID environment, corresponding to your Copilot agent. The resource allows users to interact with the agent in Microsoft Teams.
Set availability options for the agent
Use the Availability options page to distribute the agent to your account, to small groups of peers governed by distribution lists, or to be published to the organization's catalog by an admin.
Note
If an administrator blocks side-loading or publishing for the tenant, one or more of these features might be unavailable. Work with the tenant admin to determine the appropriate distribution mechanism for the tenant.
| Availability Option | Description |
|---|---|
| Share Link | You can copy a deep link into Microsoft Teams to invoke the published agent. Opening the link in the tenant opens a chat experience with the agent. |
| Show to my teammates and shared users | Grant access to others to participate in authoring the agent, or to security groups to use the agent in Microsoft 365 Chat or Teams. |
| Show to everyone in my org | Submit to the tenant admin to add to the organizational catalog for all tenant users to install as desired. |
| Download as a .zip | Download as a zip folder. This availability option lets you manually upload to Teams/Microsoft 365 Copilot to submit to the admin to review, or upload directly to the organizational catalog. |
For more information about managing apps in the Teams catalog, see Manage Power Platform Apps.
Use the agent in Microsoft 365 Copilot or Microsoft Teams
You can try the agent in Microsoft 365 Copilot or Teams. Interact with the agent by either @mentioning the agent in the Microsoft 365 Copilot chat interface or by selecting the agent from the sidebar. After you select an agent, you interact only with the agent until you end that conversation and return to Copilot or Teams.
Tips for agent authors
- Microsoft 365 Copilot caches answers from previously asked questions in a given session, even if it calls a tool to retrieve data. To break this cache, use the Start new test session
icon at the top of the test chat. - To find out why the generative AI selects or doesn't select a tool, enter -developer on in the chat and ask the question.
- The results you see at runtime in Microsoft 365 Copilot might be different from what you see in the test panel of Copilot Studio and in Microsoft Teams.
- Unlike custom agents, Copilot agents don't collect data for the Copilot Studio Monitor page.
- When using Microsoft 365 Copilot to test your agent, use the thumbs down feedback experience to provide feedback to the Microsoft Copilot team. Feedback doesn't directly affect the triggering quality of Microsoft 365 Copilot.