Explore the components of an agent

Completed

SharePoint and Microsoft 365 Copilot Chat allow everyday business users to create agents that can streamline processes and tasks. Through these agents, users with no programming or technical background can set up effective automation systems that integrate with other Microsoft services, offering a seamless workflow experience. Doing so enables users to create tailored solutions that meet their specific needs.

Users can maintain the following fields in each agent:

  • Name
  • Icon
  • Description
  • Instructions
  • Knowledge
  • Capabilities (Copilot Chat agents only)
  • Starter prompts

Let's take a deeper look at these components in the following sections.

Name

Every agent must be assigned a name. You should use something that is descriptive and unique. If you don't provide a name, the tool that you use to create the agent suggests one for you. You can change the suggested name if you wish. The character limit for the agent's name is 30 characters.

Icon

By default, the agent tool assigns a generic image as the agent's icon. However, you can manually upload an image to represent your agent and give it a unique personality. Keep in mind the following file considerations when you assign a custom icon to an agent:

  • Supported file types: PNG
  • Color icon resolution limit: 192x192 pixels
  • File size limit: 1 MB

A transparent background works best due to the extra padding that's applied by default around your icon.

Description

The description helps the Large Language Model (LLM) identify and use your agent for a specific task or situation. Make the description as short, precise, and simple as possible. The system also displays the description in the app file for use in the app catalog. If you don't enter anything in the Name field, the tool that creates the agent suggests a name based on what you enter in the Description. The character limit for the Description is 1,000 characters.

Instructions

The text that you enter in the Instructions field guides the agent on how to behave and respond to users. They provide specific instructions to the Large Language Model (LLM), including the tasks the agent should perform and how it should complete them.

The beauty of the agent tools is that the user provides natural language instructions, and the tools generate the behind-the-scenes programming code for you based on the instructions that you enter. This feature is why an everyday business user with no programming experience can create an agent - the agent tools do the programming for you. The character limit for the Instructions is 8,000 characters.

Here's some examples of instructions for various tasks along with explanations as to why they're suited to agents that are created by users with no programming background in Microsoft 365 Copilot Chat and SharePoint:

  • General assistance. "Provide users with information about the site, help them navigate through different sections, and answer any questions related to the content available on the site."
    • Evaluation: These instructions apply to a general, user-friendly task that would be easy to implement in agents created in SharePoint and Copilot Chat. The focus is on helping users navigate the site and access information, which is common for simple chatbots or virtual assistants built without coding.
  • Task-specific instructions. "Assist users in locating key documents related to the Fabrikam project. Help users navigate the project's document library, provide brief descriptions of key files, and offer easy access to project timelines and milestones."
    • Evaluation: These instructions focus on simple, user-friendly tasks like document navigation and providing brief descriptions instead of complex tasks like summarization. These instructions are well within the scope of agents in a no-code environment, especially for users who are just looking for access to relevant files.
  • Customer support. "Help users with common issues related to the site, such as accessing documents, understanding site features, and troubleshooting common problems. Direct users to the appropriate support channels if the issue can't be resolved."
    • Evaluation: A customer support agent that helps troubleshoot common issues or guides users to the appropriate channels is a common use case in SharePoint and Copilot Chat. These instructions are focused on providing assistance based on user interaction, which is straightforward for these two platforms that integrate with help desk tools and common support workflows.
  • Content discovery. "Help users find and explore relevant content on the site based on their interests. Suggest content such as news articles, updates, or key documents that may be of interest, and keep users informed about important updates."
    • Evaluation: These instructions simplify the content discovery process by providing suggestions based on user interests, without diving into more complex recommendation algorithms. They also highlight basic features that can be implemented in SharePoint and Copilot Chat, like sending updates and suggesting articles or documents.

The two agent tools, Copilot Studio and the Copilot agent tool in SharePoint, translate the natural language instructions that you provide into programming code that controls the tasks the agent performs. As such, you should be as detailed as necessary in your instructions. Remember - the agent tools can't read your mind. If your instructions are a little ambiguous or lacking in detail, the tools aren't going to make assumptions and fill in the missing pieces.

Knowledge

Both tools allow you to configure specific knowledge sources for the agent to reference. This feature helps the agent provide more relevant answers based on specific files, folders, and SharePoint sites. These source items can be sites, folders, and files. You can also specify whether Web content should be used in generating answers.

Here are some examples of how users commonly utilize this Knowledge section:

  • Index external data. Users often add external data sources to their agents to improve relevance and context. For example, IT administrators can configure Graph connectors to index data from intranet websites, Azure services, ServiceNow, Salesforce, Confluence, and more. Doing so allows the agent to provide comprehensive answers by accessing a wide range of information.
  • Enhance generative answers. By adding knowledge sources, users enable their agents to provide generative answers. In doing so, agents can find and present information from multiple sources, both internal and external, without needing to create specific topics. This feature is useful for quickly deploying functional agents that can address a wide range of customer questions.
  • Customize knowledge sources. Users can specify up to 20 knowledge sources, including SharePoint sites, document libraries, folders, files, and Microsoft Graph connectors. You can add SharePoint pages, including pages from the Site Pages library, as knowledge sources for an agent. You can do so by providing the SharePoint URL when setting up the knowledge sources for the agent. Customized knowledge sources allow the agent to access specific data relevant to the user's needs, ensuring the information provided is accurate and tailored to the context.
  • Support enterprise data. Knowledge sources can include enterprise data from Power Platform, Dynamics 365, websites, and external systems. This integration enables agents to provide relevant information and insights for customers, making them more effective in addressing user queries.

You can include up to 20 source items as the knowledge source of an agent. For example, you can include any of the following combinations of source material:

  • 20 files
  • 20 sites
  • 20 folders
  • 10 files + 10 sites
  • 4 folders + 16 files

If you need more than 20 source items, you can nest the data at a higher level and source the agent to that level. For example, suppose you have 30 documents spread across multiple folders that you want to include as knowledge sources for your agent. Instead of adding each document individually (which exceeds the 20-item limit), you can create a higher-level folder that contains all the relevant folders and documents. Then, you can add this higher-level folder as a single source item for the agent.

The following sections describe the various knowledge sources that you can define for an agent.

Web content

In Microsoft 365 Copilot Chat, web content can be enabled or disabled during agent creation or editing. When enabled, the agent can use publicly available web information to augment its responses, and these responses are typically accompanied by citations and an icon indicating web content use. When disabled, the agent relies on its pretrained knowledge and any specific knowledge sources you configured.

Important

The ability for users to toggle web content on or off depends on the organization's settings. If an IT admin disables the "Allow web search in Copilot" policy, the web content toggle is unavailable to users. In such cases, users can't enable web search even if they have the necessary permissions.

By default, Copilot agents have access to general knowledge, which includes information the underlying large language model (LLM) was trained on. If you want your agent to focus solely on specific knowledge sources you provide, you can disable the "Allow the AI to use its own general knowledge" setting. Doing so ensures the agent only uses the knowledge you explicitly configured.

For example, if you're creating a finance-focused agent and disable general knowledge, the agent won't be able to answer unrelated questions, such as "How do you tie a necktie?" However, if general knowledge is enabled, the agent might still provide an answer based on its pretrained knowledge, even if it's outside the intended scope.

SharePoint content

The agent can reference specific SharePoint sites, files, and folders as its knowledge source. When referencing sources from SharePoint, consider the following limits:

  • A total of 20 knowledge sources (including sites, folders, and files) can be selected for each agent.
  • Files already uploaded to SharePoint might have existing permissions and sensitivity labels, which are respected when the agent is generating a response.

The following table lists the supported file types and their respective limits.

File type File size limit
.docx 512 MB
.doc 150 MB
.pdf 512 MB
.txt 150 MB
.pptx 512 MB
.ppt 150 MB
.html 150 MB

When you select a hub site as a knowledge source, the agent automatically includes the hub site's associated sites as knowledge sources of the agent. As such, responses are based on information from both the hub site and its associated sites.

Agents currently don't use data from SharePoint Lists. Also, you can't add pages from the Site Pages library as a source for an agent.

Note

You can't use SharePoint as a knowledge source if Restricted SharePoint Search is enabled.

Entering a URL for a SharePoint site or folder

You can enter a URL for a SharePoint site or folder, such as contoso.sharepoint.com/sites/policies. The agent searches the URL and sub paths. For example, a URL such as contoso.sharepoint.com/sites also includes sub paths like contoso.sharepoint.com/sites/policies. The agent uses relevant information to provide a targeted response.

You should keep in mind the following considerations when entering a URL for a SharePoint site or folder:

  • Recognized SharePoint URLs are from the sharepoint.com domain and contain the path {org}.sharepoint.com/sites/{site}.
  • SharePoint site URLs can't be more than two levels deep.
  • Only modern pages are supported.
  • Content from classic .aspx pages on SharePoint isn't used to generate answers.

Select files or folders from the SharePoint file picker

You can also select files or folders from the SharePoint file picker. The left pane displays your recently accessed SharePoint sites. To view more SharePoint sites, select More places. If you recently created a site, it appears after several minutes.

The SharePoint picker might not show all the communication sites that you have access to. Communication sites only show up in the Quick Access and Recent sections of the SharePoint picker.

After you select a site, you can select several files and folders. Doing so adds the SharePoint file or folder to the agent's Knowledge sources. When the same site includes multiple folders, select the button next to the folder name to view other folders.

Screenshot showing the Knowledge section in the agent builder and a Documents folder on the Pick items page.

You can also use the picker to upload files into a folder on a SharePoint site. The file appears in the folder after it finishes uploading, at which point it's ready for use in the agent tool. When new files are uploaded to SharePoint, they can take up to several minutes to be ready for the agent to include in its response. You can still test your agent in the test pane if sources aren't ready. However, responses don't include information from the newly uploaded file until it's ready.

You can check the file readiness by looking in the Knowledge section in the Configure tab. The system displays the word Preparing next to the file. If you rename or delete the underlying file that's uploaded to SharePoint, the agent picks up the changes. You can also select the Reload icon on top of the Knowledge section to manually reload the state.

Screenshot showing the Knowledge section in the agent builder with a file that has the Preparing status highlighted.

Microsoft Graph connectors

Microsoft Graph connectors allow agents to include knowledge from external repositories or systems such as customer accounts, incident tickets, and knowledge articles. Administrators must enable and configure Microsoft Graph connectors in the Microsoft 365 admin center. At first, the connectors may be collapsed in the From your organization section of the Knowledge sources.

If at least one connector is enabled, you can add it to your agent. Your agent can answer questions related to that connector. The information retrieved from the connector is indexed and refreshed according to the way in which the connector was configured. The agent can cite relevant information from the indexed data and link the end user to the data source.

Screenshot showing the Microsoft Graph connectors in the Knowledge section on the agent builder.

Capabilities

The Capabilities section is only available in Copilot Studio when creating agents for Microsoft 365 Copilot Chat. This section allows you to enable the Code interpreter and Image generator features in your Copilot Chat agent. The following sections describe how you can enhance your agent through each of these features.

Code interpreter

The Code interpreter enables the agent to solve complex tasks using Python code. However, you don't write the Python code that's used by the agent - that's the job of the Code interpreter. You enter a natural language prompt in the agent, and the Code interpreter interprets the meaning of your prompt and generates Python code behind the scenes to satisfy your request. Just as you don't need programming experience to create the Instructions for an agent, you also don't need programming skills to use the Code interpreter.

The inclusion of the Code interpreter capability in an agent might seem contradictory at first, but it actually serves a valuable purpose. The Code interpreter capability enhances the agent's functionality and allows it to perform complex tasks without requiring users to write code. This feature ensures the agent remains accessible and user-friendly while offering powerful features for the users who need them.

The Code interpreter can handle various tasks such as solving math problems, analyzing data, and generating visualizations. For example, you can ask the agent to graph the first 20 numbers in a Fibonacci sequence or create a word cloud of top pet names. The code interpreter runs the code, outputs the results, and produces images or files based on the scenario. It can also accept files as input for modifications and analysis.

The following list shows the same sample instructions for an agent from the prior section on Instructions. For each of these agents, let's assume the user also wants the agent to perform some type of advanced functionality. Here's a list of example instructions the user might enter in the Code Interpreter tool to expand the functionality of the agent. These examples give you an idea as to the type of advanced tasks an agent can perform by using the Code interpreter.

  • Instructions for a General assistance agent. "Provide users with information about the site, help them navigate through different sections, and answer any questions related to the content available on the site."
    • Code interpreter instructions. "Provide a detailed summary of the site's structure and list the main sections and their contents."
  • Instructions for a Task-specific agent. " Assist users in locating key documents related to the Fabrikam project. Help users navigate the project's document library, provide brief descriptions of key files, and offer easy access to project timelines and milestones."
    • Code interpreter instructions. "Retrieve the most recent documents related to the Fabrikam project and provide a summary of their contents, including key milestones and deadlines."
  • Instructions for a Customer support agent. "Help users with common issues related to the site, such as accessing documents, understanding site features, and troubleshooting common problems. Direct users to the appropriate support channels if the issue can't be resolved."
    • Code interpreter instructions. "Detect common user issues from chat logs and provide an automated response with possible solutions based on previous issues."
  • Instructions for a Content discovery agent. "Help users find and explore relevant content on the site based on their interests. Suggest content such as news articles, updates, or key documents that may be of interest, and keep users informed about important updates."
    • Code interpreter instructions. "Analyze user browsing behavior to recommend new content based on their previous interactions and interest in project-related documents."

The Code interpreter provides the following benefits:

  • Enhanced functionality. The Code interpreter allows the agent to perform complex tasks that would otherwise be difficult or impossible to achieve without coding. For example, tasks might include solving math problems, analyzing data, and generating visualizations. When you enable this capability, the agent can handle a wider range of tasks and provide more sophisticated assistance to users.
  • User-friendly interface. Even though the underlying functionality involves coding, the interface presented to everyday users doesn't require any coding. As previously stated, if a user employs this feature, they interact with the agent through a natural language prompt. In turn, the code interpreter interprets their prompt and generates coding behind the scenes that supports their request. As such, users don't need to write or understand code to benefit from this feature's advanced capabilities.
  • Automated solutions. The Code interpreter can automate complex processes and provide solutions without requiring user intervention. For example, users can ask the agent to analyze a dataset or generate a visualization. In turn, the agent executes the necessary code to deliver the results. This automation simplifies tasks for users and saves time.
  • Flexibility and customization. For users who have some technical background or work in environments where coding is common, the Code interpreter offers extra flexibility. It allows these users to apply the agent's capabilities to their full potential, while still providing an experience for those users with programming background.

Image generator

The Image generator generates images based on user prompts. It uses Microsoft's existing Designer functionality to create visually appealing and contextually relevant graphics. For instance, you can ask the agent to create an image of a serene beach at sunset with palm trees and gentle waves or design a flyer for a summer music festival. The image generator can produce multiple images for each prompt, and users can interact with these images by viewing them in full size, downloading, or modifying them with subsequent prompts.

Starter prompts

Starter prompts are predefined suggestions or questions designed to help users initiate a task or conversation. They can be used in various contexts, such as writing, meetings, or using AI tools like Copilot. If you select a template, the system inserts predefined starter prompts related to the selected template.

Starter prompts help other users understand commonly supported scenarios by your agent. Each starter prompt comes with a name and description. There's no maximum number of starter prompts for agents created in Copilot Chat. However, agents created in SharePoint have a current limit of three starter prompts (although that number may change going forward).

  • When you create a Copilot Chat agent using Copilot Studio, it automatically creates six starter prompts in the draft version of the agent. You can add an unlimited number of prompts besides the six prompts created by the tool.
  • When you create a SharePoint agent using the Copilot agent tool in SharePoint, it automatically creates three starter prompts in the draft version of the agent. Since you're limited to three prompts for a SharePoint agent, if you wish to add a different prompt, you must replace one of the system-generated prompts.

In both cases, you can modify these system-generated starter prompts or replace them with your own custom prompts. Here are some starter prompt examples to consider for various tasks:

  • Meeting preparation. "Help me prepare for an upcoming meeting regarding [Meeting topic] with [person] based on our recent communications."
  • Content creation. "Create a presentation for my upcoming meeting regarding [meeting topic] with [person] using the following document as a reference."
  • Summarization. "Summarize the following document with short bullet points."
  • Task management. "Generate a list of actionable next steps for the team based on the discussion."
  • Data analysis. "Analyze the data in the attached spreadsheet and provide insights on trends and patterns."
  • Customer support. "Help users with common issues related to the site, such as accessing documents, understanding site features, and troubleshooting common problems."
  • Content discovery. "Guide users in discovering new and relevant content on the site. Provide recommendations based on user interests and previous interactions."