Citizen Developer
  • All of Microsoft
  • My Role
    • All in My Role
    • Citizen Developer
  • Focus
    • All in Focus
    • Generative Pages and Apps
    • Microsoft Copilot Studio
    • Copilot Studio - Agent Step-by-Step
    • What's Hot
    • M365 Release
Timespan
explore our new search
Copilot Agent Builder: answer from your own files
Microsoft Copilot Studio

Copilot Agent Builder: answer from your own files

by HubSite 365 about Damien Bird

Power Platform Cloud Solutions Architect @ Microsoft | Microsoft BizApps MVP 2023 | Power Platform | SharePoint | Teams

Build a no-code Copilot agent that answers questions from a linked SharePoint folder, then test and share it with your team.

Key insights

  • The example agent uses a linked SharePoint folder as its knowledge source.
  • A description is required to test the agent in Preview.
  • The creator switches Outlook, Teams and web search off in the example.
  • Instructions can explain which file contains particular information.
  • A Microsoft 365 Copilot license is listed as a requirement.

Copilot Agent Builder lets you create a no-code agent that answers questions using information from selected files, rather than relying on a broad, general-purpose chat. It is useful for Microsoft 365 Copilot users who need a focused assistant for a recurring set of questions. Damien Bird demonstrates the setup with an example whisky guide grounded in a SharePoint folder.

What it does

An agent combines a defined purpose, instructions and selected knowledge sources to answer questions in a particular context. In this example, the agent is called Glen Damo Whisky Guide and uses a linked SharePoint folder containing sample business files. The intended result is a conversational way to ask about information in those files, such as the price of a sherry cask.

The approach is different from asking a general Copilot question without specifying a knowledge base. The creator chooses the information the agent should use and can also set whether other sources are available. In the example, Outlook, Teams and web search are switched off, leaving the linked folder as the agent’s knowledge source.

That source selection matters because a useful answer depends on the agent having access to the relevant, up-to-date information. The example also shows that adding information to a file does not automatically guarantee that the agent will interpret it as intended: when new non-whisky gifts are added to a workbook, the agent initially misses them. An instruction clarifying the workbook’s contents addresses the issue.

Who it is for and what you need

This workflow is aimed at people who have a recurring set of questions and a collection of documents that can answer them. Departmental subject-matter experts, team leads and other Microsoft 365 users can use the same general pattern for a focused knowledge assistant, without writing code. The example focuses on a small team sharing answers about products and prices.

A Microsoft 365 Copilot license is listed as a requirement for the demonstrated setup. The example uses a SharePoint folder as the knowledge source and shares the resulting agent with a team. Before building one for work, identify the folder that holds the information and confirm that it is the right place to maintain the source content.

The description is also a practical prerequisite for testing in Preview: Preview will not test the agent without one. Start with a clear description of the agent’s purpose and audience, then check the configuration before relying on responses.

How it works

The setup follows a compact sequence: define the agent, connect its knowledge, constrain its behavior and test questions against real content. Agent Builder lets you make these choices without a coding environment. The steps below capture the configuration used for the example agent.

  1. Give the agent a name and description that make its purpose clear. The description is needed to test the agent in Preview.
  2. Write instructions that define how the agent should answer. Be specific about the content it should cover and tell it which file contains which kind of information. An instruction about the workbook helps the guide recognize newly added gift products.
  3. Link the SharePoint folder that contains the files the agent should use. Linking a folder instead of uploading individual files is the recommended approach in this example, keeping the connected location as the knowledge source.
  4. Review the other available sources and turn off those that are not needed. In the example, Outlook, Teams and web search are disabled to keep the guide focused on its file-based knowledge.
  5. Add suggested prompts to give users examples of questions they can ask. Then test the agent in Preview with a concrete question, such as the £60 sherry cask question.
  6. Once the answers and source setup are satisfactory, share the agent with the team. Check the knowledge access Copilot offers during sharing so recipients’ access to the connected content is understood.

Testing should include questions that the source files clearly answer, as well as questions that expose gaps or ambiguous wording. The gift example is a useful reminder to test after source files change: an instruction can help explain how information is organized, but the agent still needs to be checked against the updated content.

Limitations and alternatives

The example is a file-grounded agent for answering questions, not an agent configured to take actions. Its scope depends on the connected information and the instructions that explain how to use it. If a file does not contain an answer, or if its contents are unclear to the agent, users should not assume the agent will infer the intended result correctly.

Keeping the source material current is part of operating this kind of assistant. When a workbook changes, test the questions that depend on it again; the example shows that a newly added product was initially missed. Clear instructions about the role of each file can help, but testing remains a practical check before relying on an answer.

Linking a folder is presented as the preferred approach in this example, rather than uploading files one by one. That makes the folder itself the focus of the connection, but it also makes it important to select the intended location and check the knowledge access shown when sharing. The example highlights this access check as a practical step.

The illustrated business, people and files are fictional sample data, so the specific whisky prices and product details are examples, not real business information. The useful takeaway is the build pattern: select a bounded knowledge source, explain its contents, turn off irrelevant sources, and test representative questions before sharing.

Sources

Frequently asked questions

What license do I need to build this Copilot agent?

The demonstrated setup lists a Microsoft 365 Copilot license as a requirement.

Can a Copilot agent answer questions from a SharePoint folder?

Yes. The example links a SharePoint folder as the agent’s knowledge source and tests it with questions about the files.

Why does Preview need an agent description?

Preview will not test the agent without a description.

How can I help the agent find information in a workbook?

Use the agent’s instructions to explain which file contains what information, then test questions against the workbook.