Copilot Studio Agents Explained Through a Real Demo

Anders Jensen · Intermediate ·✍️ Prompt Engineering ·5mo ago

Key Takeaways

Copilot Studio agents are explained through a real demo of building an end-to-end agent with topics and tools

Full Transcript

Let's build a complete end-to-end AI agent here in Microsoft Copilot Studio. Our agent today will be able to draft and create tender material that is word documents and it will also be able to evaluate incoming bits afterwards. Let's get started. We will do this step by step and I really hope you will join me here. So, open up a browser, navigate to copilotstudio.microsoft.com, hit agents, and up here you say create blank agent in the upper right corner. This will set up the basic agent. Let me fast forward a few seconds. That's it. Our agent has been provisioned. I really hope you will do this with me as I said because then you will learn 10 times faster. First, we will edit the details. So, click edit up here. we will give it a better name. Never choose the name to be agent, agent one or two, nor a name such as Robera or Anders. Always choose a name that says something about your agent. Then if you have a lot of agents, it will be very easy to maintain them. So here I will call this tender and embed agent. I can also change the icon. Keep in mind that this icon is for internal use. Later in this guide, we will change the icon once we publish it. So, we publish it to teams and copilot 365. We can change it there. Then we have the description drafts tender documentation and evaluate bits. Then remember to hit save here. That will save the basic details. Then we need to talk about our agents model. So click the drop down here. Once the agent produces answers, then it will use an underlying large language model. Here you can choose between a lot of them. For example, the entropic ones. Keep in mind that experimental if it says that Microsoft doesn't recommend them for production. So we will choose one of the other ones here. We can go with the reasoning, but that produces slow answers. So, I just prefer the DBT5 chat up here. That one produces quick quick answers of high quality. Then we want to give our agent instructions. So, you hit edit here. There we just instruct what this needs to do. So, something like always respond in a professional tone. when evaluating bits use and then I say bit evalu evaluation agent we haven't created that one yet this is a so-called child agent so this agent that we're building today can draft and prepare the tender material but it will also be able to evaluate these bits. So we will build a child agent for that. Microsoft also recommends that you split up your agents and that one we will try to teach you here. Then we can choose between knowledge. We will not add knowledge here. Web search I don't want to have my agent to go online. I can disable this by clicking in this box here. Now this basic one is ready. Remember to save the instruction as well. This is the skeleton. Now we also want to control the conversation. So whenever a user wants to create a tender material, we want to start a certain flow. We do that handle that over in topics. So click topics. These are topics that can guide the conversation. Let me start somewhere else. I want to start in the system topics. These are topics to make your agent work. You cannot delete those although you can disable them over here. I really don't recommend that. So just keep them as it is. Also go up to conversation start. If you click that, that is the trigger that is on conversation start. So each time a conversation is start with the agent then this will kick off that is the conversation start topic down here in message you can see it says something like hello I'm bot name bot name is a variable that equals this name up here that's also why you will see it says agent that was the name of the agent before we changed it this means that if I hit plus over here in test and if you don't see test over here it might looks like this you You can always get the test window by hitting text test here. Click the plus. Then you will say see it says I'm tender and bit agent. How can I help? If I go in here, I can change this message. That could be a guide to the user or simply just show you that I can change it. I will have an emoji that is the window key and a dot. And let's just do this. Not to say that you should use emojis in your agent per se. You can do that. But it's just to see that if I click here, I can hit save. Then we can really change it. And an emoji is a fantastic way of seeing that something changes because if I say start new test session, you can see it here. I can also do a lot of other things here. I can for example add a message variation. So then I can say hi I'm and similarly as we did up here we can see we use the botname I can use it down here so here I can say space and you use it up here in the insert variable here you can use these um uh variables we don't have any custom variables here you have the system and you also have some environments variable You want to go down here and then you want to search forbot name. You will have it here and then I can say I'm your AI agent. Something like this. Then I can hit save. Then we will also see that it randomizes between those two. So if I do this you will see that here we have the emoji. Here we have the tender in bit. I'm your AI agent. So it cycles between them randomly. All good. We now have understood the system topics. Then we want to create the custom topic. I go back up here and then over here in the custom topic I have the goodbye, greetings, start over, thank you. We want to create our own. So whenever the user wants to create tender documentation, this topic should kick off. We want to guide the agent. Click the add a topic up here from blank. Then you can see this topic is now called untitle. We want to call it create tender documentation and do like this. Then we can also say when should this trigger be kicked off. Then I can say something like what this topic does. If I say this topic can create tender documentation and make it available as a downloadable file. That's what we want to do. We want to see that uh let me just change the spelling. We can we want to see that this one here can create documents for us. Right now it does nothing other than kicks off. And then I also want to say I want a title for [snorts] the tender. So I click the plus down here and then I ask a question. So what is the title of the tender? Do like this. Then we want to capture the user's response. So this will not be a multiplechoice click here. And then you want to pick the user's entire response. Go hit that. Right now it's saved into a variable. A variable is a container for a value. However, it's called var one. Again, we want to name it. Well, click on the var one. Then this opens. We want to give it a better name. We can just call this one title like this. And then you see it changes here. We can close the variable properties. Again, I like to save sometimes. Now, I want to see that this topic can kick off and it can ask that question. Again, it will not stop there. So, it will probably talk more afterwards. That's completely fine. We just need to test that this topic works. So, click the plus over here. And then I can say I want to create tender documentation. Then we want to see that the topic kicks off. Here you can see a little lock here you can see that it's the create tender documentation the topic and here it says what is the title of the tender congrats you created your first custom topic and with a question and then I can just say software something like this you will now see that it says the tender documentation has been created the title you provided is software this is not happening this is just the agent talking we need to take care of that. No problem. Go back to topics up here. And here you can see the create tender documentation. Let's also gather some requirement for the bits. So we add another question by going down here, hit the plus, ask a question here. I can say what are the requirements for the bits. Again we want to take the entire user response. Hit this arrow uses entire response. Here you can see it says v one. So click it again. Go up here and then call it requirements. Then you will also see it updates down here. You can close the variable properties. Now we will use these two to have a last language model to write this tender documentation. So what we want to do here is to have AI write this on the base of the title and the requirements. Click the plus down here. What you want to do here is to add a tool. If you go up here you can see the new prompt. Go click that. So what this is that is a prompt inside the topic. Here we can send in variables variables with values such as a title and requirements have the text created and send the text back to the topic. Let's go do that. First of all the title is right now custom prompt. Let's go change that to write tender text. Then we go down here into the instructions. write a detailed tender text with the title. Here I can either write a forward slash or go down here to add content. As you can see by clicking this button, it will add a forward slash. I prefer to just add a forward slash since I'm already at the keyboard. So now we want to send in two values to this prompt. We will pick the text here. So what is the first one? that will be title like this. We can also give it some tambble sample data that is when we want to test it here in 2 minutes then we can just test it with some data that we put in for now don't worry this sample data will not be used in production it's just for testing so title and hardware we click close then we come back here then I can say the following requirements apply to submitted bits and then I can have a colon again. I can have a slash text and let's call this one cryments like this. It jumps a little bit around and let's have some sample data. Two large monitors, a server capable of running large language models and three laptops quality is very important. Do like this. So this is just sample data again. I can hit close. Let's also have it out. So this is the task and of course you can get much more detail about what you want. Since this is a demo we will stop here. Then you can also say well what model should we use? I think we will just go with the GBT 5 chat again and now we can test it since we provided sample data. So just click the test here as I do. Then you will see the test results over here. If that is what we want. Here you can see the tender text, the tender title, supply of hardware equipment, the tender description, scope of supply, two large monitor, one server capable of running large language model, tree laptops as well. This is formatted in markdown. If that's what you want, just uh keep this prompt or you can also go over here and say output the tender text. So I can copy it to word or so it can be copied to word. Don't use markdown something like this and then we can test it again. Now you will see that the model response will show up here. Then you will see it does not use these markdown formats, these stars. That might be a little bit prettier. But again, the task is not so much um about creating this. It's much more about how to get started. So if I zoom a little bit out, um as you can see, we have save button here. You can easily if it looks like this, it gets well hidden here. So I zoom a little bit out and say save. Now I also want to map this title and requirements because this prompt need a title and requirement. And let me zoom out to 100 again. If I scroll down now as you can see here we have a title coming in. This title was exactly the title that the user gave and similarly with the requirements. So I go here, hit this and just map the title. Same with the requirements. Click here, requirements. I can also see that I have an output. So if I go down here, I need to select a variable. Where does it need to get saved? Let's create a new variable for that by clicking create new variable. Here you can see that this is a record variable. So what I want to do here is to hit var one and then I want to say tender text. Then you will see it gets updated here and we can do like this. Now I also want to make this tender text available for download in the chat. That is it should be it should need it should create the actual document. For that, we want to create an so a so-called agent flow down here. So, what you do here is to click plus down here, scroll a little bit down, add a tool here, and then you want to say a new agent flow. Then, if it says this leave, don't leave, then you want to close it. And remember to save it up here. Although you lost the work, you're dead. Some as you can see even I do it um here and there but it warns you so you can still stay at the page. [clears throat] Now we say new agent flow. I really hope you like these live builds. Please give the video a thumbs up if you do. That way I can come out tomorrow and create even more videos if things goes well. So this is like a lot like Power Automate flow. If you haven't seen Power Automate before, don't worry. We will just create it. So here we want to send into this flow a uh tender text and a title. Then we want the file to be created. We cannot do that over in topic. So that's why we use this agent flow. Click when an agent calls the flow. As you can see here, we can send things in. So say add an input. Hit text. And this one could be the tender text or the title. also create a title like this. Then you can minimize the trigger. So this is a tool and this is actually also why it becomes a now it can do stuff for us. We want to create a Microsoft Word document with the tender text. So if I click plus here, search for create a Microsoft Word document and sometimes you need to say with the given content. It's a little bit sometimes it gets a little bit hard to search for this. As you can see, we have it here. So we need some content. I recommend that if you use a foreign language, right now we use English, that's all good. But if you for example use Danish as I sometimes do, you want to create an expression. So up here in the content, if you just use it in English, you can find go with this. But let me show you an a bit more advanced expression to if you use special characters. Let me show this. I prepared files for you for this lesson. If you want those, simply just download them from the link below. We have files that we use later in the video. And we have an expression. Double click here. Just copy this. And this is to I wrap it in HTML. So special characters, Danish characters can be used. But that was just to show you that you can do a lot of stuff here. You just need to get the right idea. You can also do it even though that if you don't use special characters just click the FX Ctrl +V. Then as you can see this tender text we need to change this. So delete the tender text and these um curly brackets. Go down to dynamic content and pick the tender text. As you can see here that will be a trigger body text as that is the first variable. Then you hit add and then you will see that we inserted it over here true and expression. Then we also need as I can see here we have one advanced parameter that is the file name. What should the file be called? I will just place it here. That will be in the my one drive root. We could also go more advanced and placed it somewhere else. Well, let's just hit the lightning and let's choose the title. So now the content will be the tender text and this will be the title. Now as you can see now I cannot change um the name here. I cannot go to overview. So what you do first is to save the draft and then you will see it comes up here untitle. Currently if I click in here then for some reason at least it has been to one drive at least it have been like this for longer time. If I click away then it goes back to untitle. No problem since we have saved it. I can just go to overview here and here we can change the name in the details. So click edit here. Now I can save it. Yes, it's a little bit of a workar around, but that's just how it is. If it works when you watch the videos, no problem. And here I hit save. Then we want to go back to the designer. You do that by clicking designer. And now you see we have a name. We also want to publish this. So I want to publish this agent flow to be able to use it in my agent as actually you can use this agent flow across agents. So this is reusable which is also nice. Let me close this. So now my flow has been published. Go back to agents here and go back to tender and bit agent. Go back to topics here. Create tender documentation. Scroll all the way down. Now you can click plus again here in the end. I can say add a tool. Now you see that we have this agent flow save tender to one drive. Go click that. Here you can see that this requires two inputs tender text and title. So tender text that was the one that we created up here. So I can go down here, click the three dots. Since this is a the of the type record this variable and this expects a string, you will just need to take the tender text dot text. Go click that. Similarly with the title, click the three dots here. Scroll a little bit down. And now the title is already a string. I can just pick that. Click away again. And here you can see that it saves the tender to one drive. You can also rename all these actions. You should probably do, but what you want to do then is to click the three dots rename. Never delet never delete the original name. So if I do this, I want to save tender to one drive. I want to do this and that is so I can easily see that this actually is an action. If I just called it save tender to one drive then it will be very hard to maintain this in the future. So what I also want to do I will not rename all of these although I will do it in production you can do it that is a good exercise as well. Well let's also send a message to the user. So what I want to do here is to click plus send a message. This might uh say something like tender created and save to one drive. We will also end the conversation so that the agent will not continue. I can hit the plus and then I will find a topic management and say end conversation like here. Now we can test it. So we save it. We will just use a simple one. Once it has saved then there we go then you can click plus over here. So here I want to say create maybe right tender. We will also make the start a bit more easy as this tutorial goes on. What is the title of the tender? Oh, we can say software license purchase or something like this. And then we can say what are the requirements? 300 power automate premium licenses something like this. Licenses is not super important. We just need to see it works. If this is the first time, it will also ask us to do can we use your word online account? Yes, please. And now it will save to my one drive. So this will get saved to the person's one drive and not just mine. If I choose to publish this agent, let us see it process here. Once we get the end message that the tender was created and saved to one drive, we can inspect the one drive that the file has actually been saved. Tender created and saved to one drive. Keep in mind that you just need to go to your one drive either in the cloud or here on my desktop. I go to my one drive and if I scroll all the way down you can see that I now have a file created called software license purch. We also have the document here. Bingo. You can now create documents. So we could refine this even more. Maybe we want to make it a little bit more easy for the user to use because we want to make a downloadable link here. Let me show you something. If [clears throat] I go over to flows here, there you will see our flow called save tender to one drive. That's also why I want to name these. Well, like it here you can see that this flow ran 1 minute ago. That makes sense. It took a it took 18 seconds. Go click that flow run and then you will see it here. If I go into the create a Microsoft Word document with the given content try click this. This is what comes into this action and what goes out. Click show row outputs. Here you can see that the status code of 200 that's a success. You can see some meta data and down here in the body that's the downloadable link for the document. So what I want to do now is to send this link back to the agent. What we want to do here is to edit our flow. So I say edit here. We want to click the respond to agent. Then we want to send the link from here out of this flow. So add an output text. Let's give it a name download link. I also want to say what value comes in. I hit the lightning here and under the create a Microsoft Word document with the given content, I choose the Microsoft Word document URL. Then we can publish it. That means that the changes will become available for our agent. So here we have it. I could probably also in now it says take save tender to one drive. I could probably also go to overview and say save tender to one drive and make link or something like that to download it just to update what it actually do. Of course we should also take care that it doesn't become too long because then it's hard to see or it's hard to read what it actually does. But I think this is okay. So now we publish it. We go back to our agent here. You want to go into the tender and bit agent. We want to go into the topic again. Create tender documentation. So here we want to go all the way down here. That means that as you can see here in this action now we have a download link coming out. We want to create a um a new variable for this. So here I will say create a new variable. If you see this, this is sometimes a weird um a weird error. I figured that if I click up here and click refresh and then the binding was finally match or maybe it's not. But if I write here download link something like this then it works. I'm not sure why but this is again a small glitch. Nothing too weird here. Then we can close this and go down here. Here I can say tender created and saved to one drive. I can also match download it here. Then I can download it directly. I just take this download link and have it here. I use this variable. Let's save and let's test it. I click plus again and then I go over here. I want to create tender documentation. Then it will again go it will ask me the title let's say software what are the requirements eight licenses for a good meeting minutes application four licenses for all major language models to Microsoft 365 licenses prices vary important something like this and again since we have updated the tool it will again come and ask us to verify the connection. This is only the first time and also when the user when we published it this we need to do it the first time and the first time only. So here as you can see here tender created and saved to one drive downloaded here. If I click this then you will see that this download [snorts] starts and now I have it direct linked I have it downloaded and now I can edit it directly. Then we also want to create a child agent. So once this tender is created then bits are coming in we need to evaluate those um up on the tender material. We want to create a child agent. We can do that by hitting agents up here. Here you want to say add. And I will just take a new child agent. But you can create real agents. I can use some of my previous agents. But for this, I'll just use a new child agent. When we split this up, we get sharper answers. And we can also have some reusabilities if we use the real agents, not these child agents. bit evaluation agent and then we can also have a description evaluates bits based on the tender documentation do like this then we also need some advanced instructions we have that down here so here I can say follow the steps below one by fun. You can find write this in one wall of text, but use the recipe format. Then it will get a lot easier for you. Not only when you create agents here, but also over in the 365 copilot or in the chat DBT with custom GPT or Google gems. This is the approach you want to take. So meaning you must complete the current current step before starting the next. So we say this a little bit explicitly and probably repeat ourselves but I found out that this is the best way to instruct it. Then you hit enter a couple of times. I do this. This is step one. You don't have to do this. You can find right step one or just a one. But I think this works well. And I also like the line breaks. Ask the user to upload the tender text as a PDF. Once the user has uploaded the tender text, proceed to step two. Step two, ask the user to upload the bits as PDF files. Once the user has uploaded the bits, proceed to step three. So here we just instructed and I found out that the this recipe stuff like step one, step two and it's so easy to configure for you and me and it's the agent also works really well with this. So then I can say assign each bit a score from 1 to 10 based on the evaluation criteria in the Tinder documentation like this. We will not feed it with knowledge and the web search should be disabled here. So I think we are all good. We can hit save. Now we want to because this child agent is now called bit evaluation agent and it will follow those instructions. And if I just go to overview, I just want to show you that we actually said when evaluating bits use bit evaluation agent. Let me also show you in the copilot studio files that I prepared. I have some tender documentation here. And I also have bit one here, a longer bit here from noroft license. And we also have a bit two. And again, those documents are below in the description. Here we have the proposal, too. So, what I want to do now is to test it. Click the plus. And then I just say now I want to evaluate bits. Then you will see that it should start. It does. It starts this child agent. Please upload the tender text. I can drag and drop it in. I could also just I can do that with the bits. I upload this. Then it will take a little bit longer. It will start to say well I need to read this and then it will ask for the bits. So I could drag and drop again or click here my desktop and again these files are in the description below. Then we upload the bits and now it will start to evaluate those bits um using the tender documentation and give them 1 to 10 scores. You will also see that this takes a little bit longer and that's because it needs to look in those PDFs. Here we have them. We have the price. NSoft scores 9 out of 10. And by the way, I made the bit one better than bit 2. This one is five out of 10, 10 out of 10. The functionality 7 out of 10, 9 out of 10. And finally, you can see not scores 9 10 9 10. And the other one scores 5673. So nshuff license is the best product. You can also see that now it um creates even more here the final liberation. It creates an evaluation. We could of course also control this much more than we did here. But for now this is really really good. Now you understood child agents and again we started over here in overview. You configured a little bit here. And here you can see if I scroll all the way down, I can also have some suggested prompts. Try to click this. Here we have a title. Here I can say tender documentation. That is the title that will show up here. I want to create tender documentation. That will be the prompt that will send. or here I can say documentation here and here I can say evaluate bits I want to evaluate bits something like this then it will be much easier to get started with this agent once we publish it in teams and the Microsoft 365 copilot hit save here and now our agent is ready to be published What you do now is to go up here to publish. Hit publish. That will publish the latest version. So the draft that we worked on in this entire video will now be published. Here we can change a bit of the look of the tender and bit agent. You will do that by hitting channels up here. We will choose the teams and Microsoft 365 copilot like that. First of all, we want to make it available in the Microsoft 365 copilot. In the lower right corner, hit add channel. Here we can do a few things once this is added. So, first we want to send it to teams in the basic version and then we want to tune it. As you can see here, we also have an icon here. And we also have uh the title. That is good. But it says build using Microsoft Copilot Studio. We will of course make this better and create a good logo. For now, just go over to C agent in teams. Click open. Now you will see it here, the tendant bit agent. It also says your developer name. We will of course also fix that. Click add. Then you can start to interact with this agent added successfully. Hit open here. Now you have it. You also have these two buttons remember. So here I can say I want to create tender documentation. Then it will say sure what are the hello I'm tender. Well I should try again. Sure. Yep. and then it works. So, a little bit of work around with these buttons, but I think I hope you get the intuition. So, then we also want to talk a little bit about because this is just for me, you probably want to share it with your entire organization. Let's close this. That is before we publish it to the entire organization. We do this in two steps. First we configure it. Then we submit it for review to our admin and then the admin approves. I will show you all the steps of course. Click edit details. Here we can change the icon. Let's change the icon first here by clicking here. Again in the copilot studio files that I prepared for you. Pick the logo.png. Let's also change the background to white like this. Little bit more pretty. So I can say this agent create tender documentation and evaluates bits. This agent creates and the documentation is also lagging a T. Can also change the long description. Feel free to do this. Scroll a little bit down. So should the users be able to add this agent to a group and meeting chats? Well, doesn't really matter now, but you can enable it in more. We have some websites for the agent and I can also put in my developer name here. Do like this. Then I hit save. So once these changes are saved, then they need to be republished. This means that before we can see it over in Teams and Microsoft 365. Let's go close this. Hit publish up here. that will publish the new changes otherwise you will not be able to see these changes then come on come on come on then it will be published and we want to make them available again so I go to channels teams and Microsoft 365 copilot again I can choose to see the agent in teams or in the Microsoft 365 so let's just for a different go to Microsoft 365. Here you can see we have the tender and bit agent. I have it here and here I have the buttons and I can also interact with it. Here I can say hi and then it says sure uh let me help you. How can I help you today? And I can say evaluate bit and then it will start answering this. The problem again here is that we have customized it. That looks good. Um, but it's not available for my organization. It's only available as a personal productivity agent. So, click all agents here and let me, you can see here, newer agents. I want to have it shown up here as well as my other organization agents. So, let me show you how you publish it. So, they arrive here or in the app store in Teams. We go back here. What you now want to do is to click the availability options. Here we can publish it. You can either publish it to individual teams or groups or to everyone in your organization. I click here and submit for admin approval. This will send it to my admin. And here she can decide what to be done with this agent at least in a few seconds. So, as you can see, it waits for approval. Now, the admin, in this case, it's me. I can go here and say admin.cloud.microsoft. This is my Microsoft 365 webpage. Up here in the agents tab, click that. Go to all agents. Then you go to requests here. And then and then you can click the tender and bit agent. From here you can hit publish. I can choose which users or groups can install the agent. For example, I can say specific users or groups. All users. I could take a group or as here I can take a specific user. I have a lot of answers here. I'll just take myself. You can see it here. And I will also take the demo Jensen. So two users who should have this agent pre-installed. None. I click next. Now it will apply a policy template. I'll just go with a default policy. Hit next. Publish it. In this way I could also publish it to my entire organization. So now you will see that it publish publish agents to users and groups. Then you will see it says done and then we can go find it over here. What you need to do here is to sorry refresh the page. Go into all agents and now the users will see it down here. Tender and bit agent. They can add it here. That's it. Your next advanced Microsoft Co-Pilot Studio guide is right here. See you in the video.

Original Description

See how Copilot Studio agents actually work by building a real end-to-end demo with topics, tools, agent flows, and child agents. This video shows how to design agents that go beyond chat by generating documents, triggering Power Automate flows, and delivering real business output inside Microsoft 365 using Copilot Studio. Get the demo files: https://landing.andersjensen.org/hER2pz My LinkedIn: https://www.linkedin.com/in/andersjensenorg TOP LEARNINGS 🔹 How Copilot Studio agents work in practice 🔹 Using topics, tools, and Power Automate together 🔹 Designing agents that produce real documents and structured output By the end of this video, you will understand how to build Copilot Studio agents that solve real business problems. You will know how to structure conversations with topics, connect agents to tools and flows, generate downloadable documents, and use child agents to handle specialized tasks in a scalable way. TIME STAMPS 00:00:00 Creating the Agent 00:03:52 Conversation Topics 00:11:21 AI Prompts 00:16:57 Agent Flows (Power Automate) 00:32:00 Child Agents 00:39:06 Publishing to Microsoft 365 00:44:05 Admin Approval & Sharing
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Related Reads

Chapters (7)

Creating the Agent
3:52 Conversation Topics
11:21 AI Prompts
16:57 Agent Flows (Power Automate)
32:00 Child Agents
39:06 Publishing to Microsoft 365
44:05 Admin Approval & Sharing
Up next
Loop Engineering Claude Just Changed AI Prompting Forever 🤯
Vskills Certification
Watch →