From the course: AI-Powered Development: GitHub Copilot in Visual Studio
Agent mode in Copilot: Quick review - Visual Studio Tutorial
From the course: AI-Powered Development: GitHub Copilot in Visual Studio
Agent mode in Copilot: Quick review
- [Instructor] This chapter is all about the Copilot Agent. The plan is simple. Start with the big picture, what the agent is and the kinds of tasks it can accomplish. In the middle of the chapter, we'll see how to use it. Towards the end, there's a deeper dive into the technology, how the agent connects with the cloud, how it integrates with GitHub, and how it can be customized with YAML files. But before getting into all of that, here's a quick refresher to set the stage, the difference between chat mode and Agent mode. Chat mode is the side of Copilot we've been using throughout the course. It's conversational. It answers questions. It explains code and suggests changes right where we're working. We've already spent plenty of time on that, so let's turn our attention to the new focus. Agent mode takes things to the next level. Instead of just giving answers, Agent mode can actually carry out an entire workflow end to end. It can take on complex jobs, like refactoring across multiple files, without losing track of the bigger picture. Need a new feature? Agent mode can scaffold it and wire everything up so that it is ready to run. It can even spin up brand-new services from scratch. Agent mode doesn't just respond, it gets real work done. Or, to say it another way, chat explains, agent acts. Agents are autonomous. Instead of spelling out every step, we describe the goals, and the agent figures out the best way to reach them. More guidance leads to more accurate results, but ultimately, the agent decides how to get the work done. To make that happen, it can run terminal commands. For example, it can use dotnet build to compile a solution or dotnet test to run unit tests. Copilot Agent has the freedom to choose its workflow, but we still have approval options for actions that affect our system. That balance is why I like to think of Copilot as semi-autonomous. It works independently when it can, but keeps us in the loop when it matters. And it's not limited to the local machine. The agent can also connect with MCP servers, which act as bridges to external systems. That means tools and workflows can be orchestrated across multiple environments and APIs. With opt-in control at every step, the experience feels like working alongside a co-developer who knows the .NET stack inside and out. Generating code is just the beginning. The real strength of Copilot Agent lies in its ability to follow through, building the project, running tests, and helping resolve issues as they come up. This tweet captures the reactions many developers have when they first try Agent mode. The experience is genuinely impressive when you see it in action for yourself. You've probably seen the headlines. AI agents building apps, writing code, and even replacing entire teams. Some of it is hype, sure, but there's a reason those headlines exist. Agents do genuinely impressive work. We're not at a point where AI can replace entire teams, and many of the bolder claims are still speculative. But Copilot Agent is undeniably useful. It can scaffold real projects, automate repetitive tasks, and accelerate workflows in ways that feel like magic, especially when paired with human oversight and judgment. Remember, Copilot Chat explains, Copilot Agent executes. Copilot Agent has the kind of capability that makes jaws drop because it shifts Copilot from being a helper at the keyboard to something closer to a co-developer. Instead of asking for one-off snippets, we can hand the agent a broad task and watch it deliver large, coordinated changes. Copilot Agent not only retains the entire chat context throughout your session, it also tracks every action it takes and every change it makes to your files. As you move between tasks or switch files, it remembers which refactorings it applied, what imports it inserted, and how it altered your code. That dual memory of conversation context plus concrete edits ensures Copilot Agent never repeats itself or loses sight of past work, making complex multi-file workflows like, say, chained bug fixes or feature implementation, smooth and reliable. Agent mode shines when you hand it big, multi-step jobs, the kind that make great demos, but it's equally adept at automating smaller tasks. Whether it's updating a handful of files or building an entire module, you get the same stateful context-aware assistance. At the same time, there's a note of caution. Agent mode is powerful, but it requires oversight. It can generate a lot of code very quickly, which makes reviewing and testing even more critical. There's a reason why teams conduct code reviews for new features, and agent-generated code deserves even more thorough scrutiny. Speed is impressive, but quality still depends on human judgment. So, as we've seen, Copilot Chat explains, Copilot Agent acts. What we've done with chat mode so far in this course is impressive, but Agent mode takes things to an entirely new level. The Agent mode will really blow your mind.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
Agent mode in Copilot: Quick review5m 59s
-
(Locked)
Create a new project: Where and how2m 8s
-
(Locked)
Start simple, create a new project5m 45s
-
(Locked)
Pedal & Pine Tours sample application3m 14s
-
(Locked)
Add a new feature to a existing project2m 19s
-
(Locked)
Keep or reject the changes1m 52s
-
(Locked)
Appending more instructions2m 50s
-
(Locked)
Refactor code with Copilot agent5m 6s
-
(Locked)
Build a new UI with the help of Copilot4m 14s
-
(Locked)
Examine the refactored site8m 10s
-
(Locked)
Deeper look: Where does Copilot run?2m 54s
-
-
-
-
-