Back to Index

Piloting agents in GitHub Copilot - Christopher Harrison, Microsoft


Transcript

. So a couple of real quick things for those who are just getting settled in or just roaming in. First of all, if you're sitting in the back and hoping for a seat, it does look like we are completely full up. I can move my stuff here. We'll have a seat here.

And I think that might be it. Now, having said that, we are going to be-- and I want to make sure that I'm clear about this. So if you're working on something else, now is not the time to multitask. But instead, pay attention to the person that's babbling up in front of the room.

We are going to be running the exact same lab. I'm going to say that one more time for effect. But we are going to be running the exact same lab this afternoon at 3:30. So even though that 3:30 lab has a different title, a different abstract, I am here to tell you it is the exact same lab.

How do I know that? Because I'm going to be the one leading it. So kind of a little bit of authority there. So do keep that in mind. So if you're hanging out in the back, really wanting to do this, check back. This room, 3:30, you'll be able to do the exact same thing.

Second of all, we are running around and getting everybody added into a particular organization. That organization is going to give you access to GitHub Copilot. Now, when you get added into an organization in GitHub, you do need to accept that invitation. So please go in, check your email that's associated with your GitHub account, and accept that invitation.

So now is the time to multitask. And go ahead and take a look at that. And while you're doing that, I'm going to make the announcement one more time for those in the back of the room. If you want to do this lab, come on back at 3:30. We're going to be doing the exact same lab at 3:30.

And I'll be back in just a minute. In your email that you have associated with your GitHub account. Cool. All right. So here's what we're going to do. Oh. I can actually take my clock back. So there. If we can get all devices silent. Vibrate. If you get a phone call, you're more than welcome to take that phone call behind outside those doors there.

Cool. So while we are getting everything situated, here's what I'm going to do. Is I am going to-- there we go-- start tracking through this little thing called GitHub Copilot, and then begin to introduce the lab, and then get you turned over to the first exercise. Basically, what's going to wind up happening is I'll do a little bit of babbling, and then you'll do a little bit of work, and then I'll do a little bit of more babbling, and then lather, rinse, repeat until we have run out of time here.

We have 73 minutes. Should we actually still able to get through the bulk of the lab, or at the very least, we'll be able to get through the cool parts of it? We might skip something just so we can make sure that we can get to the end, but we'll explore and we'll play with all of that as we go here.

So without any further ado, let's talk about this little thing called GitHub Copilot. If you're not already familiar with GitHub Copilot, GitHub Copilot has been given this tag of your AI pair programmer. Now, not only is that wonderful marketing, because it is kind of wonderful marketing. It's actually, I think, honestly, the best way to describe and to think about GitHub Copilot.

That just as I'm working with a pair programmer, I'm going to ask them to perform different tasks. I'm going to ask them to do different things, and we're going to work together. We're going to collaborate to build out a solution to solve problems. I'm going to do that exact same thing when we're talking about Copilot.

And just like an AI pair programmer, it's going to have certain strengths, going to have certain weaknesses, and there are going to be specific workloads that it's going to be able to help out with. And that's exactly what we're going to see here. We're going to take a look at a couple of different modes with agent mode locally, with edit mode, with ask mode.

We're also going to take a look at what we announced at Build, our brand new Copilot coding agent, which actually allows you to assign issues to Copilot. And then we're also going to spend an awful lot of time talking about context. Because as I mentioned, again, AI pair programmer, context is really key.

It's key across many aspects of life, and it's certainly going to be key whenever we're working with any form of AI, and that does include GitHub Copilot. So without any further delay, let's go ahead and get into it. Are you comfortable down there, John? All right. Okay. Let's talk a little bit about context.

And the way that I always like to introduce context is by giving a little bit of a quick story. That my partner and I woke up the other day. She looks at me and says, let's go get brunch. Fantastic. Who doesn't love brunch? And so I recommended a spot.

And then she says, but here's the thing, is we've been there an awful lot lately and I'm kind of burnt out on it. How about we go somewhere else? Okay, fantastic. And so then I recommended at a different spot. And then she thinks for a minute and she says, you know, I'm really kind of craving waffles.

Who doesn't love waffles? Fantastic. And so then I recommended another spot and off we went. Now that back and forth is like very normal to human conversation. That I was given a little bit of context. Let's go to brunch. And then I gave, based on the context that I had, a perfectly valid answer.

And then a little bit more information was provided. And I gave another answer. And then eventually we found the solution that we were driving towards. And that's exactly how we're going to work with Copilot. Is that we're going to give Copilot context. We're going to help point it in the right direction.

And then we're going to work together to get to the solution that we are looking for. Now, whenever we're talking about context, there's oftentimes a lot of focus on the prompt. Now, don't get me wrong. The prompt that we use for Copilot when we're using chat, when we're creating an issue, all of that is very, very important.

But it really goes beyond just that prompt that we give to Copilot. And I honestly find that a lot of times when people are first getting started with Copilot, that there's a little bit too much focus on that prompt itself. Because what Copilot is going to use for context is everything that it sees.

And so that's going to include your code. So making sure that your code is readable is extremely important. Unlike a lot of other tools that you're going to be using, well, there'll be a script where it's going to build your code or scan all of your code and look for different patterns and so forth.

With Copilot, again, AI pair programmer, it's going to behave an awful lot like another programmer coming along and reading your code. And if your code isn't readable, if you're using a lot of abbreviations, you're using names that aren't clear, you're using single letter variable names, which are the bane of my existence, Copilot's not going to be able to easily understand that.

On top of that, comments. Now, I do have a little bit of a belief that code that's easy to read shouldn't need comments. That the code should describe well enough what it is that it's doing. But we all know that that's not always the case. We all know that we fall short of that.

And that a couple of lines of comments left behind is not only going to help you six months later when you go back to that code base and trying to figure out what it is that you're doing, but it's going to help, again, that pair programmer and that AI pair programmer.

So having in a few comments. And then last but not least is having a good project structure. Allowing Copilot to be able to quickly find the different resources that it's going to need is also really important. So all of that plays into context. And that brings us into this spot right here of helping Copilot help you.

I sort of like to say, don't be passive aggressive with Copilot. That don't throw something at Copilot and kind of like hope that it figures out what you really, really meant. That if you know something or if you know that there's a particular piece of information that Copilot should be considering, tell Copilot that.

And what you're going to see is you've got a lot of great tools with which to do that. So again, that context, all that background information. And we're going to see a lot of different ways that we can do this. Through like instruction files or again those comments, again that good project structure.

The intent, be clear about what it is that you're trying to do and be clear about it. That clarity aspect. And when we're talking about clarity, for those of us that have maybe worked around with like old chatbots, and we got very used to just sending very terse commands because natural language processing back a few years ago just was not really all that strong.

So we were effectively using it like a command line interface. We want to be a bit more verbose, be a bit more flowery, make sure that we're easy to understand. And then last but not least, that specificity. If we want something done a particular way, let's be clear about it.

Let's get in and do it. So let's introduce real quickly here the different workloads that we have available to us. Now the glowing one on the right is not necessarily to indicate that, hey, that is the best, but rather just simply that that's new and new things are shiny.

So over on the far left is code completion. And this is sort of the original version, if you will, of GitHub Copilot. Then I'm typing away. I'm coding away. And then Copilot right in line is going to start making suggestions about what my next line, my next block, my next class, my next function is going to be.

And this is wonderful. If you're in the zone, you know what you're doing. Just type away. And Copilot can then help you write code. And then we get into chat and we get into edit mode. You know, chat originally just had ask, which is going to be for single shot.

Explain this code to me. I need you to create a file. Whereas with edits mode, what that's going to allow me to do is that's going to allow me to edit multiple files in one shot. Because when we think about even the most basic of updates, say like I'm just updating a web page.

I'm going to update an HTML file, CSS file, and a JavaScript file. There's very few, if any, code updates that are single file anymore. And so with edits, I can then guide Copilot through editing multiple files. And then we can get into local agent mode, where now Copilot's going to kind of lead the way.

But what we're really going to see with agent mode is that it's going to behave an awful lot like a developer. That it will be able to explore your project. It'll be able to find files. And it will be able to run external tasks. So it'll be able to build your code.

It'll be able to run tests. And if it detects that anything has gone wrong, it'll actually be able to self-heal. I'm going to come back to questions in a little bit. Last but not least is Copilot coding agent. And with Copilot coding agent, what I'm going to be able to do is take an issue in my repository, assign that to Copilot, and then I get to go on about doing something else.

So if I have like little tasks, little things that I just haven't been able to get to, I can go ahead and assign that issue. Then I can focus my attention on the bigger problems. And so those are the different workloads that are available to us with Copilot. And so that is coding agent.

We're going to be able to give it a task. And then away we go from there. So without any further delay, I'm going to actually kind of leave that there. And let's go ahead and get started. So first thing before you click on that URL, this is going to be a real quick test.

You know how you were probably in elementary school and you got handed that sheet with like 40 steps on it. And step one was read all the instructions to the end. And then step two was write your name. And then step 40 was just do steps one and two.

How many people did all the steps? Yeah. Yeah. Yep. Absolutely. So in any event, this is going to be one of those tests. So first thing is first, before you go there, make sure that you have gone to your email that's associated with your GitHub account. That you've accepted that invitation.

And when you got asked, hey, do you want a copilot license? Say yes to that. Okay. Give me one second here. It's just the GitHub.com/mars. Oh, okay. And they should see if they have these accepted animations. Okay. Beautiful. Thank you. Hold on, John. All right. That's all. I just said it well done.

Thank you. Yeah. So if you did not get your invite for whatever reason, then you're going to go there. And you're going to go there. You're going to go there. You're going to go there. And you're going to go there. And you're going to go there. And you're going to go there.

You're going to go there. And you're going to go there. And you're going to go there. And you're going to go there. You're going to go there. And you're going to go there. And you're going to go there. And you're going to go there. And you're going to go there.

And you're going to go there. And you're going to go there. Hold on. Thank you. Yeah. So if you did not get your invite for whatever reason, you can actually just go directly to github.com/octahol and then accept your invite. Now, I'm going to give you a minute to do that in the background.

And then I'm going to address the people that are hanging out in the back of the room here. We are going to be doing the exact same lab at 3:30. So if you want to do the lab, you want to have a seat, you want to be comfortable. You can come back at 3:30.

You'll be able to do the exact same lab. The 3:30 session is going to be an exact repeat of everything that we are doing here. All right. Now, if you do not have access yet to octahol, then hang on. We'll be around to help troubleshoot all of that in a minute.

Assuming that you do have access, if you head on over to that URL right there, what that will do is that will take you to-- let's-- let me go to the right spot. There we go. And there we go. And there we go. And there we go. OK. So that will take you to this little readme file right here.

This is going to give you an overview of the lab and everything that you're going to be doing. You're going to set up the environment. You're going to assign some issues. You're going to configure and interact with some external services, provide context, co-pilot, complete a site-wide update, and then review co-pilot's work.

And you'll notice all the way down at the very bottom, get started. We're going to do this by getting everything set up right here. We are going to be using code spaces, so you don't need any local installation. You'll be doing everything via the cloud. So the first part is going to be setting all of that up.

Follow the instructions that you see there. When it comes to this spot right here-- and this is now where I'm going to need everybody to pay attention to me. So when you go in to create your lab, where you're going to want to create it and how you're going to want to create it-- let me create a real quick new slide here.

Sound effects help. There we go. Typing skill is inversely proportional to the number of people watching. When you go to create your repo, that's going to be the owner that you're going to want. It will be Octohull. It will need to be inside that organization, because otherwise it's not going to work.

And then note the name. Just make that your GitHub handle. It will kind of make it real nice and easy for everybody. So owner will be Octohull. That's going to be your name. And again, if you did not see where to access the lab, that's where to access the lab.

I'm going to leave this slide up for a minute here. That's where you're going to access the lab from. That's going to be going away in five, four, three, two, one. And then finally, that's where you can go ahead and create your repo. Again, note the owner. Note the name.

And away you go from there. So I'm going to let you start roaming through exercise zero. I'm going to let you start roaming through exercise one. If you have questions, that is exactly what John and I are here for. Now, please do keep one big thing in mind, which is the fact that there are roughly about 80 of you.

And there are two of us. We are doing our absolute best to run around as quickly as possible. But please be patient with us. Does everybody know what they should be doing right now? OK, last very important thing. I always assume that silence is a, hey, everything is fantastic.

Neither John nor I are mind readers. So if something isn't going quite right, please, please, please say something. Let us know. All right. Now I will let you go ahead and have at it. All right, I'll be back in one second. Has anybody been able to assign an issue to co-pilot?

Some have. All right, let me do this again. Has anybody been able to successfully have co-pilot start work on the issue? A couple of people. All right. How many people have? OK. Of those that just raised their hands, how many already had access to either co-pilot Enterprise or co-pilot ProPlus?

OK. That's-- all right. OK. Yeah. OK. Yeah, we're trying to figure that out. The org that we put everybody into is supposed to have that level of access. Apparently, that doesn't seem to quite be the case. So in the meantime, here's what I'd like to go ahead and do is kind of just start walking through the exercises here so that way you can at least see it.

The other thing that I do want to highlight-- and let me put this URL back up here. Now, granted, again, to assign issues to co-pilot coding agent, you are going to need ProPlus or you are going to need Enterprise. So like that part of the lab you won't be able to do unless you have access to that.

But if you have even co-pilot free, you'll be able to perform the rest of the lab. And you can see that right there. That repository is public. And you can go back and play with it all on your own later on there. All right. So let's do this. What I'm actually going to do is there was a question here.

I'm assuming the question was about co-pilot. The gentleman in red, the G-Shock watch? Yes, sir. Yeah. You had a question. Oh, thank you. I was curious, do you consider any of the modes vibe coding? And I would say to a certain extent, basically anything that's going to be agent driven, where you're going to have co-pilot driving the operation rather than you driving the operation, that would certainly fall under that category of vibe coding.

So whether or not that's an approach that you want to take of vibe coding all up, I will kind of leave that up to you. Everybody sort of has their own opinions on that. And one thing that you will notice about me is I typically don't share a whole lot of strong opinions in situations like that.

So I don't necessarily have a strong opinion one way or another on that. But that kind of answers your question. So, yeah. Cool. Other questions about co-pilot. So I'm bringing this up in the background here. Yeah. Fire away. How does it differentiate from Cascade and Windsurf? So I'm going to answer Cascade, Cursor, Windsurf, and all of those questions all up.

Which is to say that there's a limited number of hours in the day. And things move really, really fast. I can keep up with what we're doing. I can't keep up with what anybody else is doing. So I honestly am not familiar at all with any of the feature sets of any of the alternatives that are out there.

And honestly, going out bashing competition and things like that is not necessarily my vibe. Don't worry about it. So what I would say is, if you're going, hey, Windsurf does this. Can co-pilot do it? Does Cursor do this? Or Cursor does this? Can co-pilot do that? I can answer those types of questions.

But if you're looking for a feature comparison or things like that, I'm really not able to do that because, again, I just don't know those well enough. There was a hand over here. As you're showing that co-pilot can be more aware of the environment. Can it also be aware of live databases?

Can it be connected to your SQL or some other data source? So it had that context in one thing. Yeah, so this is a fantastic question. So the question is, can co-pilot be aware of external data sources? And the answer is, not directly. But with a little thing called MCP or model context protocol, it can.

So if you're not already familiar with model context protocol, he says, bringing up the slide right here, the whole goal is to be able to expand co-pilot's capabilities. So co-pilot is built on top of an LLM, large language model. And that LLM is always going to be static. And so what MCP allows you to do is it allows you to give co-pilot the ability to call out to external services.

And the diagram looks a little bit like this. I need everybody to memorize this. There's going to be a quiz on this in about 15 minutes. And basically what you're going to notice if you look at this is that your request is going to go to co-pilot. Then it's going to call out to the MCP server, which is then able to access external resources.

So one of the MCP servers that's available, for example, is GitHub. And so what I can actually do then with that MCP server is I can then go to co-pilot and I can say, hey, create an issue on this. So that way maybe I'm in the zone. I'm coding, coding, coding.

And I realize, hey, there's something I want to be able to look at later. Let me just go ahead and create a real quick issue on that. Then I can do that right from chat. Or maybe I want to go in and do a search. I can again do that right from chat.

Or again, I've got databases. And I want to be able to get that schema or I want to be able to get that data from there. Then I can do that with my MCP server. Now, a couple of real quick things on MCP servers. Number one is that there are a bunch of first party ones that are created.

Like we have one. Azure has one. Playwright has one. And then there's a lot of community ones that are out there. Now, here's the catch is that MCP servers are not only able to access data on your behalf, but they're also able to perform tasks on your behalf. So as a result, before you utilize a third party MCP server, make sure it is something that you trust.

Or you can consider creating one on your own. I'm going to admit I haven't yet created one on my own. But it is something that is-- sorry, I got thrown. Oh, I haven't created one on my own. But I've seen a lot of people create them. And it does seem to be something that's relatively straightforward as far as setting it up that you can just capture the request, process it, and then send it off from there.

And then you basically just create a set of endpoints for Copilot to figure out. OK. So really quickly on that. If you have a backup for your database that's in like a .sql file, can it consume that? Can you use that as well? Sure. Absolutely. Absolutely. Yeah. And in fact, you wouldn't even necessarily-- like, if what you're looking for is to help Copilot write database queries really well, all that Copilot really needs at that point is your DDL, is your data definition language.

And that's actually something that you can do internally inside of-- where do I want to go? I'm trying to remember this off the top of my head, so I'm probably going to get the exact-- Oh, the Wi-Fi is going to be wonderful here. Oh, come on. Why? I am connected to the speaker Wi-Fi.

Yeah? OK. That's supposed to be faster. There we go. Nope. That's not it. I think this is it. Yeah. It's something-- there it is. Yeah. So what you could do, if all you have is just the DDL, is you could actually just include that with your instructions. And then that way, anytime that I talk to chat, then Copilot can go ahead and use that and be able to generate it that way.

And that's honestly the simplest thing that works. So, yeah. OK. Yeah? He's talking about like agents MD or Copilot structure MD and scope of the . Absolutely. So, let's talk a little bit. Let's actually do this. I'm going to-- Yeah? Yes? . Yeah, unfortunately, between Wi-Fi issues, access issues, and things like that, we're just not able to do that.

So, yeah. I'm turning this into sort of like live Q&A and live demos. I'm trying to give everybody the best possible value that I can, given the situation that we have. So, yeah. Let me do this. Make yourself comfortable, John. Boosh, boosh, boosh, boosh, boosh. And then let me-- Let me do this.

OK. OK. OK. So, let's talk a little bit about Copilot coding agent. OK. OK. So, let's talk a little bit about Copilot coding agent. OK. OK. So, let's talk a little bit about Copilot coding agent. OK. So, what I've got here is I have an issue that I've created.

And this is just copy and paste the tree from the lab, to have it create endpoints for creating and editing games. And the first thing that I want you to notice about the issue here is, again, the context. The context is key here. That the whole goal of coding agent is to act asynchronously.

That I assign an issue to it, and I just let it do its thing. And off, Copilot does, and it does its thing, and then it will eventually come back to me. And that becomes really, really tricky. Because, how do I then know whether or not Copilot has everything that it needs to be able to perform its work?

I don't know. And so, that's the first big key. I always love the little i's. That's the little indication that Copilot's now on the test. Kind of cute. So, the first thing I want to highlight is the issue. And you'll notice, again, I'm not being passive aggressive with Copilot.

If I know what I want it to do, if I even know how I want it to approach the task, I'm going to tell Copilot that. That the more that you leave for ambiguity's sake, the more that you leave for the other party to figure out, this is human or this is AI, the more chance that you're going to come back to something that you really didn't exactly want.

So, if you want the wall painted a particular shade of red, then say that you want the wall painted a particular shade of red. And so, that's exactly what I've done here. But again, as I highlighted, it goes beyond just the prompt. And effectively, that's what this is, is this is a prompt.

And so, Copilot supports some different instructions files. Now, right now, it does depend a little bit on where you are and what you're doing. But with chat and with coding agent, all of them support copilot-instructions.md. So, if you're using chat and if you're using coding agent, this supports copilot-instructions.md.

And if we take a look at this file, what I want you to notice is just a markdown file. So, nothing special, nothing fancy. And what I've done inside of this file is I've given it high-level overviews of what we're building, how we're building it, and my project structure.

So, you'll notice, for example, that I've got some guidelines right up top. So, this is a crowdfunding platform with a developer theme, the application uses, yada, yada, yada. You'll also notice I've given it coding standards. This is what's required before we each commit. I've given it language guidance. And I've also told it how it is that I want my Python and Flask to be created, how I want my Svelte and Astro to be created, how I want my style, my actions.

I've given it information about the scripts that are available. And I've also documented my repository structure. Chances are you already have this inside of your projects. Or at least one would hope that you do. And if you don't, here's a good opportunity to create it. Hand that to copilot.

And so now, any time I make a chat request locally, or when Coding Agent does its thing, it's going to be considering that. Now, going one step further with Coding Agent, another big question becomes, OK, well, where's it going to do its work? So, as it turns out, Coding Agent behind the scenes is using GitHub Actions.

And you'll notice right here I've got a special action that's created that's called Copilot Setup Steps. And so in here, I'm now having it install everything that I think it's going to need to do its work. So if there are any libraries, any frameworks, any services, anything like that that you need to have installed, any scripts that you need run, you can set that up right here.

So now, Copilot is going to have this as its environment to get in and do its work. And it's also going to have this instructions file that we highlighted a minute ago to be able to act upon as well. Now, on top of that, let me go over here to my pull requests.

Is I can see the pull requests that Copilot made. So just made this. You know, it was three minutes ago. So this is not a pre-baked cake. We're doing this live. And if I open this up and I scroll on down, I can view the session here. And this will show me Copilot doing its thing behind the scenes.

And eventually here-- there we go. Moving your mouse makes it go faster. What I can see is it's actually going out and it's exploring the project. And it's digging up information on its own as well. So again, as we were talking, good code, clear code, good comments, good project structure.

All of that helps your developers. And all of that is going to help Copilot out as well. So I can give it information through the issue. I can give it information through my instructions. I give it information kind of implicitly through the project itself. And then I can also create that environment by setting up that Copilot steps.

There was a hand here first. Yeah? Yeah. For the custom instructions, are they available in like edit mode and edit mode and inline edit? Or is it expressed by at workspace? Yeah. So that's a great question. And I'm going to answer the second part of that at workspace as well.

So when it comes to Copilot instructions, those are always going to be available. Let me get rid of my red squigglies here. Those are always going to be available inside of chat here. So let's say I do this. I'm going to put this into agent mode. I'm going to leave it as Claude 3.7.

And by the way, I do not have a stance on which model is better than any other model. There we go. So update the website to allow for filtering by publisher and category. and drop down lists and refresh the page. When you do that, I'm going to do that.

I'm going to go back to the website. And I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. And I'm going to go back to the site. I'm going to go back to the site.

I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site.

I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site.

I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site.

I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. I'm going to go back to the site. So what I want you to notice is-- oh, I put it into agent mode, so it's not going to-- I promise you it is going to use the instructions.

It's just not going to show it to me, unfortunately. But on any of the modes in chat-- oh, well, there it is. I just need to be patient. There's my copilot instructions under my references. So there it is. It's using that right there. The other thing that I want to highlight is-- and this right now is particular to local chat-- is I can even create dot instructions files.

And this is, admittedly, a little bit-- it's a little bit tricky to, I think, understand kind of the first time that you see it. So kind of go with me on this one. So copilot-instructions-- universal. Every single chat request, this is going to go. The dot instructions files-- these become manual.

So I can add these in manually to a task that I'm performing inside of chat. He says, delaying long enough for it to finally open. So what you're going to notice-- again, a markdown file-- but this is now particular to a type of task. So this is for creating a Flask endpoint.

And so you'll notice in here that I've given it information about the endpoint. I've given it information about my unit test. I've given it a couple of notes about the project. And I've even linked to files that it should use as a prototype. And these are actually just existing files.

So if I brought this in, now what it would do is it would follow all of those instructions there. But let's say, for example, with React components-- just to use that as an example-- that I want to make sure that React components always follow the exact same patterns and practices.

So what I can do there is, up at the very top, you'll notice the apply to. And then I can put in a path. So I could go asterisk, asterisk, whack, asterisk.jsx or tsx if you're using TypeScript. And now, any time that you're working with a file that matches that pattern, it will then automatically apply that instructions file.

So in this case here, it's going to look inside of server tests. And any time that it finds a file that matches, test underscore. And you'll notice, if I go into my server tests, you'll notice test underscore games. That matches that pattern right there. So any time that I was working with a test file, that would then go ahead and match.

The last thing I want to mention here is that all of this becomes part of your repository. So is creating these files going to take a little while? Everybody go like this. Yeah. But this is very much like spending three hours to write a script for that task that constantly takes you a couple of minutes, that after a little while you're going to get your money back on it, so to speak.

It's the exact same thing here. So the time that you spend here is going to help improve productivity and help ensure that your code generation is going to be the way that you want it to be. Yeah. Yes. It does have to specifically-- yeah. If you're using the workflow for setting up coding agent, it does have to have that name.

And that is documented. OK. And for like the custom-in-structing command, you can do whatever you want before . So you can do something to . Yeah. And then you can do something . Yeah. And then you can do something to do something. Yeah. So this is a fantastic question.

So the question is, hey, about these standards, and it does have to have that name. And it does have to have that name. And that is documented. Can we put these at an org level? And yes. So there's a few notes. If you can do something, you can do something to do.

And then you can do something to do something to do. Yeah. So this is a fantastic question. So the question is, hey, about these standards, can we put these at an org level? And yes. So there's a few different ways now that you can approach that. Number one is there is an ability to set instructions at the org level as well.

So you could do it that way. You can also, again, stand up an MCP server in front of that and allow for searching that way. And then the last thing that I would mention, and we just recently, like literally yesterday, I think it was, announced this, is Copilot Spaces, where this is specifically on github.com, that what you can do is basically point it at a repository, point that at specific files, and say, hey, here's our knowledge basis.

Here's how we want our code to be created. Here's all of our standards. Here's good examples. And then that way, when a developer comes along and they do searches on github.com, they'll be able to then raise the information from there. You're welcome. There was something over here. Yeah. I'm trying my best to be as fair as I can.

So, I want to understand, the code agent is using the workflow set of this environment. Yep. So, that's a fantastic question. So, the question is, hey, about this workflow file, is this able to be automatically created or edited by Copilot? And the short answer is no. Now, if I was, like, working locally, like, let's say I'm not overly familiar with actions, which I'm not, then I could go in through Copilot manual and I could say, hey, I need to create an environment that's going to install this, this, this, and this, and let Copilot generate this for me.

Absolutely. But once I launch this into agent mode, agent mode is not going to be going back in and editing that. Now, keep in mind, and I'm going to kind of lead this right into the next kind of, like, logical question here. So, keep in mind that agent mode, or coding agent, so when it's doing its thing in the background here, it does have an ability to, like, run scripts.

So, it can, like, run tests and things like that. And, in fact, if I-- where was I? Here, and here, and let me scroll on down to view session here. I'm going to zoom out, because, ironically, I think it's going to make it a little easier read. Okay. Let me come down here.

One second. Yeah. Here we go. Yeah. So, yeah. It looks like all the test fails, although we're getting-- oh, that's cool. They pushed an update to SQL Alchemy. I'll have to go back and now update the project. But, in any event, the takeaway that I want you to get out of this is the fact that this is running commands locally.

Okay? And so, that then kind of raises the next big question, which I think is very directly related to, hey, could it go in and, like, modify that initial setup workflow? And this is-- it can't modify that. And it also is not able to access any external resources. So, let me up-level this real quick.

When it comes to Coding Agent, Coding Agent was very much built with security in mind. So, the first big thing is it's built on top of GitHub Actions. And if you're not already familiar with GitHub Actions, when you spin up a brand new action to start running, it does so in an ephemeral space.

So, it creates the one space that it's going to work in, it does all of its work in there, and then once that's done, all of that's torn down. So, that's the only space in which it can work. Copilot only has read access to your repository, save for the branch that it's going to create, and it only has write access to that branch.

So, in this case here, it's going to be copilot-fix-2. Copilot-fix is what it's always going to start with, dash, and then the number of the issue that was assigned to it. I'm going to-- yep. So, in this case, it was issue number two, so that's why it's copilot-fix. So, that's why it's copilot-fix-2.

So, that's the only thing that it's going to have write access to. On top of that, it does not have access to any external services unless you open up the firewall. So, the firewall is going to be completely locked down. It is not able to call the outside world.

That includes, by the way, installing packages. So, let's say there was a library that needed to be installed, and it tries to install that. It's going to fail on that unless I've specifically punched open a hole on that. Now, the exception to that, the workflow that I create. That initial setup workflow that we talked about.

That workflow, because now I can install those services. So, if there's anything that I know that it needs, then I can go ahead and do that. But, otherwise, it's not going to have access to any external resources. So, very much designed with that security in mind. So, very long-winded answer, but there's everything you ever wanted to know.

Yeah? So, with that in mind, you have a workflow run test YAML that will get an action on the master . Yeah, so, let's actually go kind of one step further with this. So, I am a good steward of my repository. And so, when I create a PR into main, so I'm going to use this one here, dependent bot wanting to bump a version number.

And we're going to notice, we're going to notice, there we go, that I have a workflow set up here to perform some testing. So, it runs unit tests and it runs some end-to-end tests. So, that way somebody goes in, they create a pull request, and we're going to confirm all of that.

Every organization should, hopefully, have some level of validation that PRs look good before they start merging them in. Right? Everybody go like this. Please, lie to me if you have to. Fantastic. Now, here's the catch. Again, thinking with our security cap, I want to make sure that any of that code is always going to be something that I trust.

So, hopefully, anyway, I can trust all my developers. But when it comes to AI, I'm not entirely certain. So, what we'll notice is that here's the PR that it finished. And you'll notice, if I scroll on down here, and I get to that section on workflows, that it has not run those tests.

And it's only going to run those tests if I click that button right there. And, of course, before I do that, I should go in and review the code and everything else there. So, yeah. So, my question is, is your code working in the script? Yes. Exactly. Yeah. So, the question is, so, Copilot, when it did its work behind the scenes-- we saw this already-- that it ran all of those unit tests locally.

And then, now, we're going to notice here that I'm going to have it run those unit tests again. So, I do the exact same thing with Copilot as I do with all of my other developers, which is that belt and suspenders approach. So, I'm going to up-level this again.

Just because I introduce AI does not mean that any of the fundamentals of DevOps change. So, let's think about how I wrote code before AI. So, some of it would be from my own knowledge. Some of it would be grabbed from documentation. Some of it would be copied and pasted from Stack Overflow and changing it and hoping and praying that it actually did what I wanted it to do.

Or maybe that's just me. And then, eventually, I'm going to go ahead and I'm going to run my test locally, hope that all of them work, and then I'm going to create a PR. Now, after we do that PR, now what are we going to do? Well, we're going to get another developer to come along and review the code.

We're going to run all of our actions, and we're going to make sure that our test pass, that our linters check out, that all of our security scans are run, that we're going to do all of those core fundamentals, regardless of how my code is being generated. And that doesn't change when I'm using AI.

So, does AI run those tests locally? Absolutely. But am I still going to go in and double check? I absolutely am. So, I'm going to do that here as well. Can you get it to run all of those tests? . Oh, I see what you're saying. Yeah. So, let's say I'm working on a larger project.

And admittedly, this is a smaller project. So, when I run my unit or even my end-to-end test, it's going to take like 30, 40 seconds. But if you've got a larger project, where now that's going to be taking minutes. So, in agent mode, then I can go ahead and direct it.

Like, hey, only run the tests on what you're working on until you get to the very end, and then go ahead and run everything. So, I could either just include that in the prompt. Again, don't be passive-aggressive or co-pilot. If you want it to do something, tell it to do it.

That might also be something that I would consider including in the instructions file. of like, hey, you know, make sure that you always do that. And then on top of that, one of the things that I've noticed about Claude 4, or Claude Sonnet 4, or whatever the naming structure it is they're using on that, is it tends to sort of like do that on its own, where it will go ahead and like run a smaller set of tests and then like branch out and do the whole one.

the whole one, which it's doing that on its own, but again, like if you wanted to do something specifically, always tell it. Always tell it. All right, I'm going to go over to this side real quick, and then I'll come back to the middle. Yeah. Does co-pilot support remote MCP servers?

Does co-pilot? Yes. Yeah. Co-pilot does support remote MCP servers. If you're going to be using that with coding agent, it will support that with coding agent as well. But I need to open up a hole in the firewall for it to be able to access that remote service. Does that happen in the practice mode?

Yes. Yeah. That right here, if I go to settings, and I go to coding agent, there's my MCP. There's my MCP. I can go ahead and set the list of my MCP servers there. And then environment, and then co-pilot. In here, there's different variables that you could then go ahead and set to open up your firewall.

That's in the documentation, but that's where you would go to go ahead and do that. You're welcome. Yeah. So, right now, the controlling agents work for issues that are set up in . Correct. So, if I do say Jira. Yeah. So, the question is, hey, we're using ADO, we're using Jira, we're using, you know, full in the blank for managing our issues.

How can I then use that to assign a co-pilot? So, unfortunately, as of right now, it's going to be GitHub only. I don't know whether or not it will stay GitHub only or what a future plan might look like. But, yeah. Now, one thing that you might want to consider is if there is something in Jira that you want to assign to co-pilot, you could create a relatively straightforward script to just copy that issue over and then go ahead and assign it to co-pilot from there.

But right now, the issue does have to be inside of GitHub. There you go. Yeah. Yeah. . Yeah. So, this is a fantastic question. I'm going to actually up-level this. So, the question is, hey, we have internal libraries. And those are created in different repos. And we want to make sure that co-pilot is going to use those external libraries when it goes in to do its code.

So, first thing that you can do is make sure that co-pilot sees you doing it. So, co-pilot is a great pattern matcher. And in order for co-pilot to be able to use an external library or an external framework, it just needs to see how you're doing it. Like, think about all the frameworks that you use on a day-to-day basis.

Do you really know how they work behind the scenes? Like, I'm a Svelte developer. I have no idea how Svelte works behind the scenes. But I know how to use Svelte because I've read all the docs and I've written all the code and I can get it to do everything that I want it to do.

But I have no idea what it's doing behind the scenes. I want to think of the exact same thing when it comes to co-pilot. Co-pilot doesn't need to see the source code. It just needs to see how you're using it. And then it can best understand that, in turn, how to do that.

So, that's the first big thing. Show it examples of that. The next thing that you can then do is, again, take advantage of your instructions files. So, what you can do is just list the API. So, if I'm using a particular library and I know that there's always certain file types that are going to be using that, then I could create that .instructions file or I could list that inside my instructions file.

Or, again, if it's a bigger set of libraries, put an MCP server in front of it. And then I can go ahead and allow it to search that way and be able to see it that way. So, kind of show it how it is that you're using it. And there was something else that I wanted to add there that will come to me in a minute.

No. There's something else and I just cannot remember what it is now. But, yeah. So, this is a great question. So, what about fine tuning? And the short answer is, right now, we don't support fine tuning. Fine tuning, as it turns out, is very tricky. Because one of the things that we've discovered in, like, working with customers and so forth, is customers have code bases where they're proud of a lot of it, and then they've got a lot of it that they're not necessarily proud of.

And so, training co-pilot to understand, hey, this is the good stuff, this is the good stuff, this is the stuff you don't want to look at, becomes a little tricky. So, this is again where standing up an MCP server really comes into play because now I can then better control, this is what I want you to be looking at, this is what I don't want you to be looking at.

So, yeah. I don't want to read them about the cost of assigning . Meaning, my understanding is that if you're on the enterprise plan, you get some amount of premium requests, and the co-pilot agent is going to some numbers, right? But how do I think about that? I am not a billing person.

I am going to-- We've hit noon, so why don't we let most people go-- Oh, I was looking at this clock right here. I thought I had six minutes. Oh, OK. All right. Thank you. I apologize for our network issues. Again, let me put the one slide back up.

There. You can go ahead and check out the lab from there. Thank you. Thank you. Thank you. Thank you. you you