I'm super excited to share with you all pro code
tools like VS Code and GitHub Copilot for the
first time ever on this channel. Right now you're
looking at my M365 Copilot app and in the very
last video we built a super cool agent called
BossBrain that knows everything there is to know
about your boss and helps you create awesome
documents. So what we're going to do is we're
going to collect these three dots and select
edit because we're going to move this over to
copilot studio so the way this is going to work
before we go into vs code that looks like this
the pro code tool we're going to move this agent
to copilot studio and then we're going to move
it into vs code on the top right hand side after
you selected edit if you select these three dots
you can then copy this from agent builder to
studio you can do this with any agent that you've
built you just select get started and you might
only have one environment i have a couple so
i'm going to select shafi studios select continue
and now everything from this agent builder the
icon The description, the instructions, the prompts
are all going to get copied over to Copilot Studio.
And here it is. Looks like everything is here.
All these instructions, the knowledge source.
And all you got to do is on the top right hand
side, you're going to select create. This then
fully creates it as a Copilot Studio agent. The
first thing we're going to do is we're going
to select edit. And instead of boss brain, I'm
going to call this boss brain. reply master because
we're going to reply to our boss right so i'm
going to click save here and the next thing i'm
going to do inside copilot studio is this agent
model. I have become a fan of Anthropix Cloud.
I'm going to click Sonnet 4 .6. You may or may
not have it, but if you do, maybe try it because
it does a really good job on the reasoning side.
Then I'm going to go down to the instructions
and VS Code is going to massage all these instructions
for us, which is super nice. You don't have to
worry about that as much. And then what I'm going
to do is this is new in Copilot Studio now. we
have something called WorkIQ, which for some
reason is disabled by default. And if you don't
know what WorkIQ is, just select Learn More here.
And this site here talks about how WorkIQ, this
MCP, is actually in preview right now. So it's
not fully out. But what WorkIQ is, is it's built
on three tightly integrated layers, data, memory,
and inference. Data unifies signals from files,
emails, meetings, chats, and business systems.
So that's your data. memory builds persistent
understanding of how people and teams work so
these are kind of like the people and the projects
you work with and inference brings together model
skills and tools so kind of think about it as
the semantic index or microsoft graph that we
had in the past but amplified even more and much
improved i'm going to certainly turn this on
because now it has access to all my emails and
chats and all that good stuff the next thing
i'm going to do is i'm going to add a bunch of
tools and the reason for that is because when
i actually tried to add them in vs code it told
me that because i have to log in it wasn't able
to do it so it pushed me back to copilot studio
i'm going to go to model context protocol and
i'm going to add these different mcp servers
down along the bottom here one of the first things
i want to do is select this team's work iq and
you can see that i'm already logged in if you're
not logged in then you have to create a new connection
so this is for a Teams message that I want to
get from the agent when it does its work. So
that's one. And by the way, I want you to notice
that when you scroll down, when you add an MCP
server, the cool thing about them is they have
a bunch of tools. So this one MCP server can
list Teams, list chats, list channels. It is
a bunch of stuff, right? So it's not just one
thing. It's all of these different tools or capabilities
that this MCP server has. So that's one. Now
I'm going to select tools again, and I'm going
to add another tool. And by the way, notice that
when I flip that switch on for work IQ, this
work IQ and this work IQ, they both automatically
got added. Now I'm going to add another tool
because part of what I want to do on the MCP
side here is I also want to send an email receive
an email and send an email i'm going to select
this work iq mail notice all these are in preview
by the way and i'm just going to select add and
configure your it team may or may not have these
turned on or off because they're in preview so
if you don't see them contact your IT team and
ask them to enable those for you. Then I'm gonna
go back to Tools again and I'm gonna add one
more tool and that would be under MCP as well
and the ability for me to create a Word document.
So I'm gonna select this WorkIQ Word and that
allows... the agent to be able to create a word
document on my behalf so here it is and again
notice that each of these has a bunch of tools
and going back to tools and just kind of going
back to the mail one i wanted to show this because
this is a commonly asked question i can simply
have this email mcp send a reply back if you
scroll down here it says reply all or reply to
message or you can actually create a draft message
right here so you can make it so that if you're
not comfortable with ai just sending the message
you can give in the instructions say create a
draft message so it puts it in your draft folder
and you can also as you can see you can add attachments
here so this this mcp email tool does a bunch
of stuff we have all that the other thing that
i'm going to do that the bs code can't do by
itself is on the trigger side i want this to
get activated when i get an email from albert
from my boss right so i'm going to go ahead and
select this add trigger here and it's going to
be when a new email arrives v3 right here so
i'm going to select that select next now one
of the things i can do to make sure that this
trigger only gets activated for arnold is after
i log in here let me just log in real quick okay
click next i can put his email in here so i can
say from anytime i get an email from him that's
when the trigger gets activated so let me type
in albert boom there's albert einstein so this
trigger only gets activated emails from him i'm
gonna go ahead and create the trigger in case
you get emails from tons of other people, this
Autonomous Agent is not gonna get activated.
It'll only be from Albert. This is kind of like
the framework of this Copilot Studio Agent. And
now with the instructions and kind of all the
details, we're gonna have VS Code do this for
us. So that's gonna be on the Pro Code side.
So with that, let's jump into VS Code. I'm gonna
open up VS Code and for people that haven't even
looked at this visual studio code is a full name
you probably just have to go to your search bar
in windows and then it'll show up as one of the
applications and if you don't have it as one
of the applications then it's something that
you have to download now a quick time out here
it did take me quite some time to kind of set
this up you'll see that not only do i have vs
code set up here but i actually have this Copilot
Studio add -on. And I also, if I go to my extensions
here, you'll see that I've installed a bunch
of extensions like GitHub Copilot Chat, which
is key. That's what we're gonna be using. And
this Copilot Studio extension, I added a Microsoft
Learn MCP server, and also this plugin here for
skills for Copilot. So there's a ton of stuff
that I had to do on the backend to actually set
this environment up correctly. But now that it's
up correctly and it has all these different components
in there i can use it with confidence to help
me amplify these agents my ask of you is if you're
interested in me kind of doing a video on how
i set up this environment because it's very time
consuming let me know in the comments or if i
get a bunch of likes maybe a several thousand
likes i'll consider doing that video but if i
don't then you know we'll move on with other
topics now on The top left hand side, let me
go back to kind of what we were looking at over
here. You have this option when you start off
of a new file or opening a folder. And these
are recent things that I've done. And then also
you can. learn about stuff by doing some walkthroughs,
which is pretty cool. So what I'm going to do
is I'm going to select open folder and I'm going
to open up my repository of agents that I've
been working on. So I'm going to go to this folder
called source and repos, and I'm just going to
select this folder. All right. So that's the
main folder that I've selected, but that's just
the beginning, right? So that just kind of got
us to this ground floor. What we got to do next
is we got to go to this copilot studio extension
over here. And when I select it, it says, do
you want to clone an agent right here? And so
when I select clone an agent, it's actually logged
into my Copilot Studio account. And it's going
to show me the different environments that I
have. So we'll just give it a second here. All
right, selecting Shafi Studios. And then this
is the Boss Brain Reply Master that we just built
together in Copilot Studio. So I'm going to select
that. And it's going to say, where do you want
to put it? select new folder and I'm going to
call it boss brain reply master. Okay. Select
folder. So that's where it's going to go. That's
where it's going to live. It's creating a local
copy or cloning that and putting it on my hard
drive. So whatever changes we make, it's happening
locally. Now that we did that, if you notice
up on the left hand side, we have these different
menu icons, right? And so right now I'm in this
explorer. And as it opened up this Boss Brain
Reply Master, notice if I go to Actions, these
are the different tools that we added. WorkIQ,
Mail, Teams, Word, it's all there. And then the
other two that were there already. So everything
that resides in that Copilot Studio Agent, you
can now see in this format instead. And if I
go to this Agent MCL, this is actually the instructions
that you're seeing. in terms of like the general
guidelines, the skills. And this is something
that we just developed in that agent boss in
that previous video, it's all here. But we're
gonna have the agent massage it for us. Now,
I wanted to kind of bring your attention to the
right hand side of the screen, which is GitHub
Copilot Chat. That was one of the plugins that
I had to add to VS Code. And if you look on the
bottom right here, there's a bunch of different
icons. And this icon is one of the key, as well
as the large language model that you're using,
as well as these tools. So when you select this
icon, you can either have a GitHub Copilot chat
in agent mode, in ask mode or in plan mode. And
if I select agent mode and I select these two
lines, which is the tool section, you'll see
that in agent mode, because of all these check
boxes, it has access to everything. It can make
edits, it can execute, it can read. It can search.
It can do a lot of stuff. If I change the mode
to ask and I selected this tools menu, you'll
notice that there's less items that are with
the checkbox. It's just these, right? So depending
on what mode you're in, it can do more or less.
And that's by you selecting this. Now, if you
notice these four, actually. are something that
I installed from this website that I'll show
you. And this is something that I can show if
there's more interest in the future. This is
the skills for co -pilot. And if you notice,
those four items are actually here. So manage,
author, test, and troubleshoot. So if you're
going to author something, there's expertise
on topics, actions, and knowledge. So this is
something that you have to add. Now going back
to VS Code, and we're just kind of laying out
the groundwork. One of the first things that
you got to do, and I can expand this out so you
can see it better. is you need to type in slash
these are how you access your different commands
and do init press enter press enter again and
what this does is this initializes the agent
it gives github copilot a chance to look through
everything that was cloned or downloaded from
copilot studio to see what's what and where is
everything and what's this agent all about and
then it makes notes so let's give it a chance
for it to kind of do its diagnosis because you
have to initialize then you have to plan and
then you execute and that's kind of how you go
about using these pro code tools all right so
the initialization came back and it basically
said look now i have a full picture let me create
a workspace instructions and then it says what
this gives you any copilot chat in the workspace
so kind of like it understands it it created
this file which we can take a look at and it
gives you some suggestion for customizations
that you can do now along the way you'll start
seeing these blue little boxes where you can
keep or undo and these numbers of plus 52 and
minus one that means 52 things were added and
one was removed and when you select it and you
go to this file that it created you can just
go to it and notice that it is right here it's
this copilot instructions .github that was actually
created And all these green areas are the things
that it took notes of and it added itself around
key patterns and important notes. And we're just
going to go ahead and select keep so it changes
colors. All right. So that's kind of like the
process that you'll keep seeing. And it'll also
ask you if you want to allow it access or not
at different points. Now, I just remembered there
was one MCP server that I forgot to add. So I'm
going to go back. to copilot studio here and
there was a one drive mcp server that i wasn't
able to add i forgot so i gotta select add tool
and go to mcp because i want these files to be
grabbed from the email but also placed in a onedrive
folder so this is the work iq onedrive right
over here i'm going to select that and add it
as well all right so that got added but there's
one thing that is something that you need to
know about now with that added that's in the
cloud and here we are on my hard drive so what
you got to do when you make changes like that
is you got to go back to this copilot studio
icon and you have these two arrows over here
there's an arrow pointing down and there's an
arrow going up over here and so up is going to
the cloud and down is coming to my computer and
so because we made a change from up there and
we want it to come down, let's go ahead and press
this down arrow and synchronize with this thing
that I just added, the OneDrive MCP. All right,
so I got a message down here that it's successfully
completed getting changes. And just to verify,
if we go here and if we go to these actions over
here. you'll see that the OneDrive just got added
as well. All right. Technically, we should do
another initialize, but I'll save you guys the
pain of that. So just remember, like do a slash
in it again because we added something. Now,
the next thing I'm going to do is I expand this
out is and I want to do like a slash plan. And
I put together some text here that we can read
together. This is what I want. VS Code to help
me with. Here it is. The trigger on this agent
activates only Monday to Friday when I receive
an email from my boss. We already did this part,
but not the Monday to Friday part. If he sends
me a document, I want you to save this document
to my OneDrive in a folder with today's date
and his name. For example, Albert, May 20th.
Next, I want you to edit the Word document he
sent based on his expectations from the email
and what we know. about what's important to him
from our knowledge sources and WorkIQ. This revised
document should be saved in the same folder that
you created in the previous step. I want you
to then reply to his email, summarize the work
done, attach the new Word document to the email
and send it. Now you can save it to draft and
also remember somebody had asked can I attach
or take PDF files and put them somewhere? Yeah.
you can see that in this case we're actually
taking his document and putting it in our onedrive
so it's the same example and the last part is
next send me a team's message updating me what
has been done so i can review it all and make
sure all the various tools triggers and topics
are created so we're asking this agent to do
all this stuff so i'm going to go ahead and just
copy it right here and i'm going to do a slash
plan that i did and just paste it and then hit
enter so this is the plan that i want vs code
github copilot to come up with let's see what
it does here by the way while it's doing that
one thing i didn't show you is this chat menu
actually has like different large language models
so if i select this and go to other models you'll
see that there's a long list of models that i
have access to including Gemini and including
Cloud. So I'm using Cloud Opus 4 .6. This is
separate. This is GitHub Copilot Chat versus
Copilot Studio. So those two are different from
each other, the LLMs, but just kind of know that
you can pick your large language model of choice
inside GitHub Copilot Chat as well. All right.
So as the agent is going through everything,
it's actually asking me some questions. So it
says for the Monday to Friday filter, should
the emails arriving on weekends be silently ignored
or queued and processed on the next Monday? Very
interesting. I'm just going to say silently ignored.
Okay. Now on the other one, it says the Teams
messages updating you should go to a specific
Teams or channel or just one -on -one chat with
me. So I'm just going to select this first one.
which is one. And then it says, should the original
document from Albert also be saved to the OneDrive
folder or only the revised version? So both the
original and the revised. Exactly. That's what
I want. Good. So we selected all that and it's
continuing to work. It says, now I have everything.
Let me create the plan. All right. So it came
back with a very detailed plan. So let's just
kind of briefly look at it. So this is the automated
boss email processing pipeline. And it has different
phases. If you look here, phase one is this weekday
filter. Phase two is updating the instructions
with a bunch of different things here. Phase
three is on the action side and descriptions.
And phase four is the process boss email topic.
It's going to create an entire topic for us.
And then here it has a conversation starter and
how it's going to go about this and additional
instructions. I just remembered that I want to
make sure, make. sure the email you send is in
html and formatted professionally so i just want
to add that to the list because sometimes i find
that when these agents send emails it's just
like a bunch of run -on sentences like there's
no prayer paragraphing so i want to make sure
it looks professional And so it's saying, yeah,
let me update the plan in phase three. It's gonna
do that. Now, when the plan is complete, you
can always make adjustments like the one I just
made. And ultimately, you just say. Go for it,
do it, right? And it's going to start doing this
stuff, which is going to save you a ton of time.
So here it is. The plan was updated. Now the
reply is going to explicitly require professional
HTML format. All right. So sounds good. So one
of the things I wanted to mention was this updated
plan .md. So it's over here. And when we open
it up. This is the entire plan right here. It
has all the decisions and all the steps and everything.
So it's a very, very detailed plan that VS Code
and GitHub Copilot came up with. All right, so
this is looking good to me. I think now we're
at this phase where we're just gonna say execute
the plan, right? So let me go ahead and expand
this out again and make sure that we are actually
in agent mode. And I'm gonna say, let's execute
the plan. Now, remember, as it's going through
this, again, it'll show you files that are changed
like this workflow JSON and the number of changes.
I'm just going to go ahead and trust it and select
keep. Now, remember, I'm in a demo environment.
So if you're in a production environment or a
development environment, just make sure you're
comfortable when you accept changes or the access
that you give it. But it's going to certainly
be asking you if you want to keep these changes,
if you want to allow access. So totally up to
you. I'm just going to accept everything. by
the way one more tip if you look along the bottom
here it says default approvals and if you select
this little arrow you can actually bypass approvals
or do autopilot preview which autonomously iterates
from start to finish i'm just going to select
that gives you a warning remember again i'm in
a demo environment but just for the sake of breezing
through all this i'm going to select that instead
of having to approve every single prompt that
it gives me all right so it says that it finished
it says all phases complete no validation errors
here's a summary of all the things that it did
and it says the next step is to push this to
copilot studio using vs code and to publish these
changes so let's take its word for it so what
we're going to do is on the bottom right if you
remember this copilot studio extension here you
can see there's a lot of changes that have happened
so i'm going to click this up arrow and i want
to push everything back to copilot studio see
what happens here but you're getting the status
messages on the bottom right by the way okay
so successfully completed and now what we're
going to do is we're going to go back to copilot
studio and if I select overview I'm going to
do a refresh on my browser to see if we can sync
everything back up and if we can notice what
the differences are that VS Code and GitHub Copilot
created for us so let's take a look here so right
away I'm seeing some differences here for example
here it says current context date there's a formula
and as we scroll down here this section is new
like saving the original document editing the
document saving the revised document these are
all instructions that it gave it replying using
html notifying all of this stuff and then if
we look at topics let's see if there's anything
that got added on the topic side and so this
process boss email this is a topic that it actually
created for us so it's got the trigger the generative
answers conditions so all of this it did itself
so we got to test it out before we do i want
to show you this if you select more in this test
bar on the right hand side and you go to manage
connections the first time chances are that even
though you connect it it's going to say not connected
this is just by experience you see all this all
this here not connected so it's going to give
you errors and so what i would do is just always
the first time around do this and select connect
and make sure you're logged in for all the different
tools that you're using so just Connect, submit,
connect, submit, and so on. All right, so now
they look good. They're all connected. And you
can just close this window up. Now we're gonna
actually have to lob an email to wake up this
trigger that we have, like when a new email arrives,
right? So I'm gonna go to my Outlook here. And
I have this email set up from Albert Einstein
going to Arnold and saying, hey, Arnold, this
document, this is the magic carpet design document
from our last video. it's a great document but
there's nothing here about the fabric of the
carpet as you know i like silk and i want to
make sure that the specs match your requirements
we can use that in some kind of fashion he wants
to use silk on the carpet i would also like more
details about the fuels that you're using miles
per gallon and how we can optimize natural resources
versus fossil fuels so albert's going to send
this off to arnold And if we go to Arnold Schwarzenegger's
email over here, here's the email that just popped
in. And then that should wake up this autonomous
agent that we've set up. But the thing is, sometimes
it doesn't. So here's another tip that I have,
especially the first time around, right? It should
subsequently, but the first time around as you're
testing it, I would select these three dots here
and go to test trigger when a new email arrives.
we're going to select one of the emails that
we had logged in and when we select start testing
it's going to go through the entire flow and
we're going to see what it's actually doing it's
going to tell us step by step what it's doing
all right so it took some time but the agent
finished everything it had to do and by the way
one recommendation i have is as you go through
this testing and you kind of look at all the
different things that are happening you kind
of expand these out there's a lot to be learned
from from these and so if there's error messages
or there's challenges i would actually copy and
paste these back to vs code and say hey can you
help me improve this agent based on this feedback
in this case everything actually went through
and all the way in the bottom it gives us a summary
of all the things it does and you can see all
the different tasks and activities and tools
that it leveraged and each of these you can kind
of open up and you can see what happens on the
right hand side here so anyways it gave us a
good result and it summarized what it is here
But let's take a look at this together. If I
go back to the email for Albert Einstein, you'll
see that one, there was an invitation to this
magic carpet revised document that's on the OneDrive,
but also an email that Arnold sent automatically
that talks about this silk fabric integration,
like a summary of it, and then the fuel MPG components
over here. So this is very well done. And up
along the top, you can see the document was also
attached. and below there's actually a onedrive
link so the document is there and then if we
go to the actual onedrive which is right over
here you can see that this folder was created
and then these are the two files that were in
the folder the original one as well as the revised
one and if we look at the revised one which was
also in the email you'll see references to silk
and mpg so here's the revised one and as we scroll
down a little bit you'll see this fabric design
silk integrated luxury layer which is nice and
then if we go down more you'll see this natural
resource optimization for the mpg and all that
stuff so this is a document that was the onedrive
and then finally the chat it came in through
this kind of unknown user maybe this is something
we can optimize but you can see that there's
a summary that was sent at 8 46 with respect
to the email that albert we received from albert
the onedrive the revised document to reply all
that stuff so that is it and i think that there
is a ton of value in this VS code, get up copilot
chat and all the plugins. And there's a lot that
it can do that would take me additional time.
It's not perfect, but it's another tool that
you can use to create these really powerful agents.
So again, if you're interested in actual setup,
I'm looking for many, many likes in the thousands
for sure. And if not, that's okay. We have other
topics like there's copilot code work that's
coming that I'm very excited about. So thanks
again for watching. Give the video a like, consider
subscribing. I'll catch you on the next one.