Open Operator Documentation

repository·main·Indexed 24 days ago

https://github.com/browserbase/open-operator

A proof-of-concept web agent that converts natural language into browser actions using Stagehand, Browserbase, and OpenAI. This repository demonstrates a loop where Stagehand handles DOM manipulation and natural language conversion while Browserbase executes the browser operations.

Tokens
438
Snippets
1
Records
3
Agent score
34%

What's inside Open Operator

  1. How Open Operator works

    main

    Open Operator is a proof-of-concept web agent that uses a simple agent loop to convert natural language intent into browser actions.

    The Agent Loop

    The system follows a loop where it:

    1. Uses Stagehand to convert the user's natural language intent into headless browser operations.
    2. Uses Browserbase to execute those operations on the browser.

    Core Technologies

    • Stagehand: Handles precise DOM manipulation, state management, and converting natural language into browser operations.
    • Browserbase: Powers the core browser automation and execution.
    • OpenAI: Enables natural language understanding and decision-making.
    • Next.js: The web framework foundation.
  2. Setup and run Open Operator locally

    main

    To run Open Operator locally, you must use pnpm. Follow these steps to install dependencies, configure environment variables, and start the development server.

    1. Install dependencies

    pnpm install

    2. Configure environment variables

    Copy the example environment file to .env.local:

    cp .env.example .env.local

    Update .env.local with the following required keys:

    • OPENAI_API_KEY: Your OpenAI API key.
    • BROWSERBASE_API_KEY: Your Browserbase API key.
    • BROWSERBASE_PROJECT_ID: Your Browserbase project ID.

    3. Start the development server

    pnpm dev

    Once running, access the application at http://localhost:3000.

    pnpm install
    cp .env.example .env.local
    pnpm dev
  3. Required environment variables for Open Operator

    main

    The following environment variables must be defined in your .env.local file to run the application:

    VariableDescription
    OPENAI_API_KEYYour OpenAI API key
    BROWSERBASE_API_KEYYour Browserbase API key
    BROWSERBASE_PROJECT_IDYour Browserbase project ID