Today we're going to build an autonomous AI agent
together using Microsoft Copilot Studio. It's
simple to do and requires no coding. We'll create
an AI agent that everyone can use and once we
build it, it'll automatically run in the background
and help with your everyday work. Welcome to
Collaboration Simplified. My name is Shervin
Shafi and I work at Microsoft as a Copilot Principal
Technical Specialist. What we'll do first is
go over a few slides to better understand autonomous
agents. Then we'll build this autonomous AI agent
together, and then we'll run a demo. Let's get
started. Now, before we build this really, really
cool autonomous agent, and you guys are going
to love it, I do want to give a quick refresher
on autonomous agents and where they are. And
to do that, first, we're going to have to zoom
out a little bit and look at the fact that agents
live on a spectrum. And autonomous are on the
far right -hand side, more on the advanced. in
terms of capabilities and the simpler side or
the retrieval -based agent with task -based agents
living in the center. And the other interesting
thing about this as I've built all kinds of these
agents over time is that you can start with a
retrieval -based agent and turn it into an autonomous
one. Same with a task -based one. You can make
a task -based one, turn it into an autonomous
one down the road. And this spectrum it's got
lines that are kind of blurred right so we're
trying to simplify it in the messaging here but
understand that this spectrum is actually fairly
fluid if we look at them independently in the
silos that they exist in today we're going to
look at the most simple ones the retrieval based
ones first we actually built an agent like this
in the last video it was a HR a human resources
agent where basically i gave it a knowledge repository
of information that's typical to HR. And basically
the agent that we use, Agent Builder, the best
and most simple way to make agents actually was
going and just retrieving information. That's
what retrieval -based agents do. They retrieve
information, they summarize, they reason over
it, they answer questions, and it was looking
at the knowledge sources and responding. So these
are the most simple, but also very effective.
On the task -based one, we actually built one
of these too, where we did a service style connector.
Now, what makes us unique is that instead of
just retrieving information, they're reading
and writing. So they're getting and giving. And
in this case, task -based agents are essentially
taking action based on questions that you ask,
automating workflows and replacing repetitive
tasks. So in the ServiceNow video that we did,
we created a connector using Copilot Studio to
our ServiceNow instance and the connector was
able to read from ServiceNow but also write to
ServiceNow. When I said that agents are in a
spectrum and the lines are kind of blurred, if
I go back to the retrieval based agent that we
used for that HR scenario we built, I can actually
take that HR based retrieval agent and turn it
into a task -based one by having it not just
read from our hr database but also write to it
so think of the example where you're asking it
how much vacation time do i have left but you
also want to book five days of vacation time
if you're able to book it right to that system
now you've made a connection to your hr management
system And it's become a task -based agent. Now,
what makes an autonomous agent unique? And it's
the most complex on the far right -hand side.
Let's look at that a little bit. So basically,
autonomous agents, they operate independently,
meaning that you're not typing and asking it
questions. You've already pre -programmed what
they're supposed to do. So they're operating
independently. They have a dynamic plan. They're
orchestrating other agents as well. and they're
learning and escalating but we can dive into
this a little bit more in the following slide
so what are autonomous agents they're basically
expert systems that manage and automate complex
business tasks enhancing efficiency and innovation
across your organization but here's the thing
they don't have to be managing complex tasks
in the example that i'll be giving you and what
we'll be building today it's actually pretty
simple task it's an autonomous agent but it's
also highly effective now what are some examples
of the characteristics of autonomous agents well
number one they're proactive in that they're
automatically responding to signals across your
business and initiating tasks configured to react
to events or triggers without human input. That's
the key, right? With the task and the retrieval
-based agents, you're asking it questions, but
with these, they're just looking for some event,
some trigger that wakes them up and makes them
do something based on programming that you've
designed beforehand. We'll be doing all of this
with the autonomous agent that we built. The
other thing is that they're independent. They're
seamlessly completing tasks behind the scene
without human intervention. And they're also
adaptive. They're non -deterministic and able
to produce different outcomes from the same initial
conditions. What are we going to do? What we're
going to do is this is really my first autonomous
agent that I'm sharing with you. And I hope you
like it. It's an email helper. And so the idea
behind this is that a new email arrives. And
once this email arrives, this is the trigger.
This is a trigger for the agent, right? Basically,
as soon as an email arrives, the agent gets triggered.
I hope you like that cat picture. And when the
agent gets triggered, there's a set of instructions
in the agent. We'll build together in Copilot
Studio. The instructions tell it what to do,
right? Essentially, what I wanted to do was,
I get so many questions from people that I work
with at Microsoft. and I'm like okay well I can
go ahead and research these or maybe I know them
off the top of my head but what if I could get
this agent to answer these questions for me in
a very professional manner where if I agree with
it I can just send it back to the person that
asked me and so that's what this autonomous agent
does it goes to the knowledge sources and I specify
websites internal documents things that I have
access to as a technical specialist and then
essentially it's lights, camera, action, right?
It takes an action and it says, okay, so I've
parsed the questions. I've consulted with the
knowledge sources and I'm going to take an action
and I'm going to basically create all of this
and send it back to Shervin so that he can, if
he likes, send it back to whoever asked all these
questions. So it's basically an email helper,
but it's autonomous in that it's triggered and
then it wakes up. So with that, let's build it.
All right, on to my favorite part, which is the
build. But before we continue, if you're finding
value in the content so far, please give it a
like as it really does help the channel. Thank
you very much for your support. Now, first, we
need access to Copilot Studio. And if you don't
have access, then I recommend getting a free
trial. Just search for Copilot Studio and it
should bring you to this site where you can click
on try free. and get a free trial so make sure
you have access to copilot studio now when you
get to copilot studio you should see an environment
like this and on the left hand side here we have
the home create agents and so i'm basically going
to select create and this is where all the fun
starts right you can start creating this autonomous
agent right from here now you can go ahead and
describe it kind of like we did with using the
agent builder or on the top right hand side you
can skip to configure or you can just select
the create button so what i'm going to do is
i'm going to skip to configure and here you can
give it information like the name description
instructions and so we'll start out here and
when we are done we'll create it and then we'll
get even more information so let's do it this
way so first i'm going to give it a name and
i'm basically going to call it the email helper
because it's going to be helping us with our
emails and i do have a cool icon that i'm going
to give it so you can keep the icon the same
which is this or you can change it let's do that
let's change it click change icon and in my folder
here i have this email helper png i'm gonna click
open and boom this is the image i'm gonna use
which matches our thumbnail on the video and
click save so name icon now we're going to give
it a description let's tell the system what it's
going to do and what i want to say is you help
basically i'm talking to the ai right you help
with incoming emails to my inbox you are a research
assistant and look through all the questions
that are asked in the email and do research for
me this is going to make my life a ton easier
now moving on to the instructions you can see
here it says instructions directs the behavior
of the agent including its task and how it completes
them so the more granular the more descriptive
your instructions are then the higher the chance
the autonomous agent is going to act and behave
just the way you expected so Let's start off
and then we'll give you more instructions later
on as well. When a unique new email comes into
my inbox use the knowledge sources to research
the questions that are in the email. simple enough
now we'll add more instructions in a little bit
and you'll see why and then it says add knowledge
sources let's add that in a little bit too so
no big deal you don't have to do everything here
you can actually at this point just click create
on the top right hand side and then you'll see
that there's more opportunity to get this going
so it's setting up the agent we'll give it a
second here all right so you can see now it kind
of populated description the instructions that
we gave it And I want you to notice that up along
the top here, we have these different areas like
overview, knowledge, topics, actions, activity,
analytics, channels. We should be able to look
at most of these, if not all of them. We don't
really need all of them for the autonomous agent,
but we'll probably take a look. Now, one thing
that I want to turn on right away is it says
use GenAI to determine how best to respond to
the user's events. and right now it says it's
in preview but i want to enable that because
it gives this autonomous agent even more autonomy
to be able to make decisions this works really
well when you have multiple actions i'm only
going to be using one action in this case but
if you had multiple actions even multiple triggers
this definitely comes into play because it can
decide what action to use basically here in this
knowledge area you've seen me do this before
we're going to give it knowledge sources right
so i'm going to click on add knowledge and you'll
see when you select that here you have the ability
to select public websites sharepoint sites the
dataverse and also drag and drop files in here
so let's go to the sharepoint site and i'm going
to click on browse files and if you guys remember
from the last video we had this human resources
site and in there we had a bunch of documents
i'm going to select all of these documents and
confirm so if anyone asks me questions about
my hr benefits for golden because it's going
to refer to these documents now the other thing
is i want to really lock down these knowledge
sources so that you know as a person who focuses
on copilot copilot studio and even teams and
teams phone I have certain websites, certain
PowerPoints, certain places that I go for reference
to get my questions answered. I don't want to
go to the World Wide Web and get data that might
be stale, right? So this is the value of these
agents. You can lock down the knowledge source
so AI is only going to them. So I think at this
point we're golden from a knowledge perspective.
Notice that we have the PowerPoint document.
You can put Word documents. You can put different
documents. we have the websites we have a bunch
of those benefits documents what i want to do
for now is i want to skip to actions and triggers
triggers are really the key to making an agent
autonomous because when you set up a trigger
it's waiting for some event to happen and then
it starts to take action without you having to
wake it up and telling it what to do so what
i'm going to do here is i'm going to select add
trigger so what i'm going to do is i'm going
to search for the trigger for email, adding your
trigger. All right. It says time to test your
trigger. Well, not quite, but we'll test it in
a little bit. The next thing I'm going to do
is focus on this action. Add actions to empower
the AI to complete specific tasks. Okay. So I'm
going to select add action. So here I'm going
to search for Outlook and send. and even with
the search there are 30 actions that show up
so let me find the right one and it's this one
send an email v2 office 365 outlook i'm going
to select that and looks like everything is good
again from a permissions perspective green checkbox
over here so i can select next and here there
are a variety of different parameters as well
everything looks good as default as well here
let's select add action So now we've added the
action and we've also added the trigger. But
now we got to go back to the instructions because
we got to reference the action in the instructions.
I'm going to give it some more instructions and
I'm going to say use the and I want to reference
the action. So I'm going to give it this. I'm
going to give it the exact name of this Office
365 Outlook. Send an email in here. Use the Office
365 Outlook. Send an email v2 action to reply
to me with detailed responses based on your research.
Format the email in HTML and respond in a professional
manner. Write it as if you were replying to the
customer. Again, the more detailed your instructions,
the better. For each question, start a new paragraph
and write a detailed response and include links
to all references you used. References are key,
right? We always want to double check the work
of AI. The more verbose, detailed, factual, and
illustrative, the better. Include diagrams where
appropriate. Alright, looking good. Let's give
it more instructions. If you don't find the answer
to questions asked, in the email in the knowledge
sources do not answer them but let me know which
questions are left unanswered right i don't want
it to make up stuff so don't answer them and
only use knowledge sources at the bottom of the
email let me know What are some good questions
to ask the customer in order to discover more
about their interests? So in addition to getting
responses to the questions, I want to know what
some good follow -up questions are so I can dig
a little bit deeper and be more helpful. Sign
off your emails with regards. Followed by my
name. So it should be pretty much customer ready
if everything looks good. So I think that's it
from an instruction perspective. You can add
more instructions, less instructions. But I think
the key here was that we basically in the instructions
told it what action to take. We called out the
action. which is exactly the name of the actual
action and we told it how to behave what you
know to use the knowledge sources and so on so
so far we have the name we have the icon the
description the instructions we have the knowledge
sources and i do want to point out one thing
if you notice here it says allow the ai to use
its own knowledge and it's checked i don't want
this i don't want ai to use its own knowledge
I want to disable this because I want only my
knowledge sources to be used. Now, if everything
looks good here, don't forget to click on publish
on the top right hand side here. So we're going
to select publish and we're going to publish
the agent. All right, so let's test by sending
an email. We're going to put the subject asking
a lot of questions. And let's go ahead and draft.
Hi there. Great to see you the other day. Can
you tell me more about Microsoft Teams Phone?
Is there an auto attendant functionality? How
about Microsoft Teams Rooms? What's the licensing
mechanism for these? And on Copilot Studio, what
type of extensibility options exist? What's the
difference between connectors and plugins? Also,
I was curious, how many vacation days do you
get? Super curious person here. And that burger
we had, that was great. Do you have the recipe?
The reason I asked that is because if it doesn't
know answers to questions, it shouldn't. shouldn't
respond so i want to send that off and let's
see what happens and by the way the email just
popped in so everything that i said just came
here right and we're going to take a look at
this activity tab of the agent when i select
activity you should see it actually popping up
here and there it is something is happening it
says automated i'm going to select this and see
what we can find and look at this tons of different
content here that's been generated in terms of
the knowledge sources but look something actually
came in email helper and i'm going to double
click and take a look and look at this this is
these are the answers to all the questions and
even reference links on the bottom This is really
impressive, right? This is going to be a huge
time saver because every time an email comes
in, it'll just answer the questions based on
your knowledge sources, including NDA material,
roadmap, whatever you want to give it in terms
of knowledge sources, your company's specific
SharePoint sites. So it says, hey, great to see
you. It's answering my question on Teams phone,
including the auto attendant portion. I asked
it about Microsoft Teams Room. It's giving a
response here. Licensing mechanism. It talked
about Teams Premium. Gives you a reference so
you can edit it if you need to. Copilot Studio
Extensibility. It talks about Studio Agent Builder,
the differences between connectors and plugins.
And then even on the vacation days, this is pretty
cool, right? Like this, this is back to that
HR app that we built. I use those documents.
It's referencing those documents. And then the
burger recipe. Unfortunately, I don't have any
information on burgers. And then some good questions
to ask. What specific features of Microsoft Teams
are you most interested in? Any particular challenges
you're facing with your current communication
tool? How do you envision using Copilot Studio
in your organization? And what are your primary
goals for improving team collaboration? So, and
again, all the references. So if this looks good,
I can basically just either edit it, send it
as is. It's done all the heavy lifting for me.
If you enjoyed this video, make sure you give
it a thumbs up and consider subscribing. Thanks
for watching and we'll catch you on the next
one.