How to Use VS Code Agent Mode for Beginners

Master VS Code Agent Mode with this 2025 tutorial! Setup, use, and tips to code smarter with AI in Visual Studio Code.

Ashley Goolam

Ashley Goolam

11 April 2025

How to Use VS Code Agent Mode for Beginners

Heard of VS Code Agent Mode?

If you’re using Visual Studio Code (VS Code), this feature is about to become your new best friend. Imagine having an AI sidekick that doesn’t just suggest code but actually does the heavy lifting—editing files, running commands, and fixing errors—all while you sip your coffee and nod in approval.

That’s Agent Mode in a nutshell, and today, I’m walking you through how to use it, step-by-step, with a fun, beginner-friendly vibe. Let’s dive into the world of VS Code Agent Mode and see how it can turbocharge your coding game!

💡
When implementing Testing for API-based applications, developers and testers increasingly turn to specialized tools like Apidog, a comprehensive Postman alternative that streamlines the API development lifecycle. 
button
Apidog Ui image

What is VS Code Agent Mode? A Quick Intro

So, what’s this VS Code Agent Mode thing all about? Picture GitHub Copilot—VS Code’s AI-powered assistant—going from “helpful suggester” to “autonomous coder.” In Agent Mode, Copilot doesn’t just sit there waiting for you to type; it takes charge. You give it a high-level task—like “Build me a to-do app”—and it figures out the files to tweak, writes the code, runs commands, and even fixes mistakes, all on its own. It’s like pair programming with a robot that never sleeps!

copilot agent mode

As of April 10th, 2025, Agent Mode is actively being developed and rolled out, packed with goodies like Model Context Protocol (MCP) support, meaning it can tap into external tools and data. Whether you’re a newbie or a pro, this is a game-changer. Ready to try it? Let’s set it up!

Why You’ll Love Using VS Code Agent Mode

Before we get hands-on, let’s chat about why VS Code Agent Mode rocks:

Think of it as your personal coding assistant who’s always one step ahead. Now, let’s get it running!

How to Use VSCode MCP Server
This tutorial will guide you through everything you need to know about using MCP servers with VSCode, from initial setup to advanced configurations and troubleshooting.

How to Set Up VS Code Agent Mode: Step-by-Step

Getting started with VS Code Agent Mode is a breeze. Here’s how to flip the switch and unleash the magic:

Step 1: Update VS Code

First things first—make sure you’re on a recent version of VS Code that supports Agent Mode. Head to code.visualstudio.com, download the Stable version, or use Insiders for bleeding-edge features.

vs code download

Step 2: Enable Agent Mode

Agent Mode might not be on by default depending on your version and rollout status. Here’s how to potentially turn it on:

Open VS Code.

Hit Ctrl + , (or Cmd + , on Mac) to open Settings.

Search for chat.agent.enabled and make sure its ticked.

enable agent mode

If you don’t see it, reload VS Code after updating—it might pop up if available in your build. Check for updates via Help > Check for Updates.

check for new updates

Pro Tip: This step may become unnecessary as Agent Mode rolls out more broadly. For now, this toggle (if present) gets you in early!

Step 3: Sign In to GitHub

VS Code Agent Mode runs on GitHub Copilot, so you’ll need an active subscription.

In VS Code, click the Copilot icon in the sidebar (or use the relevant shortcut, e.g., Ctrl+Shift+I / Cmd+Shift+I for the Copilot pane).

Sign in with your GitHub credentials. If you don't have a Copilot subscription, you may need to sign up via GitHub.

Step 4: Open the Chat View & Select Agent Mode

Now, let’s get to the fun part:

Open the Copilot Chat view (Ctrl+Shift+I / Cmd+Shift+I).

Look for the mode dropdown at the bottom of the Chat input area—it might say “Ask,” “Edit,” or “Agent.”

ask mode

Select Agent. Boom—you’re in VS Code Agent Mode!

enable agent mode

How to Use VS Code Agent Mode: Let’s Build Something!

Alright, setup’s done—time to see Agent Mode in action! Let’s build a simple React to-do app together. Grab a blank VS Code workspace, and follow along.

Step 1: Give It a Task

In the Chat view (with Agent Mode selected), type a clear, high-level task. For example:

>> Create a simple React to-do application. It should have an input field to add tasks and display the list of tasks.

Hit Enter. You don’t need to specify files—Agent Mode figures that out!

Step 2: Watch the Plan Unfold

Copilot will start chatting back, streaming its thought process. It might say:

"Okay, I can help with that. Here's the plan:
  1. Set up a basic React project structure (if needed).
  2. Create the main App.js component to manage state.
  3. Create a TodoForm.js component for the input field.
  4. Create a TodoList.js component to display the tasks. I'll start by creating the necessary files..."

It’s like watching a friend code live! It’ll also propose terminal commands—like npm init react-app if your project’s fresh.

steps taken by agent mode

Step 3: Approve the Tools

Agent Mode might need to use tools—like running npm install or using built-in file operations. You’ll see prompts like:

"Run
npm install react react-dom
#terminal
#filesystem
src/App.js

Click “Continue” to approve (or tweak the command first). You might be able to auto-approve tools for the session via a dropdown—handy but use it wisely!

approve command

Step 4: Review the Edits

As Agent Mode works, code streams into your editor with overlays showing changes (diff views). For our to-do app, you might see:

App.js updated with state management (useState) for tasks.

A new file src/TodoForm.js with a form and input element.

A new file src/TodoList.js rendering the list items.

Navigate edits with the Up/Down arrows in the overlay or diff viewer, then hit “Accept” (or similar button) to keep changes or “Discard” to reject them. The Chat view usually lists changed files, making it easy to track.

review edits

Step 5: Iterate and Refine

Not perfect? Tell Agent Mode what to fix or add next:

>> Now, add functionality to mark tasks as complete when clicked and change the font color to black for tasks added to the todo list.

final output

Agent Mode will loop back, analyze the request, propose changes, run tests (if configured in tasks.json), and update the code. It’ll keep going until it nails it—or you pause it.

Mastering VS Code Agent Mode: Tips and Tricks

Now that you’ve got the basics, let’s level up your VS Code Agent Mode skills!

use tools
undo
tweak settings

Agent Mode vs. Edit Mode: When to Use What?

Confused about Agent Mode vs. Edit Mode in Copilot Chat? Here’s the scoop:

If you’re unsure exactly which files need changes or how to approach a larger task, let Agent Mode take the lead. Need precise modifications in a specific spot? Edit is often faster.

Conclusion: Your AI Pair Programmer Has Arrived

VS Code Agent Mode represents a significant step towards AI-assisted development. By delegating complex, multi-step coding tasks to GitHub Copilot, you can focus more on high-level design, problem-solving, and reviewing the generated code. You've seen how to set it up, guide it through building a simple application, and refine the results. While it requires clear instructions and careful review, Agent Mode has the potential to drastically speed up development workflows and tackle coding challenges more efficiently.

Ready to give your new AI pair programmer a try? Fire up VS Code, ensure Copilot is set up, switch to Agent Mode, and give it a real task from your current project. What will you build or refactor first?

button

Explore more

How to Use Amazon EKS MCP Server

How to Use Amazon EKS MCP Server

Discover how to install and use Amazon EKS MCP Server with Cline in VS Code. Create EKS clusters, deploy NGINX, and troubleshoot pods with AI-driven ease!

19 June 2025

What Cursor’s Pro Plan "Unlimited-with-Rate-Limits" Means

What Cursor’s Pro Plan "Unlimited-with-Rate-Limits" Means

Cursor’s Pro plan is now unlimited with rate limits. Learn what that means, how rate limits work, what burst and local limits mean and why users are confused.

19 June 2025

Cursor Pro Plan Goes Unlimited (with Rate Limits)

Cursor Pro Plan Goes Unlimited (with Rate Limits)

Cursor’s new Pro plan promises an unlimited-with-rate-limits model, but what does that really mean? Dive into the details, user concerns, and find out whether it is a smart upgrade or sneaky shift.

19 June 2025

Practice API Design-first in Apidog

Discover an easier way to build and use APIs