Roo Code AI Agent Setup

Complete guide to setting up your AI agent development environment with VS Code + Roo Code extension, OpenRouter API and Browser-Use.

Setup Guide

Follow these steps to configure your AI agent development environment:

Step 1: Install VS Code

Download and install Visual Studio Code from the official website:

https://code.visualstudio.com/Download

Choose the appropriate version for your operating system (Windows, macOS, or Linux).

Step 2: Install Roo Code Extension

Open VS Code and install the Roo Code extension:

  1. Open the Extensions view (Ctrl+Shift+X or Cmd+Shift+X)
  2. Search for "Roo Code"
  3. Click Install
  4. Restart VS Code when prompted

Step 3: Configure OpenRouter API

Set up your OpenRouter API access with the deepseek model:

  1. Create an account at openrouter.ai
  2. Navigate to your API keys section
  3. Generate a new API key
  4. In VS Code, open Roo Code settings (click the gear-cog icon)
  5. Add your OpenRouter API key
  6. Set the default model to: deepseek/deepseek-chat-v3-0324:free

Step 4: Configure Browser-Use (Self-Hosted)

Set up Browser-Use for web browsing capabilities by self-hosting:

Method 1: Git Clone

  1. Clone the repository: git clone https://github.com/browser-use/browser-use
  2. Follow the setup instructions in the README.md
  3. In Roo Code settings, configure the local Browser-Use endpoint
  4. Test the connection by running a simple web search command

Method 2: Pip Install

  1. Install via pip: pip install browser-use
  2. Run the server: browser-use
  3. In Roo Code settings, configure the local Browser-Use endpoint (default: http://localhost:8000)
  4. Test the connection by running a simple web search command

Example test command (after setup):

// JavaScript example
const response = await fetch('https://api.browser-use.com/v1/search', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        query: 'current AI news',
        max_results: 3
    })
});
const data = await response.json();
console.log(data);

Step 5: Verify Your Setup

Create a test file with the following code to verify everything works:

// test-agent.js
const { RooAI } = require('roo-code');

const ai = new RooAI({
    llm: {
        provider: 'openrouter',
        model: 'deepseek/deepseek-chat-v3-0324:free'
    },
    browser: {
        provider: 'browser-use'
    }
});

async function testAgent() {
    // Test LLM
    const response = await ai.ask('What is the capital of France?');
    console.log('AI Response:', response);
    
    // Test browser
    const searchResults = await ai.browse('Latest AI news March 2025');
    console.log('Search Results:', searchResults.slice(0, 2));
}

testAgent();

Run the file in VS Code's terminal to confirm both the LLM and browser functionality work.

Popular Expansions

Enhance your AI agent with these additional capabilities:

Code Generation

GitHub Copilot

Best-in-class AI pair programmer

Get Copilot

Local LLMs

LM Studio

Run models locally for privacy

Get LM Studio

Automation

N8N

Open-source workflow automation

Get N8N

Vector Database

Pinecone

For long-term memory

Get Pinecone

Speech

ElevenLabs

Text-to-speech capabilities

Get ElevenLabs

Vision

Claude 3 Opus

Multimodal understanding

Get Claude