Skip to content

Vivek-736/BrowserPilot

Repository files navigation

BrowserPilot — Your AI Teammate for the Web

BrowserPilot Logo

BrowserPilot automates real-world web tasks: give a natural-language instruction, and an AI-driven agent will browse, interact, extract, and produce a structured report — with a live playback of every action.

Next.js React TypeScript Tailwind


Quick overview

BrowserPilot is built for teams and individuals who need accurate, repeatable web intelligence without building fragile scrapers or doing manual research. It blends live remote browsers, LLM-powered prompt optimization, schema-driven extraction, and event-based orchestration so you can run reproducible web tasks at scale.

╔══════════════════════════════════════════╗
║  Give a task → Agent browses → Report    ║
╚══════════════════════════════════════════╝

What it does

  • Launches an isolated browser session in the cloud and performs actions you describe.
  • Optimizes your query using an LLM to find the best on-page source.
  • Clicks, scrolls, and extracts structured facts using Stagehand's extraction schemas.
  • Stores progress and results in InstantDB with a searchable timeline.
  • Provides a live debug URL so you can replay the agent session.

Notable features

  • Live browser automation & playback
  • Prompt edification (AI-optimized search queries)
  • Schema-validated extraction (typed summaries & key findings)
  • Background worker orchestration (Inngest functions)
  • Lightweight persistence & logs (InstantDB)
  • Per-user sessions and authentication (Clerk)

How it works (high level)

  1. User creates a task in the dashboard (UI in src/app).
  2. Frontend emits a task event; Inngest triggers runBrowserTask.
  3. The worker optionally calls Puter to refine the search prompt.
  4. Stagehand launches a remote browser session and performs actions.
  5. Extraction results and agent logs are saved to InstantDB; the task status is updated.

Core workflow: src/inngest/functions.ts


Tech stack

  • Next.js (App Router) — frontend & pages
  • React + TypeScript — UI & client logic
  • Tailwind CSS, Framer Motion — design & motion
  • BrowserBase / Stagehand — remote browser orchestration
  • Puter API — LLM prompt optimization and completions
  • Inngest — event-driven serverless functions
  • InstantDB — admin/transact API for persistence & logs
  • Clerk — authentication

Local development

Prereqs: Node 18+, an InstantDB admin token, BrowserBase credentials and a Puter API key for full E2E runs.

Install and run:

git clone https://github.com/your-org/browser-pilot.git
cd browser-pilot
npm install
cp .env.example .env
# edit .env with required keys
npm run dev

Open http://localhost:3000 to view the landing page and /dashboard to create tasks.


Environment variables

These are referenced in src/lib/env.ts.

  • CLERK_SECRET_KEY — Clerk secret key
  • INSTANT_ADMIN_TOKEN — InstantDB admin token (admin/transact)
  • BROWSERBASE_API_KEY — BrowserBase API key
  • BROWSERBASE_PROJECT_ID — BrowserBase project id
  • INNGEST_EVENT_KEY — Inngest event key
  • INNGEST_SIGNING_KEY — Inngest signing key
  • PUTER_API_KEY — Puter API key
  • NEXT_PUBLIC_INSTANT_APP_ID / INSTANT_APP_ID — InstantDB app id

Use .env.local for local development. Do not commit secrets.


Important files

  • src/app/page.tsx — Landing and marketing pages
  • src/app/dashboard/* — Dashboard UI and protected routes
  • src/inngest/functions.ts — Task runner and Stagehand workflow
  • src/lib/env.ts — Environment variable mapping

Developer notes

  • To run offline tests, mock Stagehand, Puter, and InstantDB calls.
  • Tune Stagehand timeouts (actTimeoutMs, domSettleTimeout) for slow or JS-heavy pages.
  • Agent logs are written to InstantDB for auditability — use them for debugging.

Deployment

Recommended: Vercel for Next.js. Ensure environment variables are set in the deployment platform and Inngest webhooks are configured with the signing keys.

npm run build
npm start

About

BrowserPilot is an AI digital employee that autonomously operates a live browser to perform web research, navigate websites, and generate structured and lucid reports using AI agents.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors