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.
After installation, a Roo Code tab will appear in the sidebar with the chat interface.
To configure the connection, you will need:
Follow these steps:
Go to the Roo Code tab.
Click the gear icon to open settings.
Navigate to the Providers section.
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>
Disable Enable streaming if it is turned on.
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
Click Save, then the back arrow to return to the chat.
You can now send messages to the agent directly from VS Code.
You can modify the agent’s behavior, for example, to make it respond in Portuguese:
Responda em português.The agent will now reply in Portuguese when you send messages from the editor.