Collaborating with Agents in your Software Dev Workflow - Jon Peck & Christopher Harrison, Microsoft
Skills:
Agent Foundations90%Tool Use & Function Calling90%Multi-Agent Systems80%Autonomous Workflows80%
Key Takeaways
The video demonstrates how to collaborate with agents in software development workflows using GitHub Copilot, an AI pair programmer that can generate code, run tests, and perform tasks like creating pull requests using Model Context Protocol (MCP).
Full Transcript
All right. Well, let's uh let's get uh get started here. I did see a couple people uh walk in at uh kind of last minute. Um if you haven't already uh read the slide there, uh you'll notice the slide has the uh first bit of instructions. Uh send an email. That email address that you see right up there, so peckjohn+aiworld@github.com, and then just as the subject, just put in your GitHub handle. One quick note about the GitHub handle, if you are using enterprise managed users, uh this is going to need to be a personal um GitHub handle. So, that email address, and then your GitHub handle as the uh as the subject. Again, not but you know what to do. So, go ahead and uh and do that. And uh while everybody's uh getting settled, then uh let's go ahead and get rockin' and rollin'. So, uh my name is Christopher Harrison. Uh the gentleman over there is uh John Peck. And uh we are both uh enterprise advocates at uh GitHub, uh obviously doing a whole lot of uh developer relations stuff. So, basically talking to customers and uh doing events like this, primarily focused in on developer experience in this little thing called GitHub Copilot. So, this is going to, hopefully, be a hands-on lab. Now, I am going to put out a couple of real quick caveats, because we had the exact same lab this morning, and we ran into a couple of challenges, the biggest of which with the Wi-Fi network. That because of what we're going to be doing is going to rely quite heavily on the network, we're going to try. Okay? I'm going to repeat that one more time. We are going to try. We're going to give it our best effort. If it works, wonderful. And if it doesn't work, here's what we're going to do instead. Is you will still have a day or two to be able to complete the lab, and you can go ahead and complete that on your own time. And what I will do instead is I will start doing some demos. I will um answer a whole bunch of questions. Um the morning group had a whole bunch of questions, and something tells me that this group will also have a whole bunch of questions. Been doing enough Copilot talks, there always seems to be an awful lot of questions. More than happy to talk through all of that. So, we are going to try our absolute best. Hopefully, everything will work. And if it doesn't work, we've got a nice little fallback. And I want to make sure again that I highlight, you will have access to the lab um for a couple of days after this event, so that way you could go out and do it on uh on your own time from uh from there. So, one last time because I did see a couple of people that just walked in, notice instructions on the slide, please send an email, peckjohn+aiworld@github.com. The subject, just put in your GitHub handle again. Make sure that's your personal or a non-enterprise managed user account. If you don't know what enterprise managed users are, don't worry about it cuz then you probably don't have one. If you have one, you'll know it. See a couple of knowing nods there. Okay. Without any further delay, let's go ahead and talk a little bit about GitHub Copilot. So, John's going to be working in the background here. Once um um he is done working, I'm then going to go ahead and uh make an introduction and get everybody pointed at the uh at the lab. But I want to get started by talking about something that's very, very important when we're working with GitHub Copilot, and that is context. That you'll notice that we have a tagline for GitHub Copilot called your AI pair programmer. Now, not only is it wonderful marketing, it kind of is, um but it's also a fantastic description of how best to think about GitHub Copilot. That you want to think about it as an AI pair programmer. And the example that I always give, the analogy that I always give, is my partner and I woke up the other day, and she says to me, "Hey, I want to go to brunch." Fantastic. Who doesn't love brunch? And so, I recommended a spot, and she looks at me and says, "You know, here's the thing. Been there an awful lot lately. I want to go somewhere new." Okay, fantastic. And then I recommended another spot. And then she says, "You know, now that I'm thinking about it, I'm really kind of craving waffles." Spectacular. Who doesn't love waffles? And then I recommended another spot. Now, that's a very normal back and forth. That what happened was is a request was made, I had some level of context, and I gave back a perfectly valid response. And then some more context was provided, and then I gave yet another response. And that's a very common back and forth. And that may have been context that she had at the very beginning, and maybe just hadn't yet shared. And it might also have been context that she sort of discovered as we were talking. Again, all of this is very, very normal, and it's how we think about when we're talking about with other people, when we're talking with human pair programmers, and then also in turn with that AI pair programmer. That context is key. Now, when we're talking about context, a lot of times, we really focus in on the prompt when we're talking about context and AI. That I see an awful lot, especially with new developers to uh to Copilot, is they're really worried about like, "Okay, well, how do I craft a prompt?" And don't get me wrong, prompt crafting is an important skill. But context goes beyond prompt crafting. Because unlike a lot of other tools, which are maybe going to run all of your code through different parsers, or maybe even build your code, or potentially even like run your code, Copilot, again, behaves like an AI pair programmer. It's going to be reading your code. Just as if I brought somebody else new on to the team, and they're going to start reading your code. So, making sure that that code is readable becomes very important. So, if you have good function names, good variable names, if your code is well structured, Copilot's going to be able to navigate that pretty well. And if you're using a lot of single-letter variables, if you're using a lot of abbreviations, Copilot's going to come along and it's going to struggle with that, just again, as another pair programmer would. In addition, comments. Now, we all know the point the importance of commenting code. And there is a strong part of me that has this feeling that good code doesn't need comments. But here's the thing, is having a line or two of comments does help you make your code that much more readable. And so, even if it might be superfluous, if it's going to make life easier, maybe just go ahead and add that in, cuz it's not going to, say, slow down your application. So, having comments describing what it is that you're going to be doing, how it is that you're going to be doing it, is really going to help things out. And then finally, last but not least, is your project structure. That having a good, navigable project structure is also going to help Copilot. Now, the real takeaway that I want you to get out of all of this is this is sort of like just good code 101. That having good code is really going to help out an awful lot with context. I'm going to come back to to questions a little bit later. Okay. So, how do we then help Copilot help us? And so, number one, context, we talked about that. Number two, the intent. Make sure that you're clear about the intent. What is it that you are trying to do? And be clear about that intent. That one of the things that I see an awful lot of developers do, especially if they've maybe worked with like older chatbots, is when they start sending those initial prompts, that they're very terse. Because they're used to dealing with older chatbots that maybe weren't really good at processing uh natural language. And so, it basically became like using command lines. That's not what this is built for. So, be clear. If you want something to be done a particular way, and kind of getting into the specificity aspect here, tell Copilot. Or as I like to say, don't be passive-aggressive with Copilot. That sometimes I'll see a new developer, they'll go in, they'll they'll they'll give like a very short prompt, and then they'll go, "Well, wait a minute. Why didn't Copilot figure this part out?" Well, did you know that part? Well, yeah. Did you tell Copilot? Well, no. Okay, well, tell Copilot. Like if there's an important piece of information that you need Copilot to consider, go ahead and make sure that you tell Copilot that. Okay. Copilot supports a handful of different workloads. Um you'll notice the one on the far end, Copilot coding agent. I'll get to that one in a minute. It's all bright and sparkly and so forth. Um that's not because that one's um necessarily best. Um it's just because it's the newest, and as we all know, we need to just highlight and sparkle the um the the the newest item. So, um first up, let's talk about code completions. So, code completion is sort of the original version, if you will, of GitHub Copilot. This is where I'm going in, I'm writing code, and then Copilot will suggest the next line, it will suggest the next function, and it will suggest the next class. This is wonderful. If you're in the zone, you know what you're doing, you're typing away, fantastic. And Copilot will be able to support you right there. Next up is chat. And originally, this was single shot. That I go in, I ask a question, and I get a response back. So, maybe it can generate a single file for me. But the problem with that, as we think about even the simplest of updates, like if I go to update a web page, I'm going to be updating an HTML, JavaScript, and CSS file. That's multiple files. And so, this is where edits comes into play. And with edits, Copilot is now able to edit across multiple files. And then we take that to the next level with agent mode. And with agent mode, now again, still inside my IDE, what Copilot's going to be able to do is navigate your project, figure out what needs to be done, and then start building code. And it's able to work iteratively, and it's able to run external tasks, like for example, running your unit tests. And if it detects, "Hey, there's an error." it's even able to self-heal. I'm going to sneeze. Thank you. Okay. I I was waiting for the second one. I usually sneeze in twos. It'll It'll It'll show up in a minute here. Um okay. Um and then finally we get into coding agent. And coding agent is different because this is going to be done inside of github.com. So, I'll have an issue on github.com, and I can then assign that to coding agent. And coding agent will then work in the background. Figure out what needs to be done. Be able to again run scripts. Be able to self-heal. And then eventually create a a pull request that you can then review, and eventually merge into your code base. And so this is what we're going to be exploring. Not going to worry too much about these two slides here. There we go. This is what we're going to be exploring in this lab. John, how are we doing? We are doing splendid. I have two people left to actually join. I will need about 3 minutes to add them all to Copilot. Okay. But we can at least go in and start accepting invitations. You can go in and start accepting invitations. One quick note, my Pope, I don't believe I have your correct handle. So, if you could send me a new one, that would be great. Okay. And there was one person who walked in just a minute ago, so we'll need to get that sorted as well, but we can get there in a minute. Okay. So, um first part to the lab. Navigate to the URL that you see right there. So, github.com {slash} octo h o l hands-on on lab. So, o c t o h o l. Hotel Oscar Lima. And then at the very top, and by the way, I'm assuming that you're logged into GitHub with the handle that you sent over. And then up towards the very top, you should see accept invitation. And then go ahead and select accept invitation. Now, here's the most important part about today. Silence means, "Hey, everything is fantastic." So, if you're not seeing it, please let me know. Um Okay. And then accept invitation right at the very top. Okay. Yep. Did you send the email? Okay. All right. Um I'll come back in a second. Um Hey John. Do they need to ask for the Copilot seat? Need to explicitly ask. I am just going through the process right now of adding those in. Okay. Perfect. It doesn't matter. Yeah, he's he's going to be adding you in. Okay. Now, for anybody who did not send the email address, um please go ahead and send an email to that address. And then with your GitHub handle, I'm going to leave that up for about another 15 seconds here because I'm trying to keep things moving for everybody as quick as I best can here. Um the I can share the share the slide deck. Um my handle is geek trainer, and you can basically find me on everywhere with with that, including GitHub. Geek trainer. g e e k trainer. Um uh GitHub. At GitHub. Okay. Now then, let me get everybody rolling here. So, after you've accepted the invitation, um who has not yet accepted the invitation? Okay. And then what happened when you went to octo hol? And by the way, I I I want to make sure that I highlight something. You'll You'll notice that more people raised hands. Silence means everything is fantastic. So, if something is not working, please let me know. Now, for people who um everything is working fantastic, then here's what you can do is go to that URL. Actually going to modify the slide real quick. Is And if we could get phones to a silent or a vibrate, that would be wonderful. Okay. All right. So, um to get started with the lab, what you're going to do, navigate to that URL that you see right there. So, gh.io {slash} agent-sdlc-lab. When you get to the part to create your repository, the owner is going to be octo hol, and then the name is going to be your handle. Again, replacing your See where that's going. And go ahead and start working on exercises zero and exercises one. And I will let you have at it, and then I'm going to start going around and helping people get unstuck. Okay. Um Hey John. When uh when you have a minute? Okay. Uh right over here. Okay. Did you send the email? Yes. Okay. Um we'll go ahead and get John over to help you out in a minute. Yes. Okay. Did um was it maybe there earlier? Do me a favor. Um hit plus right at the top here. Yeah, I'm hit new repository. Just let's just test something real quick. Um hit the um drop down right here. Um okay. We'll go ahead and get John over here in just a minute. Sorry. Yeah. Okay. All right. Now then, remember, silence means everything is hey everything is fantastic. So, if something is not working, please raise your hand, otherwise we are never going to know. Oh, okay. So, note the owner. So, owner is going to be octo hol. Nope. So, notice the slide. Okay, sorry. And then the repository name is going to be your handle. There you go. Yep. Hey. Um okay. Then hold on for just a minute. John will be over. Hi. Oh, okay. So, here's what we need to do. Hi. Um Yep. Um No. Um so, yep. Uh perfect. So, go ahead and hit enter. And so go ahead and scroll down. And you see the step zero here, set up the environment. Let's go ahead and just hit that. And then now we're going to follow the instructions from here. So, you'll notice that you're going to want to open up the um that URL in a new tab, and then you're going to select uh use a template, and then create from there. You're welcome. All right. All right. How's everybody doing? I know there's a couple of people that John's going around to. Yeah. Yes. Yep. Beautiful. Doesn't matter. Living on the edge. Yeah. Nope. I Um here's what you're going to do is um so, uh go to Okay. So, go to um docs. And then just scroll on down, and um go to step zero. And then now go ahead and follow right along with what this says here. Yeah. Oh, okay. So, nope. So, um we um we need to go to the first part here. So, navigate to that URL here. So, go to Yep. So, um real quick, as people are getting started, I want everybody to kind of notice the the steps on the slide here. So, step one is go here. What you're going to find there is a set of instructions for the hands-on lab. And then, in step zero, it's going to have you then create your repository. When you get to that step, you're going to set the owner to octo-hol, and then the name to your your handle. So, start here, start working through the lab, and then you're going to go in and um uh and set that up. Okay. So, let's go into step zero. Yep. And then, now you'll notice it's going to have you um open that up in a new tab. It's going to have you create from Exactly. Yep. And then, you're all set. Don't sit down yet. Yes, just start at zero. Okay. So, here's what we need to do is um um let's go ahead and um let's just um to um nope. Um you see the uh the URL up at the very top there, the gh.io? Okay. Um nope. It looked like we um uh didn't uh it should be sdlc. So, let's go ahead and just try that again. So, type in Type nope. Nope. Stop. Yep. There we go. So, gh.io um slash agent dash sdlc. Nope. Nope. Here, you have an sl. You want sdlc? Yep. Dash lab. Enter. There we go. And so, now go ahead and scroll on down. And then, you'll notice there's step zero. Let's go ahead and go right into step zero. And then now, it's going to have you create your repository. So, if we read through, we'll notice step one, we'll open that URL up in a brand new tab, and then follow the instructions from there. Okay. So, um Yep. Nope. Create a new repository. Yep. Nope. Put it into right at where it says up on the slide. Hit the drop-down. octo-hol And then, the repository name will be your handle. Uh you can leave it as private. That's fine. Okay. All right. You're welcome. Yeah. Mm. Yeah, you can just go ahead and delete that one. And then, okay. So, all you have to do is go to settings. Scroll all the way down. All the way. Yep, there we go. And then, um hit that. And then, you're going to hit delete. And then, you're going to hit delete. And you're going to um you can actually just copy and paste it. Um and then, uh yeah. Welcome. Yo. Correct. Yeah, we can leave that unmerged. Yep. Yeah. Yeah. We're just going in and and kind of exploring it. There's also um Yeah, I'll get to that in a minute. Ask me that question again in in 5 minutes. I don't want to interrupt everybody, but it's there's an important thing there. So, ask me that question again in 5 minutes. Yeah. Oh, yeah. You need to be signed in. There you go. Yeah. Perfect. Yeah. Correct. Yep. Yeah. And and just kind of keep on following on with the uh with the lab from there. What this is going to have you do in a minute here is it's going to have you open up um the your repository again, and then you're going to create a couple of issues and start playing around with coding agent. Yep. Yep. Yeah. Well, that's uh the the lab actually says to send a a hello um to like um um kind of wake it up. Yeah. We we we had played with that. I know. Keep going. Yeah. Fantastic. Oh, hey John. He's having a premium requests error. Oh, thank you. I type really really fast. I don't type I type accurately, but I type really really fast. See See, here's the thing about being a developer. You don't have to spell correctly. You just have to spell consistently. Yeah. Yeah. Yes. Yeah, actually, if you're you know, if you're like in a in a zone, and you already like finish out step one and want to start getting into step two, you can go ahead and do that. You'll also notice that all of the steps actually include like little optional exercises. So, if you are um you know, uh somebody who kind of like just moves really really fast, um there's other stuff to do in in in that lab. So, yeah. So, go ahead and um kind of keep working through exercise one. Um I'm going to do a an overview of exercise one in like just a couple of minutes here. For code spaces, no. So, code spaces is a separate product. The reason that we're using code spaces is it's effectively a container in the cloud, and so it just eliminates setup. So, like it's wonderful for just development in general, but especially something like this, having people install software, forget it. So, yeah. Christopher. That's okay. So, Copilot uh for enterprise, which is going to be like everything that we're using, is $39.99 um a month. So, $40 a month. Yeah. Um uh there's also a business tier, which does not um it There's a few different features that it does include, um but one of the biggest is going to be um access to uh to coding agent. Um and that's at $20 a month, or again, $19.99, or whatever. Uh yeah. Yep. Yeah. Yep. Yeah. Yeah. Um hit refresh real quick. Yeah. you still have there we go. All right, so here's what I'm going to do. I know that people are still working periodically. I'm just going to come up here. I'm going to kind of talk and highlight a little bit about a feature. So this is basically a real quick overview of what it is that you're doing in exercise one. You can have a seat and get yourself comfortable. Pretend like you're an adult. Do I look like an adult? No. Proof that you work with somebody for way too long. Um No, so so let's talk a little bit about get a co-pilot coding agent. So the whole goal coding agent is to have a an AI peer programmer that what I can do is I can assign it a co-pilot issue or sorry a GitHub issue and let co-pilot begin work on it. Now the first big thing about assigning an issue to co-pilot. Remember that a whole speech we did about context waffles all that good stuff. Yeah, yeah, yeah. So context context is key and so if we take a look at the issue that we created we went ahead and gave it a pretty decent amount of detail about what it was that we wanted to have accomplished. So you'll notice that we're going to be creating a functionality to allow for submission of games. So here's all of our requirements and kind of list them all out and if this was going to be something more robust. I might have even dropped a potential workflow that I wanted it to kind of step through as it was building out all of the project. Again, don't be passive aggressive with co-pilot that if there's some piece of information you wanted to see and understand absolutely 100% tell it about it. Now the next thing is after you assign it it needs an environment in which to work. And there is an there's a workflow that you can create and it's called he said speaking slowly to stall co-pilot setup steps. And so when co-pilot goes to do its work it's going to be running inside of GitHub actions and it's going to step zero run everything that it sees inside this workflow. And if you look through this workflow what you're going to notice is a whole bunch of steps to install different services and packages and so forth. And that's now going to be the environment in which it's able to do its thing. Now that also leads me to another very big point which is about security. Because here's what I'm going to do is I'm going to take an AI agent I'm going to assign it a task and it's now able to go off and start doing things. And I want to make sure that everything it's going to be doing is going to be completely contained. So the first big thing about working with coding agent is that it does not have access to the internet. That by default it is a firewall that's going to block it from any external resource. Now you do have an ability to open up the firewall if you do want it to be able to access external resources but by default it won't and that includes by the way installing frameworks and libraries. So the only way it's going to have access to frameworks and libraries is either A you open up holes in the firewall or B you set this up to install all the necessary libraries. Number two this is running inside GitHub actions and if you're not already familiar with GitHub actions one great thing about it is that it's going to launch an ephemeral space. So it's going to set up a space it's going to do its work inside of there and then it's going to collapse down from there. So it will not have access to any other resources besides what's inside of there. Number three it does not have right access to your repository save for the branch that it creates. So it cannot modify anything inside your code base the only thing it's able to modify is just its branch. Number four that branch you're going to notice will not actually create a full pull request. It's going to leave that in draft form not become an actual pull request unless you come along and say yes, I approve this. Number five along those lines if you are a good developer shop and you have different requirements things like security checks things like unit tests end to end tests regression tests all of which need to pass what you're also going to notice is that on this pull request none of that can actually run Where's that button? Right there. Until you click that button that says approve workflow runs. So again trying to keep it completely self-contained. And then finally last but not least and this is a question that was asked earlier about reviewing it and then merging it in. When it comes to the current version of coding agent there is a restriction and this is by design. Um remember again coding agent is brand new so this can always change but this is by design that if you assign an issue to coding agent you are not allowed to then review its work. So you need somebody else to review its work. So basically it's sort of like in most organizations you're not allowed to review your own work you need to bring somebody else in sort of the same thing is that I assign the peer programmer and then I need somebody else to come along and say yes that this actually that this actually is okay. All right. So questions on co-pilot coding agent. That is a fantastic question. And I'm just going to say that that is a fantastic question. And and and I'm going to say that's a fantastic question. Um other questions? That's a great question. So the question is that was also a great question. So the question is can you iterate? The answer is yes is what I can do let me zoom out a little bit that was a little bit obnoxious is I can just go in and add a comment. So if I go in and I add a comment and I say hey um what what I potentially want it to do also add in an endpoint to search for games by name. There we go. Thank you. And if I scroll back up give it just a second here and then we'll notice the cute little eyeballs again. So now what's happening is that co-pilot has started work again and if I hit view session hopefully I've stalled just long enough here you'll notice that it's actually started up a brand new session. So it's going to take the work that it did and then it's going to start back up again and begin work again from there. Yeah. Does it work with self-hosted runners? No. Not at the moment. When? I I shouldn't have even said at the moment. Let's let's let's summarize that answer no. Yeah. I always feel like a press secretary whenever I'm doing this. So um give me a little bit more about what you're asking there. Yeah, so I have a GitHub application. Clients install my GitHub application. It generates some rich prompts that we want to use with basically GitHub co-pilot to run something on their code base. Can we do that? No. Okay. So what you could do is you could stand up an MCP server so that way they could use co-pilot talk to your code and then start to interact that way but you're not going to be able to have co-pilot like do something to somebody else's code base. Okay, so it's not like an open API that you can just have a co-pilot stick in a code base to do stuff. No. Yeah. Yeah. So yeah, so what you can do is if you have a pull request you can assign that to to co-pilot at that point but again it needs to be on a repository that you own. I don't know the answer to that. I'm I'm going to be honest. I I don't know the answer to because I don't know necessarily like what an app is able to do on on behalf of the user at that point. Um I yeah, I would I I I I would need to get back to you on that. Yeah. My my handle is geek trainer. Yeah, let me just um Here we go. So, just shoot me an email and I can try and dig up a a more robust answer for you. Other questions? Yeah. Mhm. Yeah. Yeah, this is a this is a great question and I'm actually going to up-level this um a little bit. So, when we're talking specifically about coding agent, if it doesn't do um something that that uh that I wanted it to or if it does get something completely wrong. And keep in mind that AI, just like human developers, is going to periodically get things wrong and it's sometimes going to get things spectacularly wrong. Again, just like humans are going to sometimes get things spectacularly wrong. So, um if that's the case, there's a few different approaches that I could take. So, one of them would be is just like I did um here a minute uh ago is or 3 minutes 57 seconds ago, but who's counting? Um is just add in a comment and just clarify, "Hey, this is really what I wanted to use." So, that's one option. Um if it's like completely wrong, if it's just um completely out of left field, then the next option is you can just go back um all the way up to the very top here um and under assignees um and I'm not going to remove this cuz I I want to let it keep doing its thing, but just unassign Copilot, change your issue, and then reassign Copilot. And then and then that way it will just completely start from from scratch. Um number three, and I think this is always um very important when when we're working with AI is if we see it get something wrong, one of the first questions that we really want to be asking is why did it get it wrong? And nine times out of 10 and I I'm going to come right back to this word yet again is context. Is that it didn't fully understand not only just your request, but in the environment in which it was going to be working. So, one of my absolute um favorite features um is um Copilot instructions. So, on Copilot instructions, what you're going to notice and this is read um in um in coding agent and it's also read on every single um chat request Oh, how do I um Yes. I figured out a shortcut key on a Mac. Go me. Thank you. Um Hey. Um what you're going to notice here is I have Copilot-instructions.md. This is looked at by coding agent and it's also looked at by every single chat request that I make inside the IDE. And what you're going to notice in here is I have a really nice high-level overview of what I'm doing and how it is that I'm doing it. So, I've given it a little bit of introduction about the app itself and how it is that I'm building it. I've given it code standards. I've told it everything that's required before commit. I gave it some global language guidance and then I gave it some specifics on on what it is that I'm building and how it is that I want it to be built. And then if I scroll all the way down, you'll even notice that I highlighted that repository structure. So, that way I'm clearly spelling out, "This is where to go find things." So, this is a big place to go in and look if you want Copilot to have some additional context, some additional information. Um another big thing that you can do, again speaking to things that both coding agent and Copilot chat are are able to use, is to stand up an MCP server. So, this is actually one of the other exercises in the lab um is model context protocol. And basically what an MCP server allows you to do, and I have a slide right here that shows you the uh the diagram. I need everybody to memorize this diagram. There's going to be a quiz on this later. Fantastic. Um but basically here's what happened is somebody goes in, they make a request to Copilot. Copilot can then look through the list of commands that have been exposed out through different MCP servers and then from there go access external data. Because this is always one of the challenges whenever I'm working with Copilot or really anything that's built on top of an LLM is that typically it's going to be limited to just that training set and that's it. This allows it to access external uh information and even perform operations on your behalf as well. So, if you see Copilot coding agent doing things in a way that you weren't quite expecting, take a look at its context, take a look at what it has. So, look at your Copilot instructions, maybe put an MCP server. So, if you've got like a really um uh large repo, a really large code base and you want Copilot to be able to like better search and better reason over that, this is a place where like standing up an MCP server um would come into uh come into play. Now, um I do want to highlight one last thing um uh because Harold is in the room and um uh he would be very disappointed in me if I uh didn't highlight this. Um and this is dot instructions files um which and I am not saying this just because Harold is in the room. This is one of the of of of the things that uh that Harold works on. Um I'm not saying that just because he is here. This is true. This is one of my absolute favorite little features um where when we think about um what we're doing in coding uh is we're doing a lot of the same thing over and over again. Like I'm going in and I'm creating yet another React component or in this case here, I'm creating yet another Flask endpoint. But I probably want all of those to follow a particular pattern. And so, what I can do is I can create a dot instructions file and I can then manually add this into chat and this dot instructions file can then have information about how it is that I want it to be created, the different rules around it, and then even point to prototype files that basically say, "Hey, you see that games file over there? Use that. That's how I want this to be built. Hey, you see that test file? Use that. That's how I want it to be built." And I can even have this happen automatically that you'll notice that I have apply to header info. And so now, if it matches this pattern, so if it's inside the server test folder and starts with test underscore, it's going to automatically apply that. So, let's say again going to React components, I can then go ahead and set up a filter. So, anything that ends with a JSX uh TSX um extension, I want it to apply this. If you're a Svelte developer like I am, um All right. Okay. All right. I got a couple people. Fantastic. Beautiful. Um then I can go ahead and set up a pattern so that anything that ends with dot Svelte is going to follow the instructions here. Now, again, this part here right now only available inside of Copilot chat, but again, other ways that I can start to provide context. That was an awful lot on context. There was a question over here. Yeah. How often do you update this? Yeah, this is a great question is um how often do I do you update this? Keep in mind that this is an artifact of your repository and I very much want to treat that as such. So, um I sort of give this an analogy to, you know those little scripts that you spend like 3 days writing, but it's going to save you 5 minutes a day? That's basically what these are. Is that you're going to spend some time and you really should create your instructions file, create your dot instructions file. Like really make these robust because what you're going to wind up with then on the back end is increased productivity, but you're also then going to help ensure that the code that's being generated is generated the way that you want it to be generated. So, as things change, then do that. Yes, Mr. Harold. Yeah. And I would even add like to that that, you know, one of the things that's relatively unique about being in DevRel is I do an awful lot of demos and one of the things about doing a demo is you need that to work. And doing that with um a probabilistic tool like GitHub Copilot um does become a little bit of an adventure. That will be the word that I will use there. Um and instructions files have been probably the number one thing that I have leaned on to help ensure that I get some level of consistency. So, I really can't overstate the importance of instructions file. And again, I'm not just saying that cuz Harold's in the room. Yeah. Yeah. Yeah. Well, when you make those. Yeah, absolutely. Yeah. Yep. So, um so, the the question is is that um hey, inside your issue, you told it something that it probably should have been able to find elsewhere. That it was inside the instruction file um and um and you still typed it out. Like, you know, do you really need to do that? Fantastic question. So, I'm I'm going to answer that directly, but then I'm also going to up-level that um uh as well. So, to answer the question directly, I really didn't need to. Um but this really again kind of falls under that category of like not being passive-aggressive with Copilot. Like, if there's something that I know, typing it out isn't going to hurt anything. So, adding that to that, if anything, it's just going to help it because now I'm just like further reinforcing the fact that, "Hey, this does need to to to actually work." Um now, I am going to up-level real quick because I think this also then brings up another question, which is, "Hey, now we've got the issue here." Um and especially like if I'm working with um with Copilot Chat, where now I could have like a dot instructions file. And we've already seen that I can have those call other files. And then now I've got my Copilot instructions. And so that then kind of begs the next question, which is, "Well, is there a hierarchy here?" And the answer is, "No, that there isn't any form of a last right, that it's going to consider all of that context and then make its best decision from there." Which also then kind of leads to another thing, which we should really be focused in on, like John was highlighting with like our team leads, is let's try to be consistent. So, let's not start sending mixed messages because just like if we start sending mixed messages to our team and they're going to get confused, the exact same thing is going to happen with uh with Copilot. Yeah. Uh I can open up holes in a firewall. So, um if I'm using MCP locally from inside VS Code, good to go. If um I'm getting coding agent to do that, then um when I add in the MCP server, I also need to open up the firewall. All of it's actually really well documented um um uh to to highlight all of that, but yes, the straight answer is yes. Yeah, so um so when you go in and and configure that, you can um do that at the repo level. I believe you can do that at the org level as well. And then what you do is you then set variables um and you can do that again at the repo level or you can do that at the organization level. So, you can centralize all of that. Um so, I'm going to I I I'm going to inject my own question into that first and then I'm going to come back and answer that question. So, the first question is, "Can you review the code?" And I I I want to make sure that I I mention this because it's so incredibly important. Um AI does not change the DevOps flow. That if I think about how I wrote code before AI, um I would write code off my own memory, I would be um writing code based on code that I'm seeing elsewhere, I would write code by copying and pasting from Stack Overflow, making a couple of changes, and then just crossing my fingers and hoping and praying that it works. Or maybe that's just me. Or maybe I'm just the only one willing to admit it. Um So, in in that situation, what do I have? I have a DevOps flow where I'm going to get John to come along and and review it. I'm going to have linters that are going to come in and check to make sure that I'm following all my standards. I'm going to have security scans that are going to look for any potential vulnerabilities. Then I'm and I have all of these different things, all of these these these these safeguards to help ensure that the code that gets into my codebase is secure and is written the exact way that we want it to be written. When I'm using AI, all of that still stands. So, um I want my manual code reviews. I want my security checks. I want my linters. I want my unit tests. I want all of that to go in and run. Now, to get specific to um the the second half of your question there, which is, "Hey, it's just this one file that I want you to look at." Um when I'm working with coding agent um or really Copilot in general, there's always a non-zero chance that it's not going to follow what you want it to do exactly. So, if I say, "Hey, go in and update this file," it it might work specifically on that file and really in particular when I'm working about with with agent mode, it might work with that one file, but it also might do a couple of other things as well and there's not necessarily a way to guarantee that it's only going to do just that. If you want it to only ever do just like that one particular file, this is where like edit mode comes into play. This is where ask mode comes into play inside my IDE because in those situations, I'm steering rather than letting um um uh then then then letting Copilot steer. I So, there's always a chance that um when again, Copilot is probabilistic. So, there's always a chance it's not going to give me the code exactly the way that I want it to. But remember that at the end of the day, what this has done is this has created Just open this up inside of a brand new tab. This has created a brand new branch. And so, I could go in and add in a comment and tell Copilot, "Hey, I want you to fix this." But this is also a branch. So, I could then just go in and say, "Hey, let me create a brand new branch on that space." Or I could go in and um uh and then just clone that and then just check out that branch and then go in and manually make the changes as well. And so like in the situation that you're describing where, "Hey, maybe everything looks good, but it's just this one file that I need to modify." Honestly, in that situation, I think what I would do is I would just go ahead and um I would just do this is um get checkout. Yes. And Copilot's great at generating get commands. It is. Um so, uh yeah, so I could just go in and do that. Now I can just modify manually or like I could just work with Copilot here then on whatever it was that I uh that I was wanting to do. Yeah. Sure. Yes. So, um so that I I'm going to kind of up-level all of this. So, the question is is, "Can it go to a remote server? Um how long does that session last? Um etc." And the the short answer to, "Can it access the remote server?" Yes. "Can it act on your behalf?" Yes. "How long is that going to last?" That depends. Um that um when you go to set up that connection to that remote server, you're going to provide a credential um for that. So, in the case of say like the GitHub um um MCP server, then I can go in and I can provide a token for that. But then I can set an expiration on that token. Yeah. So, it's all that's really going to depend. There isn't anything in Copilot that's um going to um automatically like sign you out or anything like that. Correct. Yeah, so I it's uh the MCP server is not just automatically going to be able to do something on my behalf. I'm going to have to indicate, "Hey, I want to do this." And then on top of that, um and I don't think I've got it set up um on here and it would just take me a couple of minutes to do it. Um but if I go in and I make a request that's going to kick off an MCP server, I actually have a button that says, "Hey, do you want to do this?" Which actually leads me right into my next point, which is um that my I I want to make sure that I'm vetting my MCP servers just like I would anything else that's going to access external information, just like anything else that's going to be able to act on my behalf. Sure. We're getting into a lot of specifics. Let's talk afterwards. All right, yeah. So, for coding agent, and again, I'm I'm just to make sure that we're clear, this is where I'm on github.com. Right now, we're not exposing out the model that's being used internally um and there's a reason for that um because we have a very specific type of workload, a very specific set of scenarios that need to um to be accomplished here. And so the model that we're choosing is the model that's specifically like that that we've determined is best for doing this. There might come a time where that starts to get exposed out and maybe that that allows for change, but as of right now, it's it's specifically because it works with this. Yes, you still have your hand raised. Yeah. Um yeah, I mean Yeah, like I I I can create 100 issues and assign all 100 of them to uh to to to coding agent. Yeah. Yeah, so remember that each time that you assign an issue to a coding agent, it's going to create an environment specifically for that issue. Exactly. Yep. Yeah. Yep. Um so um what you can do, and I actually have an example of that right here. Yeah, so you'll notice that right here, um I'm actually um inside this dot instructions file, I'm actually referencing out to another dot instructions file. Yep. And then on the apply to, you could go in and start setting folders as well. So, however it is that you want that to be set up. Yep. Yeah. Yeah. Sure? Yeah, so if you're working with coding agent, you can configure your list of MCP servers at the organization level or on individual repos for um um for anything that's going to be inside of uh VS Code, and I'm not sure how others would um would necessarily be um have that set up. Um you can actually just set up inside of a repository or inside your repository, your MCP JSON file, um which is what I've got right here. And then I can just list them all here. That now becomes part of the uh the repository. Um the user will then still need to set up their own credentials, because again, it's going to act on on that user's behalf. Correct. Correct. Yep. Yeah. Mr. Harold. Oh, okay. Thank you. What time is your talk? Okay. Yeah. So, you know, I'm actually going to to kind of up-level this. Um one of the things about using MCP servers all up with agent mode is that Copilot does need to figure out which MCP server to call um and when to call it. And generally speaking, it's going to be able to do that on its own, but again and and and let this maybe be the number one lesson that we pick up from from today, that if I ever see Copilot not doing something the way that I expect it to do, what am I going to do? There we go. I'm going to well, or even even more generically, I you know, back I used to be a tech trainer. Um um so I would like literally just like go around different companies to teach classes. And one of the things I would do is I would have little um um little bits of candy um and just like toss them out to like the little baby Reeses um and toss us out, and I wish I had one. Um but uh but yeah, exactly. Like update your instructions file or again, like improve your context. And so like one of the things that you could do is if you know for this specific type of scenario, this is the MCP server I want you to talk to, put it inside your instructions file. And in fact, Azure, um their MCP server, when you register it, VS Code will actually prompt you and go, "Hey, do you want to add that into your um Here you go. There you go. There you go. Um but um but if you install the Azure MCP server, it will actually say, "Hey, you should add this to your instructions file." Okay. That was a lot of questions.
Original Description
GitHub Copilot's agentic capabilities enhance its ability to act as a peer programmer. From the IDE to the repository, Copilot can generate code, run tests, and perform tasks like creating pull requests using Model Context Protocol (MCP). This instructor-led lab will guide you through using agent capabilities on both the client and the server: Key takeaways include:
Understanding how to bring agents into your software development workflow
Identifying scenarios where agents can be most impactful, as well as tips and tricks to provide the right context to lead to success
Discovering how Model Context Protocol provides access to an additional set of external tools and capabilities that the agent can use
Recommended practices to accelerate your development while maintaining code quality.
About Jon Peck
An Enterprise Advocate (and occasional manager) at GitHub, Jon Peck meets daily with maintainers, startups, and F500 executives to familiarize them with industry best practices, policy suggestions, and product capabilities across DevOps and AI. With 25+ years of experience as a fullstack developer, architect, and advocate, he aims to to bring engaging, real-world learnings to both boardrooms and global conferences.
- Speaker (conferences): Dev Exec World 2025, STARWEST 2024, InnerSource Summit 2023, GitHub Galaxy 2023, DevWeek Management 2023, Startup Grind 2022, GitHub InFocus 2022, DeveloperWeek 2018-20, SeattleJS, Global AI Conf 2018-19, AI Next 2019-20, MLOps World, Data Innovation Summit, Nordic APIs 2018-19 (keynote), ODSC East+West, API World, O'Reilly AI, OSCON
- Speaker (tech schools): Galvanize, CodeFellows, Metis, Epicodus, Alchemy
- Organizer: Seattle Building Intelligent Applications Meetup
- Educator: Cascadia College, Seattle C&W, consultant
- Lead Developer: Empower Engine, Giftstarter, Mass General Hospital, Cornell University
- Technical Advocate: Algorithmia, GitHub
About Christopher Harrison
Christopher is a long-time geek who's spent the bulk of hi
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from AI Engineer · AI Engineer · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
AI Engineer Summit 2023 — DAY 1 Livestream
AI Engineer
AI Engineer Summit 2023 — DAY 2 Livestream
AI Engineer
Principles for Prompt Engineering - Karina Nguyen (Claude Instant @ Anthropic)
AI Engineer
Announcing the AI Engineer Network: Benjamin Dunphy
AI Engineer
The 1,000x AI Engineer: Swyx
AI Engineer
Building AI For All: Amjad Masad & Michele Catasta
AI Engineer
The Age of the Agent: Flo Crivello
AI Engineer
See, Hear, Speak, Draw: Logan Kilpatrick & Simón Fishman
AI Engineer
Building Context-Aware Reasoning Applications with LangChain and LangSmith: Harrison Chase
AI Engineer
Pydantic is all you need: Jason Liu
AI Engineer
Building Blocks for LLM Systems & Products: Eugene Yan
AI Engineer
The Intelligent Interface: Sam Whitmore & Jason Yuan of New Computer
AI Engineer
Climbing the Ladder of Abstraction: Amelia Wattenberger
AI Engineer
Supabase Vector: The Postgres Vector database: Paul Copplestone
AI Engineer
[Workshop] AI Engineering 101
AI Engineer
The Hidden Life of Embeddings: Linus Lee
AI Engineer
[Workshop] AI Engineering 201: Inference
AI Engineer
The AI Pivot: With Chris White of Prefect & Bryan Bischof of Hex
AI Engineer
The AI Evolution: Mario Rodriguez, GitHub
AI Engineer
Move Fast Break Nothing: Dedy Kredo
AI Engineer
AI Engineering 201: The Rest of the Owl
AI Engineer
Building Reactive AI Apps: Matt Welsh
AI Engineer
Pragmatic AI with TypeChat: Daniel Rosenwasser
AI Engineer
Domain adaptation and fine-tuning for domain-specific LLMs: Abi Aryan
AI Engineer
Retrieval Augmented Generation in the Wild: Anton Troynikov
AI Engineer
Building Production-Ready RAG Applications: Jerry Liu
AI Engineer
120k players in a week: Lessons from the first viral CLIP app: Joseph Nelson
AI Engineer
The Weekend AI Engineer: Hassan El Mghari
AI Engineer
Harnessing the Power of LLMs Locally: Mithun Hunsur
AI Engineer
Trust, but Verify: Shreya Rajpal
AI Engineer
Open Questions for AI Engineering: Simon Willison
AI Engineer
Storyteller: Building Multi-modal Apps with TS & ModelFusion - Lars Grammel, PhD
AI Engineer
GPT Web App Generator - 10,000 apps created in a month: Matija Sosic
AI Engineer
Using AI to Build an Infinite Game: Jeff Schomay
AI Engineer
How to Become an AI Engineer from a Fullstack Background - Reid Mayo
AI Engineer
The Code AI Maturity Model and What It Means For You: Ado Kukic
AI Engineer
AI Engineer World’s Fair 2024 - Keynotes & Multimodality track
AI Engineer
From Text to Vision to Voice Exploring Multimodality with Open AI: Romain Huet
AI Engineer
The Making of Devin by Cognition AI: Scott Wu
AI Engineer
The Future of Knowledge Assistants: Jerry Liu
AI Engineer
Llamafile: bringing AI to the masses with fast CPU inference: Stephen Hood and Justine Tunney
AI Engineer
Open Challenges for AI Engineering: Simon Willison
AI Engineer
Lessons From A Year Building With LLMs
AI Engineer
From Software Developer to AI Engineer: Antje Barth
AI Engineer
Unlocking Developer Productivity across CPU and GPU with MAX: Chris Lattner
AI Engineer
Copilots Everywhere: Thomas Dohmke and Eugene Yan
AI Engineer
Fixing bugs in Gemma, Llama, & Phi 3: Daniel Han
AI Engineer
Low Level Technicals of LLMs: Daniel Han
AI Engineer
Emergence Launch: AI Agents and the future enterprise: Dr. Satya Nitta
AI Engineer
How Codeium Breaks Through the Ceiling for Retrieval: Kevin Hou
AI Engineer
What's new from Anthropic and what's next: Alex Albert
AI Engineer
Using agents to build an agent company: Joao Moura
AI Engineer
Decoding the Decoder LLM without de code: Ishan Anand
AI Engineer
Running AI Application in Minutes w/ AI Templates: Gabriela de Queiroz, Pamela Fox, Harald Kirschner
AI Engineer
Building with Anthropic Claude: Prompt Workshop with Zack Witten
AI Engineer
Building Reliable Agentic Systems: Eno Reyes
AI Engineer
10x Development: LLMs For the working Programmer - Manuel Odendahl
AI Engineer
Disrupting the $15 Trillion Construction Industry with Autonomous Agents: Dr. Sarah Buchner
AI Engineer
Hypermode Launch: Kevin Van Gundy
AI Engineer
Git push get an AI API: Ryan Fox-Tyler
AI Engineer
More on: Agent Foundations
View skill →
🎓
Tutor Explanation
DeepCamp AI