VibeBuilders.ai Logo
VibeBuilders.ai
Browser Agents Real Example

Browser Agents Real Example

No_Information6299
April 15, 2025
reddit

I made a Browser Price Matching Tool that uses browser automation and some clever skills to adjust your product prices based on real-time web searches data. If you're into scraping, automation, or just love playing with the latest in ML-powered tools like OpenAI's GPT-4, this one's for you.

What My Project Does

The tool takes your current product prices (think CSV) and finds similar products online (targeting Amazon for demo purposes). It then compares prices, allowing you to adjust your prices competitively. The magic happens in a multi-step pipeline:

  1. Generate Clean Search Queries: Uses a learned skill to convert messy product names (like "Apple iPhone14!<" or "Dyson! V11!!// VacuumCleaner") into clean, Google-like search queries.
  2. Browser Data Extraction: Launches asynchronous browser agents (leveraging Playwright) to search for those queries on Amazon, retrieves the relevant data, and scrapes the page text.
  3. Parse & Structure Results: Another custom skill parses the browser output to output structured info: product name, price, and a short description.
  4. Enrich Your Data: Finally, the tool combines everything to enrich your original data with live market insights!

Full code link: Full code

File Rundown

  • learn_skill.py Learns how to generate polished search queries from your product names with GPT-4o-mini. It outputs a JSON file: make_query.json.
  • learn_skill_select_best_product.py Trains another skill to parse web-scraped data and select the best matching product details. Outputs select_product.json.
  • make_query.json The skill definition file for generating search queries (produced by learn_skill.py).
  • select_product.json The skill definition file for extracting product details from scraped results (produced by learn_skill_select_best_product.py).
  • product_price_matching.py The main pipeline script that orchestrates the entire process—from loading product data, running browser agents, to enriching your CSV.

Setup & Installation

  1. Install Dependencies: pip install python-dotenv openai langchain_openai flashlearn requests pytest-playwright
  2. Install Playwright Browsers: playwright install
  3. Configure OpenAI API: Create a .env file in your project directory with:OPENAI_API_KEY="sk-your_api_key_here"

Running the Tool

  1. Train the Query Skill: Run learn_skill.py to generate make_query.json.
  2. Train the Product Extraction Skill: Run learn_skill_select_best_product.py to generate select_product.json.
  3. Execute the Pipeline: Kick off the whole process by running product_price_matching.py. The script will load your product data (sample data is included for demo, but easy to swap with your CSV), generate search queries, run browser agents asynchronously, scrape and parse the data, then output the enriched product listings.

Target Audience

I built this project to automate price matching—a huge pain point for anyone running an e-commerce business. The idea was to minimize the manual labor of checking competitor prices while integrating up-to-date market insights. Plus, it was a fun way to combine automation,skill training, and browser automation!

Customization

  • Tweak the concurrency in product_price_matching.py to manage browser agent load.
  • Replace the sample product list with your own CSV for a real-world scenario.
  • Extend the skills if you need more data points or different parsing logic.
  • Ajudst skill definitions as needed

Comparison

With existing approaches you need to manually write parsing loginc and data transformation logic - here ai does it for you.

If you like the tutorial - leave a star github

Vibe Score

LLM Vibe Score

0

Sentiment

Human Vibe Score

1

Rate this Resource

Join the VibeBuilders.ai Newsletter

The newsletter helps digital entrepreneurs how to harness AI to build your own assets for your funnel & ecosystem without bloating your subscription costs.

Start the free 5-day AI Captain's Command Line Bootcamp when you sign up:

By subscribing, you agree to our Privacy Policy and Terms of Service.