Inspiration
Three weeks before my summer internship, I was apartment hunting remotely — no car, no local contacts, just a list of Google Maps links and a growing sense of dread. I spent an entire afternoon calling leasing offices one by one, asking the same five questions, getting put on hold, getting contradictory answers, copying everything into a spreadsheet just to compare. By call six I was exhausted. The information existed. Getting it just required a human on a phone.
That same month, I was buying a specific iPhone model as a gift — hard deadline, specific configuration. Seven browser tabs open across Amazon, Best Buy, Walmart, Target, and eBay. Manual refreshes. Price inconsistencies across variants. I placed the order. Two days later it was $55 cheaper on a site I hadn't checked.
Then came the Amazon return. A product I bought dropped $40 within the refund window. I opened the chat. Got a bot. Got transferred. Got disconnected. Gave up.
Each of these failures had the same technical root cause: the ecommerce web is a stateful, authenticated, JavaScript-rendered environment that traditional automation cannot touch. Retailer APIs are locked behind partnerships. Static scrapers break on dynamic DOM. The only interface that actually works is a real browser, logged in, navigating like a human.
That's exactly what Browser Use enables — and that realization is what became PriceWar.
What it does
PriceWar is a Chrome extension paired with a real-time AI War Room dashboard. It deploys three autonomous agents the moment you interact with any ecommerce surface:
🗡️ Rex — Negotiation Engine & Autonomous Buyer
Rex is a Browser Use agent operating inside authenticated retailer sessions. It navigates order history pages across Amazon, Walmart, Best Buy, Target, and Costco — not via API, not via static scrape, but through live browser automation on the actual rendered DOM. It extracts purchase records, computes price deltas against current listings, and when a refund opportunity exists, opens the retailer's live chat interface and executes a Grok-powered negotiation in real time.
When chat resolution fails, Rex escalates to Vapi — firing live AI voice calls directly to store representatives. The same agent that read your order history is now on the phone arguing for your money back.
Rex doubles as an autonomous buyer: give it a natural language intent — "Buy me Sony WH-1000XM5 under $280" — and it runs a Firecrawl price sweep across retailers, navigates to the best result, fills your saved payment profile into the checkout form via Browser Use, screenshots the filled form, and emails you a confirmation link. The order is placed only on your explicit approval. Pay-on-proof, zero blind trust.
📞 Intel Gathering — Parallel Voice Intelligence
Built directly from the apartment hunt. Browser Use navigates each Google Maps listing, extracts structured business data, then deep-links into the business's own website and scrapes operational context — pricing pages, service details, hours. Grok ingests that per-business context and generates a tailored question script for each target. Vapi then fires all calls simultaneously. Live transcripts stream over WebSockets into a side-by-side comparison table that builds itself in real time. What took an afternoon of phone tag now takes minutes — and the questions are smarter than anything I would have asked manually.
🛡️ Shield — Dark Pattern Detection & Auto-Remediation
Shield intercepts every checkout page via the extension's content script, sends the URL to Firecrawl for a structured scrape, and runs Grok-powered analysis against a curated dark patterns knowledge base. Detected manipulative elements — pre-checked upsells, hidden fees, fake countdown timers, scarcity traps — are surfaced in a live HUD overlay injected directly into the retailer's DOM. Removable patterns get auto-remediated: Shield finds the associated checkbox and unchecks it programmatically before the user reaches payment.
🔍 Scout — Real-Time Price Intelligence
The seven-tab iPhone hunt, fully automated. The content script detects product pages across all major retailers using layered DOM extraction, sends the product signal to the backend, which runs a Firecrawl + Grok pipeline against live retailer listings and CamelCamelCamel historical data. Results — ranked prices, timing recommendation, win probability — stream back over WebSocket within seconds.
How we built it
Architecture Overview
| Layer | Stack |
|---|---|
| Browser automation | Browser Use 0.12.6 + Playwright |
| Web scraping | Firecrawl |
| LLM reasoning | Grok (xAI) — grok-3-mini (fast) + grok-3 (reasoning) |
| Voice calling | Vapi AI |
| Backend | FastAPI + WebSockets + SQLite (async aiosqlite) |
| Frontend | React 18 + Framer Motion + Three.js (React Three Fiber) |
| Extension | Chrome MV3 — content script + background service worker |
Browser Use — The Core of Everything
Browser Use is not a utility in PriceWar. It is the product.
The foundational insight behind PriceWar is that every high-value ecommerce action exists behind an authentication wall, inside a JavaScript-rendered SPA, with anti-automation defenses active. Traditional tooling fails immediately:
- Retailer order history APIs don't exist for consumers
- Static HTML scrapers return skeleton pages or CAPTCHAs
- Rule-based Selenium scripts break the moment a page layout changes
Browser Use solves all three. Its LLM-over-browser-context architecture means Rex can navigate an Amazon order history page it has never seen, identify the relevant purchase records, find the price adjustment chat entry point, and execute a multi-turn negotiation — all driven by natural language goals grounded in live DOM state, not brittle CSS selectors.
We use Browser Use across four distinct ecommerce workflows:
1. Order History Extraction (Rex — Scan Phase)
Rex instructs a Browser Use agent to navigate to a retailer's order history URL inside a persistent authenticated session. The agent reads the rendered page, identifies individual order entries, and extracts product names, prices paid, and order dates — across Amazon, Walmart, Best Buy, Target, and Costco — without a single retailer-specific API call. No partnerships. No tokens. Just a browser that knows how to read.
2. Live Chat Negotiation (Rex — Fight Phase)
Once an eligible price drop is identified, Rex opens a new Browser Use task: navigate to the retailer's customer service chat, initiate a conversation, and execute a Grok-generated negotiation script. The agent reads each chat response in real time and Grok decides the next move — push further, accept the offer, or escalate to a voice call. This is a fully autonomous multi-turn agent loop running inside a live retailer session.
3. Autonomous Checkout (Rex — Buy Mode)
Given a natural language purchase intent, Browser Use navigates to the target product page, verifies the price, proceeds through checkout, and fills the payment form field by field using the user's saved profile. It screenshots the completed form before any submission — the order only goes through after the user clicks an emailed confirmation link. Full autonomy with a human approval gate.
4. Business Website Research (Intel Gathering)
Before Rex calls a leasing office or any business, Browser Use deep-links into the business's own website — reading pricing pages, service descriptions, and operational details - to build a rich context object per location. Grok uses this to generate question scripts that are specific to that business, not generic. The research that used to take 20 minutes of manual tab-switching per location now takes seconds.
Persistent Browser Profile Architecture
By default, each Browser Use run spawns a fresh browser context - meaning every session starts logged out. We built a SessionManager that maps retailer hostnames to persistent Playwright browser profiles stored on disk. Rex authenticates once per retailer (the user logs in manually the first time), and every subsequent Browser Use session picks up that authenticated state silently. No cookie injection, no session token management in code - just a browser that's already logged in and ready to act.
Real-Time Browser Feed
Every Browser Use step - current URL, action taken, screenshot - is captured and emitted as a WebSocket event to the War Room frontend. Users watch a live feed of Rex navigating inside real retailer sessions as it works. Autonomy with full transparency.
The Rest of the Stack
Rex's negotiation eligibility check computes the price delta and validates the return window:
$$\Delta P = P_{\text{paid}} - P_{\text{current}} > 0, \quad t_{\text{elapsed}} \leq t_{\text{window}}$$
For latency-sensitive negotiation turns, message generation routes through grok-3-mini. Complex policy reasoning and counter-offer evaluation use grok-3. Scout's win probability is computed as a weighted score across price gap, retailer policy strength, and days remaining:
$$W = \alpha \cdot \frac{\Delta P}{P_{\text{paid}}} + \beta \cdot S_{\text{policy}} + \gamma \cdot \frac{t_{\text{window}} - t_{\text{elapsed}}}{t_{\text{window}}}$$
The Intel pipeline fires all Vapi calls simultaneously, with each call's transcript streaming independently over WebSockets into a per-business reducer keyed by business name - no call's completion blocks another's rendering.
Shield's dark pattern classifier runs Grok against a structured knowledge base with severity scoring across four categories: financial manipulation, psychological pressure, deceptive UI, and consent dark patterns. Each finding includes an action field (uncheck, flag, or warn) that drives the auto-remediation logic in the content script.
The frontend War Room is built on a single useReducer context with 40+ action types, all driven by WebSocket events. Agent state, live browser frames, call transcripts, checkout logs, and savings data all flow through one event-driven pipeline - no polling, no REST fetches mid-session.
Challenges we ran into
Authenticated DOM variability at scale. Amazon alone has 8+ price display patterns across page types, geographic variants, and A/B tests - all inside a live authenticated session. We built a priority-ordered extraction stack: buy box containers →
.a-offscreenprice nodes within scoped root elements → JSON-LDProductschema → meta tags → URL slug decoding. Each layer a silent fallback.Browser Use session continuity. By default each Browser Use run spawns a fresh browser context. We extended this with a
SessionManagerthat maps retailer hostnames to persistent Playwright profiles wrapped in an asyncio semaphore to prevent concurrent session conflicts. Rex can scan five retailer histories back-to-back without a single re-authentication prompt.LLM-in-the-loop latency for real-time chat negotiation. A 10-second LLM response inside a live retailer chat window looks like a disconnection. We route negotiation message generation through
grok-3-minion the fast path and reservegrok-3for complex cases - parsing ambiguous policy language, evaluating multi-step counter-offers, deciding whether to escalate to voice.Parallel async voice + UI synchronization. Five Vapi calls firing simultaneously, each with its own transcript stream, answer extraction pass, and UI card - all updating independently. We modeled this as a reducer over a
batchCallMapkeyed by business name, with WebSocket events driving atomic state updates per call. No call's completion blocks another's rendering.Trustworthy autonomous checkout. Browser Use filling a real payment form creates a trust problem - users need to verify before committing. We designed a pay-on-proof confirmation gate: Browser Use fills the form, takes a full-page screenshot, the backend emails a confirmation link with the screenshot embedded, and checkout is only submitted after the user explicitly approves. The agent holds in an async wait state until confirmation or timeout.
Accomplishments that we're proud of
- Rex executing a complete end-to-end price negotiation - Browser Use navigated the retailer, read the order history, opened chat, argued the case across multiple turns, and secured the refund - with zero human input after the initial trigger.
- Intel Gathering running 5 simultaneous Vapi calls with Browser Use-informed, per-business question scripts - streaming live transcripts and self-populating a comparison table in real time. The exact tool I needed during apartment hunting.
- Browser Use operating across 5 different retailer DOM environments without retailer-specific hardcoding - driven entirely by LLM planning over live browser state.
- A War Room UI with live Browser Use screenshot feeds, animated agent battle indicators, sonar ping status rings, and sparkline price trend charts - making the AI's work visible and visceral, not a black box.
- Shield detecting and auto-remediating pre-checked upsell checkboxes in live checkout flows, saving money users didn't know they were about to spend.
What we learned
Browser Use is the unlock for consumer-side ecommerce agents. Every meaningful buyer action -checking order history, comparing authenticated prices, filling checkout, negotiating via retailer chat -exists behind a wall that no API or static scraper can breach. Browser Use navigates that wall natively. The moment we integrated it, entire categories of previously impossible features became straightforward engineering problems.
LLM planning over browser state is fundamentally different from scripted automation. Traditional automation breaks the moment a page changes layout. Browser Use agents reason about what they see and adapt. We saw this repeatedly - Rex encountering Amazon page variants it had never seen and navigating correctly because it understood the goal, not just the selector path.
The ecommerce dark pattern problem is structural, not accidental. Retailers invest heavily in checkout friction, pre-checked upsells, and artificial urgency because it works. Shield surfacing these in real time isn't a feature - it's a counterforce to an entire discipline of adversarial UX design.
Real-time visibility transforms trust in autonomous agents. Showing users the Browser Use screenshot feed - watching Rex navigate, type, and make decisions live - converts skepticism into confidence. Autonomy without transparency is unsettling. Autonomy with a live feed feels like having a skilled agent in your corner.
The ecommerce experience is adversarial by design. Retailers have algorithms, dark patterns, and entire UX teams optimizing against the buyer. Building the buyer's equivalent - an AI agent stack that fights back - is genuinely underserved territory, and Browser Use makes it technically tractable for the first time.
What's next for PriceWar
- Continuous background patrols - Rex monitors all open orders on a schedule via persistent Browser Use sessions, alerting the moment a refund window opens. No manual trigger required.
- Retailer expansion - eBay, Costco warehouse, Apple Store, B&H, and international marketplaces. Each needing only a Browser Use session and a Grok extraction prompt — not a custom API integration.
- Subscription trap detection - Shield extended upstream to catch auto-renewing trial patterns at signup, not just checkout, using Browser Use to read the full terms flow.
- Multi-user coalition mode - aggregate anonymized price signals across users to detect coordinated retailer-side price manipulation and surface it publicly.
- Proactive deal hunting - give Rex a wishlist; it runs scheduled Browser Use scans across retailers and autonomously pulls the trigger when your price threshold is hit.
- Mobile War Room - approve Rex's checkout decisions, monitor live browser feeds, and track recovered savings from your phone.
Built With
- ai
- apis
- browser-use
- camelcamelcamel
- chrome
- css
- databases
- extension
- fastapi
- fiber
- firecrawl
- framer
- grok
- infrastructure
- javascript
- languages
- motion
- platform
- playwright
- python
- react
- services
- sqlite
- tailwind
- three.js
- uvicorn
- vapi
- websockets
- xai
Log in or sign up for Devpost to join the conversation.