
How to Build Your Own AI Agent in Microsoft 365
Where should you actually build an AI agent in Microsoft 365 – in Agent Builder or in Copilot Studio? In the following article, we build the same agent twice, step by step, and compare licensing, capabilities and publishing options for both tools.
AI agents in Microsoft 365 are becoming an increasingly common part of everyday work – they make it possible to automate answers to repetitive questions, search company documents or prepare summaries. Within the Microsoft ecosystem there are two main places where such an agent can be created. Each of these tools serves a different purpose and involves a different level of complexity in the agent-building process itself.
Below I present both paths using the same example: an agent that answers questions about the latest changes in Microsoft 365 and Copilot.
Required licenses
In both cases the starting point is a Microsoft 365 account with access to Copilot. A Microsoft 365 or Office 365 license alone does not automatically grant access to all agent-building features. Access depends on the Copilot services assigned to the user.
In practice this means that simple agents for employees can be built within an existing Microsoft 365 Copilot license, whereas agents published outside Microsoft 365 (e.g. on a website) require an additional Copilot Studio subscription.
Depending on how the agent is used, Microsoft may charge for Copilot Credits consumption. This applies primarily to scenarios published outside Microsoft 365, integrations with external systems, advanced AI actions and agents used by people from outside the organization. Internal agents used by licensed Microsoft 365 Copilot users usually do not generate any additional Credits consumption
The purpose of the agent in this article
The agent’s task will be to answer questions about the latest changes in Microsoft 365 and Copilot based on the file “Podsumowanie zmian 2026 Copilot Summary”.
Users will be able to ask about new features with questions such as: “What changes appeared in Copilot in 2026?” or “Summarize the most important updates in Microsoft 365 Copilot Chat”.
The file in question is divided into four main thematic sections:
- CRM – Copilot summary (Summary Copilot),
- Copilot’s file access permissions,
- Copilot Studio – configuring summaries,
- Teams Rooms.
The same goal will be achieved using two methods – first in Agent Builder, and then in Microsoft Copilot Studio.
Method 1: Agent Builder in Microsoft 365 Copilot
Opening Agent Builder
I open the Microsoft 365 Copilot app (m365.cloud.microsoft/chat) or the Microsoft 365 Copilot app on a Windows computer, and then in the left-hand pane I select “New agent”.
Describing the agent in natural language
In the dialog field I describe the agent in natural language. Example wording:
“Create an agent that answers questions about the latest changes in Microsoft 365 and Copilot based on the file Summary of Changes 2026 Copilot Summary.docx”
Based on that description, Agent Builder automatically suggests a name, a description, instructions and suggested knowledge sources.
Manual configuration
I go to the “Configure” tab to fill in or modify the details manually. The following fields are available:
- Name – the agent’s name as visible to users, e.g. in the chat window and in the agent catalog.
- Description – a short description of what the agent does. This field is not only a showcase for users: Copilot also uses it in the background to recognize when a given agent fits a given task (e.g. when it is @mentioned in a conversation). That is why it is better for it to be concise and specific rather than as elaborate as marketing copy – the more precise it is, the easier it is for Copilot to pick the right agent.
- Instructions – these are key for the agent: specific guidelines for the model that define how the agent should behave and carry out tasks. Well-written instructions usually break down into several elements: the agent’s purpose and role (who it is and why it exists), its scope of operation (what it should and should not do), how it should use the attached knowledge, and the tone of voice.
- Suggested prompts – example starter questions displayed to users, making the first contact with the agent easier.
Adding knowledge sources
In the “Knowledge” section I add a specific file – Summary of Changes 2026 Copilot Summary.docx.
Agent Builder also allows you to add public URLs that the agent will use to find information, but this time I am not adding any addresses.
In addition, I can enable Web search so that the agent supplements its knowledge with current search results, beyond the pages I have indicated.
Testing the agent
At the top there is a “Try it” tab – that is where I can test the agent. I ask a test question, e.g.: “What changes in Copilot appeared in 2026?” and I check the agent’s answer together with its references to sources
Creating and sharing
After saving the agent I click the “Create” button. I can then share such an agent with others in my organization. Three sharing paths are available.
Method 2: Microsoft Copilot Studio
Opening Copilot Studio
I open Microsoft Copilot Studio (copilotstudio.microsoft.com) and sign in with my work account. In the left-hand pane I select the “Agents” tab and then click “+ Create a blank agent” at the top of the screen, or I describe what the AI agent should do in natural language – just as in Method 1.
Basic configuration
After choosing “Create a blank agent”, a window appears in which I give the agent a name and can optionally also set:
- Language – the language in which the agent conducts conversations by default.
- Solution – a concept from Power Platform/Dataverse, on which Copilot Studio is built. It is a kind of container that the agent and its related components are placed in – this makes it easier to manage the agent and move it between environments, e.g. from test to production.
- Schema name – a unique, technical name for the agent in Dataverse, separate from the name visible to users. It is worth setting it deliberately: unlike the other fields, the language, the solution and the schema name can no longer be changed once the agent has been created. Fields such as name, description and instructions are similar to those in Agent Builder.
Adding knowledge sources
In the “Knowledge” section I select “+ Add knowledge”. Copilot Studio offers several types of sources – documents, SharePoint, Dataverse, public websites and connectors. I select my file.
Testing the agent
On the right-hand side of the screen there is a “Test” panel. I ask a test question, e.g. “Summarize the 2026 changes in Copilot”, and check how the agent uses the connected sources.
Connecting the Microsoft 365 Copilot and Teams channel
I go to the “Channels” tab and select “Microsoft 365 and Microsoft Teams platform”.
After clicking, the configuration panel for this channel opens. It explains what publishing means in each of the two places:
- Microsoft 365 Copilot – publishing the agent in the Agent Store makes it possible to find and install directly from within Copilot and other Microsoft 365 apps, such as Word, Excel, PowerPoint, or Outlook.
- Microsoft Teams – the agent becomes directly available in Teams chats, meetings, and channels. Users can use it once they’ve been granted access, or once it’s been approved by an administrator if it’s meant to reach a wider audience.
I check the „Make agent available in Microsoft 365 Copilot” checkbox and confirm. The system confirms with the message „Channel added,” and a card for my agent appears at the bottom of the panel.
Once the settings are saved I can copy the installation link and share it with users, who will install the agent in Microsoft Teams and Microsoft 365 Copilot, or I can download a ZIP file with the configuration.
Additional capabilities of Copilot Studio
Both methods lead to the same goal, but Copilot Studio offers several features that simply do not exist in Agent Builder. They are worth keeping in mind when choosing a tool, if the scenario goes beyond a simple assistant answering questions from a document.
- Extensive knowledge sources and integrations – besides documents and SharePoint, there are also Dataverse, premium connectors (e.g. Salesforce, ServiceNow, Jira, SAP), your own APIs and custom connectors.
- Topics and conversation flows – you can define specific conversation topics with your own logic, conditions, variables and branching, instead of relying solely on the language model.
- Actions that call external systems – the agent can send a message, create a ticket in a ticketing system, trigger a Power Automate flow or call any API.
- Publishing outside Microsoft 365 – agents can be published in Microsoft 365 Copilot, Teams and other channels supported by Copilot Studio, such as websites or custom applications.
- User authentication – configurable authorization (Entra ID, OAuth) – especially important in scenarios involving external customers.
- Analytics and environment management – extensive reports on usage, satisfaction and conversation effectiveness, as well as separate Dev/Test/Prod environments and collaboration between multiple authors on a single agent.
- “Custom engine” agents – the ability to build an agent with your own language model and your own orchestration, outside the Microsoft 365 Copilot engine.
Summary
In Microsoft 365 there are two main places where you can build an AI agent, and each of them serves a different purpose. Agent Builder in Microsoft 365 Copilot is the fastest route to a simple internal agent based on a few knowledge sources and shared with users within the Microsoft 365 ecosystem. Microsoft Copilot Studio is a platform for more advanced scenarios – with your own conversation logic, actions that call external systems, and publishing outside Microsoft 365. The choice of method depends on what the agent is supposed to do and where it is to be used, which is why it is worth knowing both paths and deciding deliberately which one to use in a given project.
Sources
- Microsoft Learn – Build agents with Agent Builder in Microsoft 365 Copilot
- Microsoft Learn – Add knowledge sources to your declarative agent in Microsoft 365 Copilot
- Microsoft Learn – Share and manage agents built with Microsoft 365 Copilot
- Microsoft Learn – Copilot Studio – Get started
- Microsoft Learn – Connect and configure an agent for Teams and Microsoft 365 Copilot

