VS Code
Chat with your Studio agents next to your code in VS Code, Cursor, Windsurf or Antigravity.
Swarmix for VS Code puts a Swarmix panel in your code editor. You chat with your Studio agents next to your code. The agent sees the file and selection in front of you, reads your workspace, the Problems list, the terminal and debug output and your uncommitted changes, and opens files for you. The same extension works in VS Code, Cursor, Windsurf and Antigravity.
Before you start
Your organization uses the Hub, Studio is open on the same computer, and your organization allows Swarmix for VS Code. The panel lists each of your solo agents.
Install the extension
- In Studio, open the Features menu, click Marketplace, and open Swarmix for VS Code.
- Click Install in VS Code. Studio shows one button for each editor it finds, such as Install in Cursor.
- In the editor, open the Command Palette and run Developer: Reload Window.
Open Swarmix
- Click the Swarmix icon in the activity bar.
- Sign in, connect to your Studio, and pick a project and an agent, as in Connect an add-in and chat.
The status bar shows Swarmix: followed by your Studio's name. Click it to open the panel. Each workspace keeps its own chat: open the folder again and you are back in it.
What the agent gets from the editor
The agent runs in your Studio. With each message, the extension tells it where you are in the editor: your workspace folders, the file in front of you and the cursor line, your selection (up to 4,000 characters), your open tabs, files with unsaved changes, the number of errors and warnings with up to 10 problems, the git branch, and what changed since your last message. The agent learns only what changed since its last turn.
The extension also lends the agent tools to:
- read files as you see them, with unsaved changes;
- list problems, open a file for you and read your uncommitted changes;
- go to a definition, find references and symbols, and read the hover information;
- read the terminal output, the debug console, the debug state and notebook outputs;
- find and run your editor's commands, as in Let the agent run editor commands.
The agent also has your project's files, artifacts, Knowledge Center and tasks. For example, type @, choose Task, pick the task, and ask "Fix the bug in this task." See How the add-ins work.
Ask about your code
- Select code, right-click it, and choose Ask Swarmix about this. The selection goes into the message box. Add your question and send it.
- On a problem in the editor, open the quick fixes and choose Ask Swarmix to fix this.
- To chat in an editor tab instead of the panel, click New chat in editor tab in the panel's title bar.
For example, ask "Which errors are in this file?", "Explain this function" or "My test run failed, why?". The agent reads files with your unsaved changes and sees only files in the open workspace.
Let the agent run editor commands
The agent can run your editor's commands, such as formatting a file. Each time, the editor asks "Your Swarmix agent wants to run…". Click Run, or Always allow this command for that command.
Some commands don't run, whatever you allow: closing or reloading the window, installing or removing extensions, pushing code, typing into a terminal, deleting files and opening another folder.
The extension itself adds no tool that writes files. The agent's chat runs in your workspace folder. With its own tools, the agent can change files in that folder, within its role's rules and your permission mode. See Approving agent actions.
Work in another folder
Studio fixes each chat's folder at the start of the chat. New chats start in your workspace folder. A chat that works in another folder shows Other folder. To work here, click New chat in followed by the folder's name, or click Keep this chat.
Best practices
- Select the code you ask about. The agent sees the selection and the cursor.
- Allow a command for good only when you know what it does. It then runs without asking.
- Start a new chat when you change project folder. A chat keeps its starting folder.
FAQ
Run Developer: Reload Window from the Command Palette.
Each computer installs the extension and pairs with a Studio on its own.
Run Show editor info from the Command Palette and copy what it shows.
It reads only files in the open workspace. Open the folder that holds the file.