FreeAIrAccess to AI for free for everyone who is using Visual Studio. FreeAIr is a Visual Studio extension which allows you to interact with any LLM which have OpenAI-compatible API. Even with local LLM! No artificial || political barrier injected in FreeAIr code. QAQ: Wait, another one?! A: Yes, yet another LLM VSIX :) Q: Why? There is a fantastic Copilot! A: Because Copilot is a subject of politics. Today you are enjoying Copilot, tomorrow your country has been banned from it. FreeAIr is not a political subject and provides no artificial barriers. Q1: I have NO access to any LLM in Internet via public API. Q2: I have NO rights to use any remote LLM because of license of the code I'm writing. A: No problem! You can use local LLM, for example via KoboldCpp. Local LLM sends nothing to remote servers. See details below. FeaturesMain functions:
FreeAIr images (click to open)Getting started
Basic concepts of FreeAIr
FreeAIr settingsFreeAIr settings are divided into two categories:
Visual Studio User-Specific SettingsThis is a group of user-specific settings. Each member of your team can customize these settings for themselves, they are saved only locally in the Visual Studio instance. For example, these are font size settings for the LLM dialog. They can be opened via FreeAIr JSON settingsThis is a group of settings that makes sense to keep common for all members of your team. These settings can be saved in a json file, which is recommended to be committed to the git repository. Also, these settings can be saved inside Visual Studio, if, for some reason, it is undesirable to create a file. These settings contain:
AgentsAn agent is a specific combination of You can edit existing agents or add your own. If an agent does not have a token, the agent is considered inactive. ChatChat is the core element of FreeAIr, where communication with LLM and code generation takes place. ![]() The chat consists of three elements:
Chat Dialog AreaThis area displays:
The size of these elements is adjusted in For some dialog elements (code chunks, images, etc.) special buttons are added to the text that allow you to conveniently operate these elements:
The size of these buttons is also adjusted in Prompt input areaThis is the area for entering a new prompt. To send the entered prompt, press Ctrl+Enter, after which the LLM will wait for a response. You can interrupt the response by pressing the You can also enter the following in this area:
Chat contextThe chat context is additional information for LLM, for example, documents from your solution are often added to the context. You can add to the context:
If your project is configured to use Microsoft Copilot, the If your project is written in C#, you can add all files dependent on the already added file to the chat context so that LLM gets more context. There is a corresponding button next to the document name for this. Support ActionThe actions that FreeAIr can offer the user are not encoded in the FreeAIr code. The list of actions is part of the Json settings file in the Each action consists of:
Anchors are placeholders in which the corresponding contextual information is added. They can be:
You can edit existing and add your own support actions. MCP Servers and their toolsMCP Servers are Model Context Protocol servers that provide additional capabilities for LLM (e.g. database access, or git access). FreeAIr fully supports MCP Servers. There are three categories of MCP servers:
Each MCP server provides its own set of tools. You can edit the set of MCP servers and their tools and commit this file to the repository. When creating a chat, the selected tools are copied to the chat and you can enable/disable tools inside the chat, this does not affect the status of global tools. Examples of prompts that LLM can execute if it is provided with the appropriate tools:
Embedded Visual Studio MCP serverThis MCP server provides LLM with the ability to work inside Visual Studio, such as:
This MCP server is available immediately and does not require any configuration steps. Github.com MCP serverGithub.com MCP server is a server that provides LLM with the ability to work with a repository on github.com. For example, through this server you can ask LLM to get a list of issues and ask LLM to fix one of them. To install this server, click the corresponding button in the FreeAIr Command Center. The latest version of github.com MCP server will be downloaded and installed. Commit message buildingFreeAIr allows a Visual Studio user to use LLM to generate a commit message. To do this, switch to the ![]() An example of a prompt: Natural Language SearchUsing natural language to search for a solution or project helps you search code using fuzzy queries that focus on the meaning of the code rather than its text. ![]() Each text file from the solution (project) is passed to LLM along with a search query, and LLM determines whether there is anything suitable in that file. After all files are processed, the results are collected in the search results window: ![]() Since all project files are processed, searching can take a considerable amount of time. To speed it up, FreeAIr supports RAG using natural language outlines. Natural Language OutlinesNatural Language Outlines are a special kind of comments embedded directly into the source code. These comments are generated by LLM, and are used to create embeddings that are used in RAG. In FreeAIr, NLOs are implemented according to paper. Generating NLOThe first step is to generate NLOs and add them to the source code files. When starting this work, you should generate NLOs for the entire solution via this menu: ![]() Next, you can incrementally add NLOs to only those files that have been modified using this menu: ![]() The NLO viewing and saving window itself is designed trivially: ![]() By unchecking the box, you can enable or disable adding a specific outline. By clicking By left-clicking on the file name or the outline itself, you can view the proposed changes: ![]() Building NLO Json fileAfter adding (updating) NLO in the source code files, it is necessary to create (update) JSON files of a special type: NLO-embedding Json files. This can be done for the entire solution via the menu: ![]() or only for modified files via the menu: ![]() In any case, a window will open: ![]() Set up everything you need and create (update) json files. These files contain:
If the files are created, then in the menu ![]() the It is recommended to save these Json files to a git repository so that the natural language search function works for all team members. WARNING: In the 3.0 version of FreeAIr the checkbox How I can access to AI if my country is banned from Copilot and from any other LLM provider?This is possible. If you are banned only from Copilot:
FreeAIr itself has no restrictions, you are able to switch another OpenAI compatible API. If you are banned from any remote LLM then run LLM locally, which is very easy, for example with KoboldCpp: run KoboldCpp, choose the model, wait for KoboldCpp starts (it opens browser), and then use correct OpenAI compatible endpoint like Thanks
|