Showing posts with label VS Code. Show all posts
Showing posts with label VS Code. Show all posts

18/03/2026

Agent Types in VS Codes

Recently I was working on VS code lot. In fact I was working with Github Copilot lot on VS Code. However have to admit I'm not aware of full capabilities of agentic framework available on VS Code through Github Copilot. I'm just learning as I go.

One of the options you see on Github Copilot window is Agent Type.


There are few options available in this:

  • Local
  • Background
  • Cloud
  • Claude (thirdparty)

I wanted to find out what are the different capabilities of each of the Agent types. Here is my find.

Local

Of course this is the default agent which I'm using most of the time. In fact all the time so far. 

Local agent runs within your VS code environment in your local machine. There fore it has access to all the resouces in VS Code, such as your workspace, files, context (stack trace, unit test results, liniting errors, etc.). 

It can use all models available in VS code. Also have access to all agent tools (browsing, MCP and extension provided tools).

Mostly, it is interactive, you can chat with it and give real time feedback and you can steer them the direction you want easily if you see them going off track.

That's why local agents are the ones I use most.

Background

Background agent, also known as Copilot CLI sessions, run in background. Main feature of this is they run even you close down VSCode. These are well suited for long running tasks, such as you have defined and planned all the steps need to take and where you can sure agent can run independantly long time without your input.

When these sessions require attention, they will notify in chat window same way the local agent would do.

There are two isolation levels for these:

  • Worktree -> create seperate GIT work tree and work independantly to your main code.
  • Workspace -> workspace is where background agent also works in same environment as what you see in VSCode
There are some limitations with background agents. They cannot access all tools in VSCode, plus they don't have access to extension provided tools. Also they are limited to CLI provided models.

Background agent can be start using agent type drop down:


Then you can selection isolation in isolation drop down:


You can also specify a working folder, so agent can independantly work without interfearance:



Cloud Agent

Cloud agents as name suggest runs on cloud (or remote infrastructure). The main cloud agent is Github Copilot cloud agent, which runs on Githug infrastructure (i.e. your remote github repository).

Github Copilot cloud agent as integrated access to Git hub repositories, there for it can do most of the actions (if not all) that any github user can do. Those include large scale refactoring, complete feature development, automatic pull request creation and code reviews.

You can also have thirdparty cloud agents, such as Claude Code and Open AI's Codex.

You can select cloud agent from agent type drop down:



Then you can select repository and give instruction to the agent.

24/02/2026

BMAD Method - Part 2

Since I last talk about BMAD Method (here), about 2 months ago. It has evolved fast. Infact, today (23/02/2206) they have released their newest stable release for version 6. If you can remember, I used version 4.4x in my last article. That's how fast AI industry is moving.

Since then I have used BMAD method successfully in one of production application, and I'm very happy about it.

Since I bought Claude pro subscription recently, I'm going discuss how we can use BMAD method through Claude code (which is the recomended way of using it by its developers).

You can use ClaudeCode, in any terminal (standalone terminal, terminal in a IDE or any other terminal supported way). But since I'm familiar with VSCode, I'm going to use terminal in VSCode to use ClaudeCode.

First thing I would suggest doing in install ClaudeCode extension into VSCode.


Once extension is installed, you can go through onboarding wizard to get it configured. There are several ways you can use ClaudeAI models through ClaudeCode. 

Since I have pro subscription, I will use that. Note that using throug API is very costly. When you click on above button, it will link to your subscription.

Now ClaudeCode extention is configured. Let's get started... well not so fast. ClaudeCode actual program is still not installed in your computer (just the VS Extension is installed). You need to install it using PowerShell.

Here is the command for that (runs on powershell)

irm https://claude.ai/install.ps1 | iex

Or you can download the installation from Antropic.

It take little bit time based on your internet speed to install ClaudeCode through powershell, so be patient. Once installed you need to add installation path to the "Path" environment variable for easy access.


Once ClaudeCode is configured, you can launch it through VSCode. There will be a Claude icon on top right hand corner in VSCode window.

Now that we have both installed and cofigure, open a terminal and let's go to the folder where we want to create the app (or where existing app is).

Then install bmad method with npx:

npx bmad-method install

Since you specify the version, it will ask to install the latest stable version:


Installation wizard starts and following screen appear. At the end of that screen it will ask directory to work.


You can accpet the current directory or give folder path to create a new. If it doesn't exists bmad will ask your permission to create it.

I have chosen bmad6test folder.

Then on next screen you need to select modules. BMAD is a platform where you have core framework and you can add modules according to your requirement. For example, if you developing a Game, you can install "BMad Game Dev Studio" module.


I have chosen BMad Agile-AI Driven Development module.

You can choose to install custom modules, but that for advanced users.

Then the most important decision, you will require to choose which AI tool you will be using BMAD method with.


As you can see Claude Code and Cursor is the preferred ones. But there are long list you can choose from including previously shown Github Copilot.

Next it will ask what should it call you (a name for your self).

Next it will ask, preferred language and output language, where output document should be saved and ect.

Module installation can be done express way or customized approach, but I choose express way and use all defaults (which suites me, but if you prefer you can test with custom approach).

That's it.

After BMAD installation, lets switch to the working directory and start VSCode.

Once you inside VSCode open ClaudeCode.


In the ClaudeCode prompt, you can start typing bmad commands and it will show what is available.


Good place to start is bmad-help method.





30/11/2024

Using Codestral in VS Code - Part 1

This is a part of the series of article where I explain how I learning AI code assistance in VS Code.

You can read the first article here. It explains how you connect Codestral to VS Code.

Ok, now we have connected Codestral to VS Code, lets see how we can use it to assist my coding. In this part I'm going to ask Codestral to write a whole program for me and probably small edit. To simplicity I'm going to use .Net Core console application and ask Codestral to create a snake game in C#.

Get project created

First let's get project created for our game in VS Code. Open a folder and create a new folder called "SnakeGageCodestral" (or any preferred name).

Then open the terminal in VS Code and create console project by running following command:

dotnet new console

That will create the basic structure with Program.cs file in it.


Open the Program.cs and clear any code in it.


Get AI Assistance

Open "Continue" extension. Select your AI modal (in this case we are using Codestral) and ask the question from AI.

You can use a prompt like this: Can you create a snake game in .Net Core console project in C sharp?



Codestral will be more helpful than you think and will also include steps to create project also, but we are intrested in code section. Choose that section (step 4 in below example) and apply it.


This will get updated in Program.cs file.
Check for any obvious compile time errors and if there are you can get assistance from AI by just putting the error message in chat box.

Mine was ok and next step is to run it. Use following command on VS Code terminal.

dotnet run

Mine worked ok.



Editing using AI

Though it worked first time. Snake was running too fast. I wanted to slow it down. So I asked AI assistance to make a edit. It has suggested the line that I should edit as per screen shot below.


That's it. We will have look at more features later.

01/10/2024

Connecting Codestral with VS Code

These days AI hype is so high that I though I also should test some tools I can use to increase my productivity. That's when I came across Codestral by Mistral AI. 

Codestral is a coding assistant tool which can be integrated to your development environment and best of all is, it is free.

So I have tested whether I can integrate Codestral with VS Code. Here is what I experienced.

Step 1 - Create a Mistral AI account. Don't worry it is free (as of now).

Step 2 - Enable Codestral. Codestral is like part of Mistral AI (like a module), but it need activate separately.

Step 3 - Open VS Code and install "Continue" extension. Continue extension is use to integrate VS code and Codestral. This extension can be use to integrate VS Code with other AI Code assistance as well. But we here looking into how we can integrate with Codestral.


Once installed it will appear on left side bar in VS Code.


You can move it to right side, so it will not cover your file explorer and other important sections. But it totally up to you.

Step 4 - Generate API key. Go to Mistral AI website again and go to Codestral section and click on the Generate API button to generate a API key.


Step 5 - Add Codestral to continue extension. Click on the models drop down and click on add chat model.


Then select "Mistral" as the provider and "Codestral" as the model. Enter the API key you have generated before in the box provided. Finally click Connect.

That's it, now you have connected with your Codstral account in VS code.

In next article we see basic usage of the Codestral in VS code.





SQL Server Logical Reads vs Physical Reads

When it comes to SQL Server query tuning, two of the most used phrases are logical reads and physical reads. But do you know exactly what ar...