Skip to content

EnggTalha/DealPilot-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›’ Autonomous E-commerce Price Scout Agent

Give it a product list and a budget. The agent continuously monitors prices across Amazon, eBay, and AliExpress โ€” detects drops, scores deals with Claude, alerts you via Telegram, and optionally auto-purchases when your criteria are met.

Python Claude Telegram License Status


๐Ÿ“ธ Demo

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  ๐Ÿ›’ Autonomous Price Scout Agent                            โ”‚
โ”‚  Mode: DRY RUN | Auto-purchase: off | Check interval: 60m  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Tracking 3 products.

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ“ฆ Sony WH-1000XM5 Headphones (id: demo001)
  Scraping amazon: https://amazon.com/dp/B09XS7JWHH...
  Scraping ebay: https://ebay.com/itm/sony-wh1000xm5...
  Analyzing deal with Claude...
  Score: 84/100 | Verdict: BUY NOW | Best: $289.99 on Ebay
  eBay has it $20 below the 90-day average. Buy now.
  ๐Ÿ”” Alert sent (price_drop)

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ“ฆ iPhone 15 Pro 256GB (id: demo002)
  Scraping amazon: https://amazon.com/dp/B0CHX2F5QT...
  Analyzing deal with Claude...
  Score: 52/100 | Verdict: WAIT | Best: $949.00 on Amazon
  Price is $49 above the target. Historical data shows drops in Nov/Dec.

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ“ฆ Logitech MX Master 3S Mouse (id: demo003)
  Scraping amazon: https://amazon.com/dp/B09HM94VDS...
  Scraping bestbuy...
  Analyzing deal with Claude...
  Score: 91/100 | Verdict: BUY NOW | Best: $79.99 on Bestbuy
  $79.99 is below your $80 target. Auto-buy triggered!
  โšก Auto-purchase triggered!
  Purchase result: dry_run

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Product                      โ”‚ Best Price โ”‚ Platform โ”‚ Score โ”‚ Trend    โ”‚ Verdict       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Logitech MX Master 3S Mouse  โ”‚  $79.99    โ”‚ Bestbuy  โ”‚  91   โ”‚ ๐Ÿ“‰ drop  โ”‚ ๐ŸŸข BUY NOW   โ”‚
โ”‚ Sony WH-1000XM5 Headphones   โ”‚ $289.99    โ”‚ Ebay     โ”‚  84   โ”‚ ๐Ÿ“‰ drop  โ”‚ ๐ŸŸข BUY NOW   โ”‚
โ”‚ iPhone 15 Pro 256GB          โ”‚ $949.00    โ”‚ Amazon   โ”‚  52   โ”‚ โžก๏ธ stable โ”‚ ๐ŸŸก WAIT      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”ฅ Buy Now Opportunities
  ๐Ÿ›’ Logitech MX Master 3S Mouse โ€” $79.99 on Bestbuy
     Below your $80 target. Great time to buy.
  ๐Ÿ›’ Sony WH-1000XM5 Headphones โ€” $289.99 on eBay
     $20 below 90-day average. Buy now.

โœ“ Run complete. 3 products analyzed | 1 alert sent | 1 purchase action

Telegram alert received:

๐Ÿ“‰ Price Alert: Sony WH-1000XM5 Headphones

๐Ÿ’ต Current best: $289.99 on Ebay
๐Ÿ“Š Deal score: 84/100
๐Ÿ’ฐ Savings: ~$20.00 vs average
๐Ÿ“ˆ Trend: Dropping

๐Ÿค– Claude says: eBay has this $20 below the 90-day average โ€” buy now before it rebounds.

๐Ÿ”— https://ebay.com/itm/sony-wh1000xm5

๐Ÿง  How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  1. WATCHLISTโ”‚โ”€โ”€โ–ถโ”‚  2. SCRAPE   โ”‚โ”€โ”€โ–ถโ”‚  3. ANALYZE (Claude)     โ”‚
โ”‚              โ”‚   โ”‚              โ”‚   โ”‚                          โ”‚
โ”‚  JSON file   โ”‚   โ”‚  Playwright  โ”‚   โ”‚  Price vs history        โ”‚
โ”‚  Products +  โ”‚   โ”‚  Amazon      โ”‚   โ”‚  Deal score 0-100        โ”‚
โ”‚  criteria    โ”‚   โ”‚  eBay        โ”‚   โ”‚  buy_now/wait/skip       โ”‚
โ”‚  target $    โ”‚   โ”‚  AliExpress  โ”‚   โ”‚  Price trend detection   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                  โ”‚
                                                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  6. REPORT   โ”‚โ—€โ”€โ”€โ”‚  5. PURCHASE โ”‚โ—€โ”€โ”€โ”‚  4. ALERT                โ”‚
โ”‚              โ”‚   โ”‚              โ”‚   โ”‚                          โ”‚
โ”‚  Markdown    โ”‚   โ”‚  Playwright  โ”‚   โ”‚  Telegram instant push   โ”‚
โ”‚  JSON        โ”‚   โ”‚  Amazon      โ”‚   โ”‚  Email SMTP              โ”‚
โ”‚  Terminal    โ”‚   โ”‚  1-Click/Cartโ”‚   โ”‚  Anti-spam logic         โ”‚
โ”‚  table       โ”‚   โ”‚  (opt-in)    โ”‚   โ”‚  Drop threshold filter   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Agent Decision Logic

Scrape prices
     โ”‚
     โ–ผ
Update price history
     โ”‚
     โ–ผ
Claude scores deal (0-100)
     โ”‚
     โ”œโ”€โ”€ Score โ‰ฅ 80 + meets criteria โ”€โ”€โ–ถ verdict: buy_now
     โ”œโ”€โ”€ Price dropping, not at target โ”€โ”€โ–ถ verdict: wait
     โ””โ”€โ”€ Poor value / far from target โ”€โ”€โ–ถ verdict: skip
     โ”‚
     โ–ผ
Should we alert?
     โ”œโ”€โ”€ target_price hit โ†’ YES (target_hit alert)
     โ”œโ”€โ”€ dropped โ‰ฅ threshold% since last alert โ†’ YES (price_drop alert)
     โ”œโ”€โ”€ score โ‰ฅ 80 + first time โ†’ YES (deal alert)
     โ””โ”€โ”€ none of above โ†’ NO (prevent spam)
     โ”‚
     โ–ผ
Should we auto-purchase?
     โ”œโ”€โ”€ AUTO_PURCHASE=true AND item.auto_buy=true
     โ”œโ”€โ”€ verdict = buy_now AND score โ‰ฅ 75
     โ”œโ”€โ”€ price โ‰ค MAX_AUTO_PURCHASE_USD
     โ””โ”€โ”€ price โ‰ค item.max_price

โœจ Features

Feature Details
๐Ÿ” Multi-platform scraping Amazon, eBay, AliExpress, Walmart, BestBuy via Playwright
๐Ÿง  Claude deal scoring AI scores each deal 0โ€“100 and gives buy/wait/skip verdict
๐Ÿ“Š Price history Tracks lowest/highest/average price over time
๐Ÿ“‰ Drop detection Alerts only when price drops by your configured threshold
๐Ÿ“ฑ Telegram alerts Instant push notifications with deal details
๐Ÿ“ง Email alerts Optional fallback via Gmail SMTP
๐Ÿ›’ Auto-purchase Optional Amazon 1-Click / Add-to-Cart automation
๐Ÿ” Anti-spam Won't re-alert unless price drops another X%
โฑ๏ธ Continuous mode Checks every N minutes in the background
๐Ÿ“„ Reports Full Markdown + JSON deal reports saved locally

๐Ÿ—‚๏ธ Project Structure

price-scout/
โ”œโ”€โ”€ main.py                      # CLI entry point
โ”œโ”€โ”€ config.py                    # Config, env vars, Pydantic models
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ .env.example
โ”‚
โ”œโ”€โ”€ agent/
โ”‚   โ”œโ”€โ”€ brain.py                 # Claude: deal analysis + purchase decisions
โ”‚   โ””โ”€โ”€ orchestrator.py          # Main agentic loop
โ”‚
โ”œโ”€โ”€ tools/
โ”‚   โ”œโ”€โ”€ watchlist.py             # Product watchlist CRUD
โ”‚   โ”œโ”€โ”€ scraper.py               # Playwright + BS4 price scraper
โ”‚   โ”œโ”€โ”€ alerter.py               # Telegram + email alert delivery
โ”‚   โ”œโ”€โ”€ purchaser.py             # Amazon auto-purchase via Playwright
โ”‚   โ””โ”€โ”€ reporter.py              # Terminal + Markdown report generator
โ”‚
โ””โ”€โ”€ data/
    โ”œโ”€โ”€ products/watchlist.json  # Your product watchlist
    โ”œโ”€โ”€ prices/<id>.json         # Per-product price history
    โ”œโ”€โ”€ alerts/alert_log.json    # Alert history (prevents spam)
    โ””โ”€โ”€ reports/                 # Deal reports

๐Ÿš€ Quickstart

1. Clone & install

git clone https://github.com/yourusername/price-scout-agent.git
cd price-scout-agent

python -m venv venv
source venv/bin/activate       # Windows: venv\Scripts\activate

pip install -r requirements.txt
playwright install chromium    # install headless browser

2. Configure

cp .env.example .env
# Add ANTHROPIC_API_KEY at minimum

3. Set up Telegram alerts (free, 2 minutes)

  1. Message @BotFather on Telegram โ†’ /newbot โ†’ copy the token
  2. Start your bot (message it once)
  3. Get your chat ID: visit https://api.telegram.org/bot<TOKEN>/getUpdates
  4. Add to .env:
    TELEGRAM_BOT_TOKEN=your_token
    TELEGRAM_CHAT_ID=your_chat_id
    

4. Add your first product

python main.py --add
# Interactive prompts: name, URL(s), target price, drop threshold

5. Run dry-run (safe โ€” no alerts sent)

python main.py --dry-run

6. Go live

python main.py --live

7. Run continuously (check every hour)

python main.py --watch --live

โš™๏ธ CLI Reference

python main.py [OPTIONS]

Options:
  --watch           Run continuously (check every CHECK_INTERVAL minutes)
  --add             Interactively add a product to your watchlist
  --list            Show all products in your watchlist
  --remove ID       Remove a product from the watchlist
  --dry-run         Simulate โ€” no real alerts or purchases
  --live            Real alerts + purchases
  --interval INT    Check interval in minutes (overrides .env)

Examples:
  python main.py --list                     # see watchlist
  python main.py --add                      # add a product
  python main.py --dry-run                  # safe test run
  python main.py --watch --live             # continuous monitoring
  python main.py --remove demo001           # remove product

๐Ÿ”ง Watchlist Configuration

Each product in your watchlist supports:

{
  "id": "abc123",
  "name": "Sony WH-1000XM5",
  "urls": [
    "https://amazon.com/dp/B09XS7JWHH",
    "https://ebay.com/itm/123456"
  ],
  "target_price": 280.0,
  "drop_threshold": 10.0,
  "max_price": 350.0,
  "priority": "high",
  "auto_buy": false,
  "notes": "Been watching for months",
  "tags": ["audio", "electronics"]
}

โš ๏ธ Auto-Purchase Safety

Auto-purchasing is disabled by default. To enable it safely:

  1. Set AUTO_PURCHASE=true in .env
  2. Set MAX_AUTO_PURCHASE_USD=50 (hard ceiling โ€” never buys above this)
  3. Set auto_buy: true on specific watchlist items
  4. Claude must give the deal a score of 75+ before purchasing

Supported platforms for auto-purchase: Amazon (via saved browser session)


๐Ÿ”‘ API Keys & Cost

Service Used For Cost
Anthropic Claude Deal analysis + decisions ~$0.02โ€“0.05 per product per run
Playwright Price scraping Free
Telegram Bot API Push alerts Free
Gmail SMTP Email alerts Free

Estimated cost per run (10 products): ~$0.20โ€“0.50


๐Ÿค Contributing

Ideas welcome:

  • Daraz.pk support (Pakistan)
  • Camelcamelcamel integration (Amazon price history API)
  • Price chart visualization (matplotlib / plotly)
  • WhatsApp alerts via Twilio
  • Discord webhook support
  • Browser extension to add products from any page

๐Ÿ“„ License

MIT โ€” see LICENSE


๐Ÿ™‹ Author

Built by EnggTalha

โญ Star this repo if it saved you money!

About

An autonomous AI deal-hunting agent that monitors product prices, analyzes trends, sends alerts, and can safely auto-purchase when the right deal appears.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages