Overview

Narada allows you to control a remote browser window from anywhere in the world. This powerful feature enables you to automate tasks on remote machines, making it perfect for distributed automation scenarios, cloud-based testing, and remote browser automation.

Prerequisites

Getting Started

1

Initialize the Remote Browser

On the remote machine:
  1. Open Chrome with the Narada extension installed
  2. Visit https://app.narada.ai/initialize
  3. The page will initialize the extension and display your unique browser window ID
Keep this browser window ID secure as it provides direct access to the remote browser.
2

Set Up Control Script

Create a Python script on your controlling machine:
import asyncio

from narada import RemoteBrowserWindow


async def main() -> None:
    # The browser window ID uniquely identifies a browser window anywhere in the world. Assuming we
    # have already launched a browser window on another machine and obtained its ID by visiting
    # https://app.narada.ai/initialize.
    browser_window_id = "REPLACE_WITH_BROWSER_WINDOW_ID"

    window = RemoteBrowserWindow(browser_window_id=browser_window_id)

    # Run a task on another machine.
    response = await window.dispatch_request(
        prompt=(
            '/Operator Search for "LLM Compiler" on Google and open the first arXiv paper on the '
            "results page, then tell me who the authors are."
        )
    )

    assert response["response"] is not None
    print("Response:", response["response"]["text"])


if __name__ == "__main__":
    asyncio.run(main())
Make sure to replace the browser_window_id with the ID from your remote browser.
3

Run Your First Remote Task

Execute your control script:
python your_script.py
If successful, you’ll see the remote browser execute your command and return the results!

How It Works

  1. Browser Window ID: Each browser window is assigned a unique ID when initialized. This ID serves as the connection point between your control script and the remote browser.
  2. Remote Connection: When you create a RemoteBrowserWindow instance with a specific ID, Narada establishes a secure connection to that remote browser.
  3. Task Execution: Using dispatch_request(), you can send commands to the remote browser. These commands are executed as if they were run locally.
  4. Response Handling: The remote browser executes the task and sends back the results, which you can process in your control script.