Want to create your own Copilot Studio agent? This small clip from my Copilot Studio intro course on Pluralsight shows you the basics on how to create your first agent with Copilot Studio!
If you want to learn everything, check out the course here
Watch my 100+ courses on Pluralsight
Video Summary
- Adding the SharePoint site URL to the agent’s knowledge base ensures clarity for future reference.
- The agent creation process is quick, taking less than a minute, with markdown formatting making instructions easy to read.
- Testing the agent with a question about the expense policy, which it successfully retrieves from the specified SharePoint site.
- The agent displays the requested information along with the source link, ensuring transparency.
- Initial setup is impressive, but there’s room for further optimization to enhance the agent’s performance and capabilities.
For more information, read the transcript blog below, or watch the video above!
Video Transcript
Now that we know the base architecture, let’s go ahead and create our first agent. Creating an agent is easy to do from the Copilot Studio web interface, but you do need to prepare a few things in advance to make this experience even faster. A few things you need to prepare before creating your agent are your agent name and the agent icon. I highly recommend that you work with your marketing and communications department to ensure they are visually appealing. Of course, you also need to provide an agent description so people know what they are using. So far, so easy. But after that, we have the agent instructions and the agent knowledge, which are a bit more advanced. So let’s dive deeper into them.
First, let’s talk about agent instructions. This is where you tell the agent what its role is, what it should do, how it should answer back, and whether it should be funny or serious. If we break it down, there are a few things you need to make sure that your instructions cover. First of all, the purpose: make sure that you clearly define the role and the area of expertise of the agent, including the primary functions that it serves. Next up, the guidelines: define how the agent should communicate. An agent might be concise, detailed, interactive, or suggestive. After that, tell the agent the main tasks that it is expected to perform. This can include generating suggestions, automating tasks, providing explanations, or guiding a user through a process. Finally, another important aspect is non-standard terms that the agent might not understand, such as any unique acronyms that only your organization uses. Instructions have a limit of 8,000 characters, and while that might seem like a lot, I have seen companies use it all. You can also use markdown to emphasize or organize your instructions. Markdown is a markup language that allows you to format plain text documents with special characters.
Let’s take a look at an example and start with the purpose. We can tell our agent: “You are an HR onboarding assistant designed to help new employees transition smoothly into their roles. Your goal is to provide essential onboarding information, guide employees through setup steps, answer common HR-related questions, and escalate complex issues when necessary. You should be friendly, professional, and efficient in all interactions.” Now let’s talk guidelines. The formatting, such as the hashtag, is markdown, but it is not mandatory. As you can see in the example on the screen, I tell my agent what tone to use, what to do, and what not to do. For example, “Do not provide confidential or personal employee information.” Next up, let’s talk about the skills, which are the main tasks that an agent is expected to perform. In this case, I tell the agent that it should retrieve and summarize HR policies, guide employees through IT setup like email, Teams, VPN, multi-factor authentication, and so on. I really tell my agent what tasks it will have to do when my users interact with it. Finally, I’m sharing some non-standard terms that my users or my documentation might use, such as “learning engagement unit,” or that “PS” means Pluralsight, or that “Excalibur” is the name of our intranet. Imagine if we never told our agent that Excalibur is the name of our intranet and somebody asked for a link to it; the agent would have no idea what they’re talking about.
Now let’s talk knowledge. What knowledge should this agent have? Should it have general AI knowledge, which is the public knowledge of the large language model on which it was trained? Should this agent access any public websites, any specific SharePoint sites, Dataverse tables, or can they even simply upload specific documents with knowledge for this agent? Now let’s go ahead and create our agent. Let me go create over here, click on “New Agent,” and the first thing I want to talk about is you see by default, the primary language here is English. If you want to edit it, you have to do it right now because once created, you cannot change the language of your agent. So let’s start giving it a name. The name of my agent is “Global Mantics HR Onboarding Agent.” You don’t need to add “agent” to the name. The best thing would be to work with your IT department and figure out what governance you want to put in place on naming, icons, and things like that. This way, all the agents that your company creates follow the same pattern. So you must work with IT as well as communications to pick the right icon, name, and things like that. This way, every agent you create makes sense for your users.
Now let me add a description here: “This is the Global Mantics HR agent that helps new hires with questions about Global Mantics.” And then my instructions. Now I will copy this; it’s what I showed you in the slides a bit earlier. If ever you want to try it as well, I’ll give you all the instructions that you can download as part of the exercise files. Let me put those in. There we go. You see, “You are an HR onboarding assistant for Global Mantics,” and really everything that we have covered in the slides. Something that I want you to notice: you see here I use markdown for headings, things like that, and here in plain text. However, after we create the agent, you will see that it understands it and formats it correctly. But just remember, here we use markdown, and I’ll show you the result after in just a few seconds.
After that, we need to add the knowledge. At creation, you don’t actually have all the different options. You can add a public website, you can add one or more SharePoint sites, and if we go in advance, you see we cannot add those yet. So you cannot add anything if you don’t want to, if the option you want isn’t there. But for me, I want to pick SharePoint, and I have my intranet here called Excalibur. Let me copy the URL of this SharePoint site here and click on “Add.” Great, it added the link, the name, and the description. I can, of course, optimize those, so if I go back to it or somebody else goes to edit it, they understand exactly what each knowledge source should be. Great, I clicked on “Add” here. You see, I have the Excalibur site; everything looks good. So let’s go ahead and click on “Create.” Now it should only take anywhere from 10 seconds to 1 minute, and wow, in this case, it only took less than a minute to create it. It’s still loading here, but there you go. What I wanted to show you in the instructions is that markdown is now formatted, so you see it looks pretty. That is a big advantage of using markdown in your instructions. When you consume it in the user interface, it will be a lot easier to consume.
Let’s do a quick test to see if it works. We haven’t optimized anything yet, right? We just gave it instructions and told it where to look. Let me type a question for my agent: “What is the expense policy for Global Mantics?” Let’s see if it goes to get it. We’ll give it a few seconds; we just created it, so it might not work right away. But there we go. The expense policy for Global Mantics is as follows: I get all the information, and then I also see where it came from. If I look at it here, you see it shows me the link to the file inside Excalibur, where it found that knowledge. For now, the only thing we have done is give knowledge and instructions to our agent. It’s already pretty amazing, but can we make it better?