Background Coding Agents change EVERYTHING - 5 ways to use them today!

James Montemagno www.youtube.com

간략한 요약

이 비디오에서는 James Montemagno가 코딩 에이전트를 활용하여 비동기 작업을 수행하는 5가지 방법과 팁, 설정 가이드를 소개합니다. 주요 내용은 다음과 같습니다.

  • GitHub Copilot을 활용하여 이슈 할당, 작업 위임, 코드 리뷰 등을 수행합니다.
  • Dependabot을 통해 의존성 관리 및 보안 업데이트를 자동화합니다.
  • 코딩 에이전트 환경 설정 및 모범 사례를 통해 효율성을 높입니다.

소개

James Montemagno는 코딩 에이전트 또는 백그라운드 작업이 비동기적으로 수행하는 다양한 작업 방식에 대해 설명합니다. 그는 이러한 에이전트가 최상의 작업을 수행할 수 있도록 팁과 트릭, 설정 가이드를 제공합니다.

코딩 에이전트란 무엇인가?

코딩 에이전트는 백그라운드 작업 또는 백그라운드 에이전트라고도 하며, 비동기적으로 발생하는 작업을 의미합니다. 이러한 작업은 로컬 머신에서 비동기적으로 발생할 수도 있지만, 대부분 클라우드에서 발생합니다. 코딩 에이전트는 사용자를 대신하여 작업을 수행하고 코드를 작성하는 에이전트이며, 여러 에이전트가 동시에 작업을 수행할 수 있습니다. GitHub Copilot 코딩 에이전트를 사용하면 VS Code, Visual Studio, github.com 등 다양한 위치에서 작업을 할당하여 처리할 수 있습니다.

Copilot에 이슈 할당

GitHub Copilot 코딩 에이전트에 이슈를 할당하는 방법은 누구나 쉽게 코딩 에이전트를 시작할 수 있는 방법입니다. GitHub Copilot 설정에서 모든 리포지토리를 설정하면 GitHub 또는 VS Code에서 이슈를 Copilot에 할당할 수 있습니다. Copilot은 이슈를 확인하고 풀 리퀘스트를 자동으로 생성합니다. VS Code의 채팅 세션을 통해 Copilot과 실시간으로 소통하며 작업 진행 상황을 확인하고 변경 사항을 요청할 수 있습니다.

모든 브랜치에서 작업 할당

코딩 에이전트에 다양한 위치에서 작업을 할당할 수 있습니다. 예를 들어, 콘텐츠 피드 페이지에서 Hacker News를 클릭했을 때 자동으로 로드되도록 작업을 할당할 수 있습니다. VS Code의 채팅 세션에서 GitHub Copilot 코딩 에이전트에 작업을 위임하면 해당 작업에 대한 코딩 에이전트 세션이 즉시 시작됩니다. 코딩 에이전트는 풀 리퀘스트를 생성하고, VS Code에서 해당 세션의 진행 상황을 확인할 수 있습니다.

중단된 작업 이어서 하기

코딩 에이전트를 사용하여 특정 브랜치에서 진행 중인 작업을 계속할 수 있습니다. VS Code의 채팅 환경에서 작업을 위임할 때 변경 사항을 포함하거나 무시할 수 있습니다. 변경 사항을 포함하면 코딩 에이전트는 새 브랜치를 생성하고 변경 사항을 해당 브랜치로 가져와 작업을 수행합니다. 이를 통해 사용자는 작업을 완료하지 못한 경우에도 코딩 에이전트를 통해 작업을 계속할 수 있습니다.

코딩 에이전트와 협업

코딩 에이전트와 상호 작용하는 방법으로는 풀 리퀘스트에 코멘트를 추가하여 Copilot에게 특정 오류를 수정하거나 경고를 해결하도록 요청할 수 있습니다. Copilot은 새로운 세션을 시작하여 문제를 해결하고, 사용자에게 피드백을 제공합니다. 사용자는 Copilot의 작업에 대해 추가적인 변경 사항을 요청할 수도 있습니다. 또한, 브랜치를 풀다운하여 코드를 커밋하고 Copilot과 함께 작업을 진행할 수도 있습니다.

에이전트의 코드 리뷰

코딩 에이전트를 활용하여 코드 리뷰를 수행할 수 있습니다. GitHub에서 리뷰어를 Copilot으로 지정하면 Copilot은 풀 리퀘스트에 대한 코드 리뷰 세션을 시작하고, 변경 사항에 대한 권장 사항을 제공합니다. Copilot은 코드에서 잠재적인 문제를 식별하고, 개선 사항을 제안합니다.

안전하고 최신 패키지를 위한 Dependabot

Dependabot은 의존성을 안전하고 최신 상태로 유지하는 데 도움을 주는 코딩 에이전트입니다. 리포지토리 설정에서 Dependabot 보안 업데이트를 활성화하고, Dependabot이 자동으로 풀 리퀘스트를 생성하여 의존성을 최신 상태로 유지하도록 설정할 수 있습니다. Dependabot은 의존성 그래프를 분석하고, 새로운 버전이 출시되면 자동으로 업데이트를 수행합니다.

코딩 에이전트를 위한 모범 사례

코딩 에이전트를 효과적으로 관리하고 활용하기 위한 몇 가지 팁과 트릭이 있습니다. GitHub Copilot 웹사이트에서 에이전트 기능을 사용하여 작업을 위임하고 진행 상황을 모니터링할 수 있습니다. 또한, GitHub 폴더에 워크플로우를 설정하여 코딩 에이전트가 작업을 수행하는 데 필요한 환경을 구성할 수 있습니다. Copilot instructions 파일을 사용하여 코딩 에이전트가 따라야 할 모범 사례, 아키텍처, 스택, 통합 방식 등을 정의할 수 있습니다.

마무리

James Montemagno는 GitHub Copilot 코딩 에이전트를 사용하여 작업을 자동화하고 생산성을 향상시키는 방법을 공유했습니다. 그는 코딩 에이전트의 다양한 활용 사례와 설정 방법, 모범 사례를 소개하며, 코딩 에이전트가 개발 워크플로우를 개선하는 데 도움이 될 수 있다고 강조합니다.

유튜브 영상을 몇 초 만에 요약하세요

무료 Summ 앱으로 어떤 영상이든 이런 요약을 원하는 언어로 받아보세요.

App Store에서 다운로드
Google Play에서 다운로드

스크립트

“Background Coding Agents change EVERYTHING - 5 ways to use them today!”의 전체 스크립트입니다. 타임스탬프를 클릭하면 해당 장면부터 영상이 열려요. 다른 영상이 필요하다면 유튜브 스크립트 추출기를 이용하세요.

0:00 Today, I want to break down five different ways that I'm using coding agents or background tasks or background agents or whatever you want to call them, things that are doing asynchronous work for you. I want to break down my tips and tricks and setup guides that enable these asynchronous agents to do their best work. So, let's get into it. [Music] Okay, so let's first define what I mean when I say coding agent. Sometimes coding agents are often talked about or referred to as background task or background agents. These are essentially things that are happening asynchronously. They could be asynchronous on your machine, but most often they're happening in the cloud.

0:46 Now, many of you are probably used to using like chat and agent mode inside of code editors like VS Code or Visual Studio or other idees out there. Now, when I'm inside of chat or agent mode and I'm typing in what I want the feature to be or the bug fix or debugging things or getting information in chat, things are streaming back and edits are being applied synchronously inside of my code editor. That is not this. When we talk about coding agents, they are agents that are working and writing and doing work for you. somewhere else and there's many of them happening at the same time. So for example, I use the GitHub copilot coding agent and that allows me to assign work from many places including VS Code or Visual Studio or other IDEs and even github.com to the coding agent to go do

1:32 stuff for me. There's a bunch of them out there. So I love working with coding agents because it allows me have any idea at any time assign it to it and let it rip. You can do it on multiple branches. You can do it um multiple features at the same time. And that's great because when I'm working and I'm going deep on my code on my local machine, I want to be working with the agent mode locally. But I want to have other things happening all at the same time or perhaps before I go to bed, give it a task to do and wake up and I have something there. And that really to me is the difference between a coding agent and things like chat and agent mode. So let's get into my very first way that I use these coding agents. Okay, let's go ahead and ease into this and talk about a way that anybody can start using coding agents today, which is just assigning issues to a specific coding agent. Now, I'm going to be using the GitHub copilot coding agent uh here on

2:19 my feedback flow application. And if we go into issues, we can see that I have a bunch of different issues here and some of actually already assigned to copilot and pull requests have been open. So, if I take a look at a recent issue that I just created, uh we can see that I have some information on it using these skeleton loadings. And if I go into assignees, I can assign it to myself or to co-pilot. Now, it's there because I enabled that inside of my GitHub copilot settings and under coding agent, we can see that I have all repository set. So, what that means, I can come in here, assign it to copilot, or I could also do it directly from VS Code. So, over here, I can take a look at the GitHub extension. And if I go ahead and let's say refresh this here,

3:04 we should have that new issue that we just created. And I can just simply assign it to Copilot. So when I do that, it's basically doing the same thing that I would do if I did it through github.com, but it's all integrated directly into the IDE, which is really, really nice. So now we can see the assigne is copilot. If I hit that gear, I see the same assignees there as well, which is great. So, if I scroll down, we can see that there's this little copilot eyes over here that copilot has reacted, that it saw this issue, and it's actually created a pull request for me that I can tap on and I can load it directly here inside of VS Code. So, this is going to say that it wants to merge changes into main from this Copilot feature fix branch that it created automatically for me and and it's assigned this uh to me uh right

3:49 here uh and to copilot itself. So what it's going to be doing now is it says, "Hey, thanks for assigning me the issue." It's going to start to work. And it outlines the original issue. If I scroll down, we can actually view the session over here. And this is an asynchronous coding agent session that has automatically got it started over here for me. So we can see that it's starting MCP servers, it's checking out the code, it's installing dependencies, and it's starting different things for me automatically, which is really nice. is going to like start to go and start implementing these skeleton loading screens, which is really cool. Now, I can view it all from here. But the place that I actually use almost the most, to be honest with you, is this new chat sessions over here. If you don't have that, you can go into your settings and

4:35 just type in chat sessions. And then you'll see this agent sessions view location and just change it from disabled to view. And that will give you this little icon over here that'll show you all of your local chat sessions which are here from the uh agent mode. But then it'll also show you all the coding agent sessions that are active. Now this is really neat because you can actually chat with the GitHub coding uh agent in real time. So you can watch its work, you can stop it, you can reply to it, you can see if it's going down the wrong path basically or once it's completed you could go ahead and have it make changes for you as well. So, I actually had another issue and I actually assigned it to it. So, let's go ahead and take a look at that session. And we can see that it added 350 lines of code and removed 26. So, I'm going to

5:22 go and scroll up to the top here. And this is basically the same exact issue. And we can see it checked out the code. It was reading different files and it did a bunch of things for me. And then it said it implemented the heavy sessions. It started checking things off. Started editing files. It was using playright to navigate around. uh and then you know at some point it started to actually do visualization change things automatically and now what we can see is that I can tap on any of these and actually get that code diff right inside of VS code which is really really cool. So we have that tier comparison skeleton that it created for us right there we have another one uh which is the admin analytics uh one that was created for us as well. So we get to see all of those there. Now, this view is very similar to the view that you would

6:07 see if you went over to that pull request here. Here's that one that was finished. And if you scroll down, it's going to be the same thing that we saw inside of VS Code. And you could also say view session. That would allow you to go through and see that session. It was nearly 18 minutes. And we're going to see all those things that were being shown inside of VS Code. And you could tap on these. is you can get more information of exactly what it was doing along the way to actually finish that work for us. But I love being able to see what's happening directly inside of VS Code, see all of my working coding sessions. We can see it's starting to work right here and it has this checklist automatically for me. So that is the first way that you can easily start using coding agents. Okay, let's get into the second way that I love using coding agents, which is just

6:52 assigning it work randomly from a bunch of various places. So here is my content feeds. So, this allows me to like grab things from YouTube or Reddit or Hacker News and then analyze them basically using feedback flow. Now, this is cool, but actually if you notice when I click on Hacker News, it should just like load automatically. So, I can come back to my repo and I can click over here on the agents panel and this will show me my repo and then any other branch I want it to work off of. And then I could just give it a task to do. So, I could say on the content feed page when the user clicks hacker news, load it automatically. Just do it. And then I could hit go. Since I'm often working inside of VS Code, it'd be great to actually delegate directly to the coding agent from there. And you can totally do that. So if you're inside of chat, and we'll talk about this a little bit more and another feature I like to use, you

7:39 can just type in anything you want and then click on this delegate to coding agent button there. That's nice when we actually have a bunch of contacts. But the place that I actually like to do this from the most and would recommend is go over to that chat sessions and over here under the GitHub copilot coding agent just hit plus. This will start a new chat session that will be forwarded to the coding agent. Press it in here which we want to send and just go. What's great here is that this will immediately start and run that coding agent session uh for exactly what I want. And we can see that the title's been updated here. And we can see that it's been added over here for me as well. Now, this is going to spin up that coding agent. It's going to start that pull request in motion for me. And then I'll start to get

8:25 notifications here. So, while we see this working, we got just got to give it a few seconds to spin up that background agent. And there it is. The pull request has been created for me. It has all this information there. Now, I'll also point out that I'm on main, so it's going to be using main uh for it to work off of, and it'll create a branch off of that. But if I was on another branch, it would create a branch off of that branch. I'll talk about that a little bit more. You can always just click see more here, which will then take you to that pull request, we can see that it wants to merge in these changes. I could check it out. I could refresh this. I could view the session. That'll give me everything directly inside of VS Code, which is absolutely delightful. Okay, let's talk about the third way I use the coding agent, which is sort of to continue the work that I'm working on inside of a branch and even inside of a chat

9:11 experience. So here I'm on this feature branch which I've been working on sort of uh I would say reorganizing my MCP servers and that has a bunch of work in it but I wanted to add some new tools. So I went to the top up here in ask mode originally. Just kind of got information about my MCP servers, how they're constructed, how to go adding this new method onto it, what I would need to update. So again it's looking through a bunch of stuff and give me a plan. It's u suggesting some code changes for me and then I go ahead and I implement it here which is great. So, if I tap on this here, we can see that yeah, it refactored a bunch of code, which is kind of awesome and that's really nice. But I still need to update documentation, the website documentation, the read me, a bunch of other things. Uh, so here I can just simply say, yeah, let's go ahead and update the documentation, also the docs

9:58 on the website, and then I'm going to go ahead and hit this little delegate to coding agent. This is going to, of course, analyze that chat history that we saw previously before. And it pops up this window. You might have saw it before, too. And what it's asking me is says, "Hey, your chat contact will be used to continue the work. Do you want to include the changes or ignore the changes?" So there's two ways that I could have done this. I could have committed the code and then, you know, have it work off of this branch. And that's how that works. If I'm in VS Code and I just say go work on something, if I'm on a branch, it'll work off of that branch. But in this case, I want to actually include the changes inside of this. Okay. So what's fascinating here is that it just went off and it created a new branch but

10:43 brought the changes over with it and then delegated that task off to it. So that is actually kind of amazing in some way that those sort of pending changes were pushed for a remote branch that it can then go work off of in general. And now this chat is spinning up for me here. And we can see that it has implementation of documentation. And then I can see all the the different information in this pull request that is coming in and the session sort of in real time. And now it's working. Right. So this is cool because I'm on a branch of a branch and it brought over my changes into that branch that I was just working on. So I can continue that stream. If I didn't finish my work for the day, I can say, "Yeah, go ahead and go finish this off for me." Okay. And

11:30 now that we've talked about sort of creating issues assigned to co-pilot, creating new sessions, assigning to-dos, you know, working off exist existing sessions and actually using different branches. What about actually interacting with these coding agents? So, here is a pretty big PR that I did to unify this you kind of commenting threading system. It was a big refactoring as you can see here. And the first thing that we'll notice is it gives a great overview. Uh, and then I have this immediately set up to launch into staging. So we can see the staging being set up here. So I can go and test it. And the first thing that you'll notice here is that I'm just testing the PR or I'm reviewing the PR. And what I do is just add a comment. So I say at copilot this is the error I'm getting. And then I also say can you also fix up any warnings the API service run null

12:16 references that were coming up as well. So it gets to work has a new session and then it comments back that hey it fixed these errors for me just like if I was working with a colleague down here. It stages. It comes again. Whoa. And I'm like, "Wow, it's working. However, these things aren't working." Right? So, here's some things that you need to happen. It goes back, fixes everything for us, and then in this case, I go, "Wow, this is amazing, but I actually just want some changes to the UI that I didn't think about originally." So, I just work with Copilot to do that. And at the end of the day, it gives us a nice breakdown, and I'm actually able to deploy it off. So, that's the type of sort of work with uh Copilot that I do. Now, I will also say at this, you can also just pull down this branch and start committing code to it and then work back and forth. And I also really like to put these little prmer merged uh

13:02 things as well when these GitHub actions go off. It makes me feel pretty good about it uh too. So, so I really like seeing these things all happen and that communication back and forth uh with Copilot. Okay, another way that I work with coding agents actually code reviews. So inside of VS Code or Visual Studio or other IDEs, you can actually have code reviews take place right inside of there. I actually prefer just kind of go to GitHub and do asynchronous code reviews. And all I have to do now just go into my reviewers and assign it to Copilot. Now when I do that, basically what's going to happen is Copilot's going to spin up a full review session for me. Uh that will enable me to kind of just iterate with it back and forth inside of it. So, it's going to go off. It's going to do a a code review of this

13:48 and then give me recommendations based off the changes in this pull request. And again, you can do this actually before you commit code inside of VS Code or in this case after the pull request has been created. And this is just a great way to get direct feedback and recommendations uh for what your code has been committed in that pull request. So, let's go ahead and see what it gives us. Okay, so that was actually really fast. So, we got the pull request overview. It gives us a nice uh information of what this pull request is about uh which is cool. And then it also reviewed 16 out of 30 change files, generated two comments. So we can actually see everything that gave us you know show a summary per file of everything that it looked at. Then we can see here that actually you know here it's recommending like using console right life for

14:33 logging in production library is not recommended. Consider using eyeloger dependency for proper logging. If I scroll down same thing here. So, it hasn't found like too many problems in this, but yeah, I actually probably wouldn't have caught that at all and probably probably do want to use like a a console logger here or a vi logger for example, which is really really nice. Now, at this point, I could just like assign it off to copilot and do its thing. But even with that just little thing, and again, this is kind of a small pull request, it's able to identify some immediate actions in place that I could go ahead and actually solve up. Okay, I want to talk about one more coding agent that's actually been with us for a long time, which is sort of making sure our dependencies are secure and up to date, and that's dependabot. It's been with us sort of forever and you know, you should enable it on your repos. If you go into your repo and go

15:19 into settings, scroll down to advanced security and down here there's a bunch of things that you can enable like dependency graph on it. You can enable dependency alerts for dependabot security updates, group security updates and also you can allow dependabots uh here to create pull requests automatically to keep those dependencies up to date when new versions are available and you can define custom rules for example here for dependabot rules and also how often you want things to run. So here you can also open up your uh dependabyl and here I'm specifying the net sdk the directory and the schedule and when you do that you go into your network and you can see dependency graph and you can see all of the dependencies in the graph and the ecosystem here you can look at the dependents that are coming and I have

16:05 none in this one case and then actually dependabot here and it's actually looking at the net sdk that have specified and looking at recent job updates and it's understanding what's going on here and updating different version numbers. numbers as well which is cool. What this looks like in reality seeing that I just enabled this is if I go over to like the net aspire repo and just look for dependabot we can see that here last week it added a bump to npm and yarm group across three directories and updates. If I tap on that here we can see that yeah it changed a bunch of files that were inside of here in the package loss uh lock files normal packages and this is just amazing that it's doing for you automatically. Same thing uh true over here. If you go back to closed, you can see that these are all of the different uh pull requests

16:51 that dependabot has been opening on this repo as part of that. So when I think about this advanced security and I think about how dependent can just work asynchronously, that's another great agent that's just sitting there waiting for you to use. All right, a little bit of bonus here. Let's talk about how I manage all of these agents, how I get insight into them, and also talk about tips and tricks for it setting up the environment that you want and following best practices in your repo. One, I use a lot of GitHub copilot. So I can go to github.com/copilot. There's an agents here and this will actually allow me to delegate tasks to any of my repos at any time. So I don't even need to go to each individual repo. I can just simply, you know, select it from a drop-own list here and select the branch I wanted to work off of. Uh, and then I can see all my open and close things and things that are working, you know, currently basically, which is really nice. Now once these agents are

17:39 running or hopefully before they're running, you can help them create the best environment for them. um by giving them a little bit of context. If I go into my GitHub folder, we have things in here like chat modes and prompts and then I have that dependy, but I also have workflows. You think of workflows as CI CD building and publishing your applications, but also you can help co-pilot sort of get the environment set up that you need when it's working with the coding agent. So there's a copilot setup steps.yaml. These are custom steps that you can use for it to set up the environment basically. And you saw this it was the first thing it was doing was checking on the code. It was installing net and installing dependencies. So here for example I just give it a workflow

18:24 dispatch. I'm running out of iuntu latest. I'm reading contents here. Giving the permission check out the code getting the actions install net 9 installing dependencies and installing the Aspire CLI because that's what I use here. If you're doing down Maui work, I have one set up as well over in my Blazer scorekeeper application. I actually have a workflow specifically for copilot setup steps or I actually set up and I install the specific Maui workload here which is cool. So you can take a look at that repo too. So you can define what things you're using for your environment which is really great. Now, for it to follow best practices, it's sort of the exact same as working with the uh agent mode inside of VS Code or Visual Studio, which is copilot

19:09 instructions. Copilot instructions are the grounding, the rooting if you will, for best practices, how your application is structured inside of here. So making sure that you have great commands of how it runs it, the architecture, the stack, uh the integrations, the CSS best practices, how you want your application to be built and the practices that you want it to follow. And then of course there's not just copilot instructions. It also works with agents.mmd. If you're using multiple coding agents out there, you can also use an agents.mmd file to specify some of that information and use that together inside of it. So you can do agents.mmd or if you're just sort of using the uh GitHub copilot coding agent and agent mode, you can use copilot

19:55 instructions and this will find the generic one or the ones specific uh per like programming language, however you want to specify it as well. But these are super duper important for enabling the coding agent and agent mode inside of VS Code and VS and other idees to actually follow the best practices just like your teammate would or you would as well. Well, there you have it. Those are just some ways that I'm using the GitHub Copilot coding agent every single day to do work for me. Honestly, since this thing was released, I have used it nonstop. And as the integrations into VS and VS Code have gotten better and better, I've been really using that as a hub to do a whole bunch of work all at once locally on my machine and asynchronously with these coding agents. Well, how are you using coding agents? So, which ones are you using? Have you found different tips and tricks? Let me

20:41 know in the comments below. I would love to know what you're using. if it's similar to how I'm using it or I would love some info on how you're using these coding agents as well. If you're new here, I'm James. I put up videos all the time on .NET development, agentic development, and a whole lot more. So, if you like this video, give it a thumbs up, subscribe, and uh ring that notification bell so you get notified every time I put out a video here. That's going to do it for this one. So, until next time, thanks for watching. [Music]

Share

다른 영상 요약