Sign In
Sign In

Connect Agents to VS Code

Updated on 20 February 2026

AI agents can be integrated with any tools that support the OpenAI API, including VS Code extensions.

For example, using Roo Code, an agent can interact with the editor: access project files, edit code, and execute commands in the terminal.

Installing Roo Code

  1. Open VS Code.
  2. Go to the Extensions section.
  3. Search for Roo Code and install the extension.

After installation, a Roo Code tab will appear in the sidebar with the chat interface.

Configuring Connection to an AI Agent

To configure the connection, you will need:

Follow these steps:

  1. Go to the Roo Code tab.

  2. Click the gear icon to open settings.

  3. Navigate to the Providers section.

  4. In the provider settings, enter:

    • API Provider: OpenAI Compatible

    • Base URL: <agent’s base URL>

    • API Key: <your API key>

    • Model: <model name from agent settings>

  5. Disable Enable streaming if it is turned on.

  6. Optionally, configure generation parameters:

    • Context Window Size: the amount of dialogue history sent in each request

    • Max Completion Tokens: maximum number of tokens in the response

  7. Click Save, then the back arrow to return to the chat.

You can now send messages to the agent directly from VS Code.

Setting Agent Behavior (Optional)

You can modify the agent’s behavior, for example, to make it respond in Portuguese:

  1. Open Roo Code Settings.
  2. Go to the Prompts section.
  3. Add the phrase: Responda em português.

The agent will now reply in Portuguese when you send messages from the editor.

Was this page helpful?
Updated on 20 February 2026

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support