Piloting agents in GitHub Copilot - Christopher Harrison, Microsoft
Channel: aiDotEngineer
Published at: 2025-07-26
YouTube video id: DdaAABdAqZY
Source: https://www.youtube.com/watch?v=DdaAABdAqZY
[Music] So, uh, a couple of real quick things for, uh, those who are just getting settled in or just rumming in. Um, first of all, if you're sitting in the back and hoping for a seat, um, it does look like we are, um, completely, um, 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, uh, 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, um, now is not the time to multitask. Um, but instead, pay attention to the person that's babbling up in the front of the room. Um, uh, 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'm 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 um do keep that uh 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. Um, second of all, uh, we are running around and getting everybody added into a particular organization. That organization is going to give you access to GitHub copilot. Now, uh, when you get added into an organization in GitHub, you do need to accept that invitation. So, um, 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. Um, 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. Okay. And I'll be back in just a minute. Um, in your email uh that you have associated with your GitHub account. Cool. All right. So, here's what we're gonna do. Oh, I can actually take. So there. Yeah, if we could get all devices silent, vibrate. If you get a phone call, more than a take that you're more than welcome to take that phone call behind outside those those doors there. Um, cool. So, while we are getting everything um situated, um here's what I'm going to do is I am going to There we go. Um start tracking through this little thing called get up co-pilot and then uh 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 uh run out of time here. We have 73 minutes. Should be 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. uh we might like skip something just so we can make sure that we can get to um uh to the end, but we'll explore and we'll play with all of that as we uh 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, uh 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, um 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 uh 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 co-pilot. And just like an AI pair programmer, it's going to have certain strengths, gonna 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 that 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 um giving uh a little bit of of a quick story that uh 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 recommend that 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 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's 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 that a lot 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 C-Pilot, again, AI pair programmer, it's going to behave an awful lot like a pro 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 um 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 codebase and trying to figure out what it is that you were 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 C-Pilot 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 co-pilot help you. I sort of like to say don't be passive aggressive with co-pilot. that don't throw something at co-pilot 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 co-pilot should be considering, tell co-pilot 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 tur 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 um uh 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 that I'm typing away. I'm coding away. And then C-pilot 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 C-pilot can then help you write code. And then we get into chat and we get into edit mode. Now chat originally just had ask which is going to be for singleshot 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 a CSS file and a JavaScript file there's very you have any code updates that are single file anymore. And so with edits, I can then guide C-pilot through editing multiple files. And then we 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 C-Pilot, 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 um 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 um um test. You know how many of you were probably in elementary school and you got handed that uh 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. Yep. Absolutely. Um so, in any event, um 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 co-pilot license? Say yes to that. Okay. Um, give me one second here. Um, okay. Okay, beautiful. Thank you. Well done, John. All right. That's all I just said. Well done. Thank you. Um yeah, so if um you did not get your invite for whatever reason, you can actually just go directly to github.comol and then accept your invite. Now I am 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 uh 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 Octtool, 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 um let's me go to the right spot. There we go. And there we go. And there we go. Okay. 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 copilot, complete a sitewide 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 um 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. Okay. So, when you go to create your repo, that's going to be the owner that you're going to want will be Octo. 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. We'll kind of make it real nice and easy for everybody. So, owner will be Octal. 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 gonna leave the 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, 3, 2, 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? Okay, 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 has anybody been able to successfully have co-pilot start work on the issue? Couple of people. All right. How many people have? Okay. Um, of those that just raised their hands, um, how many already had access to either Copilot Enterprise or C-Pilot Pro Plus? Okay, that's all right. Okay. Yeah. Okay. Yeah, we're trying to figure that out. Um the org that we put everybody into is supposed to have that level of access. Um apparently that doesn't seem to quite be the case. So, um in the meantime, um 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. Um now granted again to assign issues to copilot coding agent um you are going to need pro plus or you are going to need um um 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 um um even copilot free um you'll be able to uh perform the rest of the uh of the lab. And you can see that right there. That repository is public. Um, and you can go back and play with it all on on on your own uh later on. Um, uh, later on there. All right. So, let's do this. Um, what I'm actually going to do is there's a question here. I'm I'm assuming the question was about copilot. The gentleman in red, the um, the G-Shock watch. Yeah, you had a question. So, um I the the question is do I consider any of the mobes vibe any of the modes vibe coding? And I would um say to a certain extent basically anything that's going to be um agent driven where uh you're going to have co-pilot kind of like driving the operation rather than you driving the operation. that would certainly fall under that category of um of of vibe coding. Um 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 up to you. Everybody sort of has their their own opinions on that. Um and one thing that you will notice um about me is um I typically don't share a whole lot of like strong opinions um 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 uh answers your question. So yeah, cool. Other questions about copilot? So I'm bringing this up in the background here. Yeah, fire away. Cascade. So uh I'm going to answer um cascade cursor windsurf and all of those questions all up. Which is to say that um 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, um I honestly am not familiar at all with any of the feature sets of any of the alternatives that that are out there. Um and honestly, like going out like bashing competition and things like that is not necessarily my vibe. Don't worry about it. Um um so what I would say is if you're going hey um Windinsurf does this, can copilot do it? Um does cursor do this or cursor does this? Can copilot do that? I can answer those types of questions, but if you're like looking for like a feature comparison or things like that, I I'm really not able to do that because again, I just don't know those well enough. There was a hand over here. Um, as you're showing that co-pilot can be more aware of the environment. Yeah. SQL data source. Yeah. So, this is a fantastic question. So the question is um can co-pilot be aware of um external uh data sources? Um 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 this slide right here um the whole goal is to be able to expand um copilot's capabilities. So, Copilot is built on top of an LLM, large language model. Um, and that LLM is always going to be static. Um, and so what MCP allows you to do is it allows you to give Copilot the ability to call out to external services. And, um, the diagram looks a little bit like this. Um, I need everybody to memorize this. There's going to be a quiz on this in about 15 minutes. Um, and basically what you're going to notice if you look at this is that your request is going to go to copilot. 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 C-pilot and I can say hey create an issue on this. So that way maybe I'm 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 uh 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 like get that schema or I want to be able to get that data from there. Then I can do that with uh with my MCP server. Now, a couple of real quick things on MCP servers. Number one is that there are a bunch of um first-party ones that are created um like we have one, Azure has one, Playright has one um and then there's a lot of community ones uh 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 um um but um it is something that is um um sorry I got thrown um oh I haven't created one on my own. Um, but I've seen a lot of people create them and it does seem to be something that's relatively straightforward um, as far as setting it up that you can just capture the request, process it, and then send it off from there and you basically just create a set of endpoints for copilot to to figure out. Okay, really quickly on that, if you have a backup for your database that's in like a SQL file, can it consume that as well? Sure. Absolutely. Absolutely. Yeah. Yeah. And in fact, you wouldn't even necessarily like if what you're looking for is to help co-pilot write database queries really well, um 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 um internally inside of um 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. Okay, that's supposed to be faster. There we go. Um, that's not it. I think this is it. Um, yeah, it's something. There it is. Yeah. Um, yeah. So what you could do um if all you have is just the DDL is you could actually just include that with your instructions um 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 simplest thing that works. So yeah. Okay. Um yeah. Uh absolutely. So let's talk a little bit. Let's actually do this. I'm going to um Yeah. Yes. Yeah. Unfortunately, um, between Wi-Fi issues, access issues, and things like that, we're just not able to to do that. So, yeah, I'm turning this into sort of like live Q&A and live demos, 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. And then let me let me do this. Okay. Um Okay. So, let's talk a little bit about um copilot coding agent here. So, what I've got here is I have um an issue that I've created uh and this is just copied and pasted tree from the lab um 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. That 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 co-pilot 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 eyes. That's the little indication that co-pilot's now on the test. It's kind of cute. Um, so the first thing I want to highlight is the issue. And you'll notice again I'm not being passive aggressive with co-pilot. That 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 co-pilot that that you leave for ambiguity 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.mmd. So, if you're using chat and if you're using coding agent, this supports copilot instructions, copilot-instructions.mmd. And if we take a look at this file, what I want you to notice, it's just a markdown file. So nothing special, nothing fancy. And what I've done inside of this file is I've given it highlevel 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 uh 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 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 spelt and Astra to be created, how I want my style, my 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, anytime 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, okay, 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 C-pilot 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 request that Copilot made. So just made this, you know, 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 co-pilot 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 co-pilot steps. There was a hand here first. Yeah. Yeah. For instructions are available. Yeah. So, that's a great question. So, and I'm gonna answer the second part to that uh of that workspace as well. So, um when it comes to copilot instructions, those are always going to be available. Let me get rid of my red squiggies here. Um those are always going to be available um inside of uh inside of chat here. So, let's say I do this. So, I'm going to put this into um agent mode. Um I'm going to leave it as cloud 37. And uh by the way, um I do not have a stance on which model is better than any other model. Um you will notice, and you kind of pick this up in your lab as well. I I was one of the uh the authors of the lab. Um in the lab, we always use Claud 35. Uh you'll notice any of my demos, I'm basically always using Claude. You can read whatever it is that you want from that, but I have no personal stance on which model is better than any other model. There we go. So, um, update the website to allow for filtering by, um, publisher and category, add drop-down lists, and refresh the page when indexes um, change. Make sure the tests pass. Okay. So, um, go. So, what I want you to notice, um, is Oh, I put it into agent mode, so it's not I I promise you it is going to use the instructions. It's just not going to show it to me, unfortunately. Um, but on any of the modes in chat, oh, it will. There it is. I just needed to be patient. There's my copilot instructions under my references. So, there it is. It's it's using that uh that right there. Um the other thing that I want to highlight is and this right now is particular to local chat is I can even create um instructions files and this is admittedly a little bit um it's a little bit tricky to I think understand kind of the first time that you see it. Um so kind of go with me on this one. So copilot-in instructions universal every single chat request this is going to go the 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. Um 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 uh information about the endpoint. I've given it information about my uh 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 like React components just to use that as an example um 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 um um asteris 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 anytime that it finds a file that matches test underscore. And you'll notice if I go into my um server tests, you'll notice test games that matches that pattern right there. So anytime that I was wrong with a test file, that would then go ahead and um 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. 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 if you're using the workflow for setting up coding agent, it does have to have that name and that is documented. [Laughter] Yeah. So this is a fantastic question. So um so the question is hey about these standards can we put these at at an org level and um 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 um as well. So you could do it that way. Um 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 um announced this is um copilot spaces um where this is specifically on github.com that what you can do is basically point it at at a repository point that it specific files and say hey here's our knowledge bases 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 um raise the information from uh from there. You're welcome. There was something over here. Yeah, I'm trying my best to be as fair as I can. Yep. Oh. Oh, okay. Yeah. So, that's a that's a fantastic question. So the question is is hey about this um um um about this workflow file um is this able to um be like automatically created or edited by copilot um and the the short answer is no. Um now if I was like working locally like let's say I'm not overly familiar with actions which I'm not. Um 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 and this um and let co-pilot generate this for me. Absolutely. But once I launch this in agent mode um agent mode is not going to be going back in and editing that. Now keep in mind um and I'm going to kind of lead this right into um the next um kind of like logical question here. Um, so keep in mind that agent mode or uh coding agent, so when it's doing its thing in the background here, it does have an ability to like run scripts. Um, so it can like run tests and things like that. And in fact, if I [Music] um where was I? Um here and here and let me scroll on down to view session here. I'm going to zoom out um because ironically I think it's going to make it a little easier to read. Okay, let me come down here. Um, one second. Um, yeah, here we go. Yeah. So, um, yeah, it looks like all the tests fail, although we're getting um Oh, that's cool. They pushed an update um to SQL Alchemy. I'll have to go back and now update the project. Um, but in any event, um, the takeaway that I want you to get out of this is, um, the fact that this is running commands locally. Okay. And so that then kind of raises um, a next big question which I think is very directly related to, hey, could it go in and like modify that um that that that initial set of workflow? Um, and there's it it it it can't modify that. Um and it also is not able to access any external resources. So let me uplevel this real quick. Um 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. 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 right access to that branch. So in this case here it's going to be copilot-fix-2. Um, copilot-fix is what it's always going to start with dash and then the number of the issue that was assigned to. I'm going to Yep. Um, so um, uh, so in this case it was issue number two. So that's why it's copilot- fix. So that's the only thing that it's going to have right 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 like 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 that uh that 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 uh with that security in mind. So very long-winded answer, but there's everything you ever wanted to know. Yeah. Yeah. So let's actually go kind of one one step further with this. So, um I am a um uh I'm a good steward of my um um of my repository. And so when I create a PR into main, so I'm going to use this one here, dependabot wanting to uh to bump a version number. And we're going to notice we're going to notice there we go. Um that I have um uh a workflow set up here to perform some testing. So it runs unit tests and it runs some endto-end tests. So um that way somebody goes in, they create a 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, um here's the catch. Again, thinking with our our security cap, um I want to make sure that that any of that code is always going to be something that that 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. Yes. Exactly. Yeah. So, so the question is is um so co-pilot when it did its work behind the scenes and 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. I I do the exact same thing with co-pilot as I do with all of my other developers, which is that that bounce and suspenders approach. So I'm going to uplevel 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. Um, 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 tests pass, that our llinters 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, is 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. Oh, I see what you're saying. Yeah. So that um like let's say I'm working on a larger project and admittedly this is a smaller project. So like when I run my my unit test or even my even my end to end test, you know, it's going to take like 30 40 seconds. Um, but if you've got a larger project where now that's going to be taking minutes. Um, 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 pass aggressive or co-pilot. You want it to do something tell it to do it. Um 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. Um, and then on top of that, one of the things that I've I've noticed about um, Claude 4 or Claude Sonnet 4 or whatever the naming structure it is they're using um, 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. Um, which it 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 I'll come back to the middle. Yeah. Does Copilot? Yes. Yeah. Copilot does support uh remote MCP servers. Um 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. Yes. Yeah. Uh that uh right here if I go to settings and I go to um coding agent. There's my MCP. I can go ahead and set the the the list my MCP servers there. and then um environments and then um copilot in here. There's um um there's different uh variables that you could then go ahead and set to open up your firewall. All that's in in the documentation, but that's where you would go to to go ahead and do that. You're welcome. Yeah. Correct. [Laughter] Yeah. Yeah. So, so the question is is hey, we're using ADO, we're using Jira, we're using, you know, fill in the blank for managing our issues. Um, how can I then use that to assign a co-pilot? Fortunately, um as of right now, um it's going to be GitHub only. Um I don't know whether or not it will stay GitHub only or what a future plan might look like. Um but uh but yeah, now one thing that you might want to consider um is um if there is something in Jira that you want to assign to to Copilot, you could create a relatively straightforward script to just like copy that issue over um and then go ahead and and assign it to uh to Copilot from uh from there. But right now, the issue does have to be inside of uh inside of GitHub. There you go. Yeah. Yeah. Yeah. So um this is a fantastic question. I'm going to um actually uplevel this. So the question is is hey we have um internal libraries and those are created in different uh repos and we want to make sure that copilot's going to use those um uh those external libraries when it goes in to to do its code. So um first thing that you can do um is make sure that copilot sees you doing it. So, Copilot is a great pattern matcher and in order for Copilot 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 I'm a Spelt developer. I have no idea how spelt works behind the scenes, but I know how to use spelt because I've read all the docs and I've written all the code and and 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 copilot. Copilot doesn't need to see the source code. It just needs to see how you're using it and then it can best understand then in turn how to um um how to do that. So um that's the first big thing is like show it examples of that. The next thing that you can then do is again take advantage of your instructions files. So um what you can do is just list the API. So if I um if I'm using um a particular library and I know that there's always like certain file types that are going to be using that then I could create that 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 to search that way and be able to to see it um to see it that way. So, kind of show it how it is that um uh that that that that you're using it. Um and there was something else that I wanted to add there that will come to me um in a minute. No, there's something else and I just cannot remember what it is now. But yeah, so yeah, you um so this is a great question. So um what about fine-tuning? And the short answer is right now um we we don't uh support fine-tuning. Um, fine-tuning, as it turns out, is 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 copilot to understand, hey, this is the good stuff. This is the stuff you don't want to look at. Um, becomes a little tricky. So, this is again where standing like a uh 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 uh to be looking at. So, yeah. I I am not a billing person. I am going to let Oh, I was looking at this clock right here. I thought I had six minutes. Oh, okay. All right. Thank you. I apologize for our network issues. Um again, um let me put the um uh the one slide um back up there. Um you can go ahead and check out the uh the lab from there. Thank you. [Music]