An AI-powered agent that automatically extracts product data from any supplier webpage and publishes it directly to your Shopify store — in under 20 seconds.
- 🌐 Works with ANY public product page URL
- 🧠 AI powered product data extraction (LLaMA 3.3 70B)
- 📸 Direct image extraction via Playwright
- 💰 Automatic price detection from any currency
- 📝 Auto generated SEO optimized descriptions
- 🛍️ One click Shopify publishing via REST API
- 🎨 Beautiful dark theme SaaS web UI
- 🔐 One time store setup, import forever
- 🔄 Self correcting retry loop (3 attempts)
- 🐳 Docker ready + Google Cloud Run deployable
User pastes Supplier URL
↓
[Flask Web App - app.py]
↓
[subprocess: run_pipeline.py]
↓
┌────────────┐
│ extractor │
│ .py │
│ │
│ Playwright │
│ Browser │
│ ↓ │
│ Screenshot │
│ + HTML │
│ ↓ │
│ Groq AI │
│ LLaMA 3.3 │
│ ↓ │
│ Pydantic │
│ Validation │
└────────────┘
↓
┌────────────┐
│ navigator │
│ .py │
│ │
│ Shopify │
│ Admin API │
└────────────┘
↓
Live Product Listing ✅
| Tool | Purpose |
|---|---|
| Python 3.11 | Core language |
| Flask | Web application framework |
| Playwright | Browser automation + screenshots |
| Groq (LLaMA 3.3 70B) | AI product data extraction |
| Pydantic | Data validation + self correction |
| Shopify Admin REST API | Product publishing |
| subprocess | Safe async pipeline execution |
| Docker | Containerization |
| Google Cloud Run | Cloud deployment |
git clone https://github.com/skypank-coder/Ecom-agent.git
cd ecom-agentpip install -r requirements.txt
playwright install chromiumcp .env.example .envFill in your credentials in .env:
GROQ_API_KEY=your_groq_api_key
SHOPIFY_STORE_URL=your-store.myshopify.com
SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxx
SUPPLIER_URL=https://any-product-page-url.com
python src/app.pyhttp://localhost:5000
- Enter your Shopify store URL + access token once
- Paste any supplier product URL
- Click Import — done in 20 seconds! 🎉
- Go to https://partners.shopify.com → create free account
- Create a Development Store
- Inside store: Settings → Apps → Develop Apps
- Click Allow custom app development
- Create app → Configure Admin API scopes
- Enable:
write_products,read_products,write_files,read_files - Click Install App → Reveal token once
- Copy token starting with
shpat_...
ecom-agent/
├── src/
│ ├── extractor.py # Playwright + Groq AI extraction
│ ├── navigator.py # Shopify API publisher
│ ├── app.py # Flask web application
│ └── run_pipeline.py # Subprocess pipeline runner
├── templates/
│ ├── setup.html # One time store connection UI
│ └── dashboard.html # Product import dashboard
├── .env # Your credentials (never commit!)
├── .env.example # Template for credentials
├── .gitignore
├── requirements.txt
├── Dockerfile
└── README.md
Playwright launches a headless Chromium browser, navigates to the supplier URL, waits for full page load, and:
- Takes a full page screenshot
- Extracts complete page HTML
- Directly scrapes all image URLs from img tags
- Directly extracts price using smart CSS selectors
Groq's LLaMA 3.3 70B model analyzes the HTML and extracts:
- Product name
- Price (with currency)
- Image URLs
- SEO optimized description (3 sentences)
- Key features (3-5 bullet points)
Pydantic validates the AI response against a strict schema. If validation fails, the agent automatically retries up to 3 times with a fresh extraction. All non-ASCII characters are sanitized to prevent encoding errors.
Shopify Admin REST API creates a complete product listing:
- Title + SEO description
- Price + variants
- Product images (directly uploaded to Shopify CDN)
- Tags: ai-generated, ecom-agent
- Status: active (immediately live)
Web UI displays:
- Product image preview
- Product name + price
- Direct link to Shopify listing
- Import history (last 5 products)
One time store connection — enter your Shopify credentials once and never again.
Clean import interface — just paste a URL and watch the agent work in real time with live progress updates.
docker build -t ecom-agent .
docker run -p 5000:5000 --env-file .env ecom-agentgcloud auth login
gcloud config set project YOUR_PROJECT_ID
gcloud run deploy ecom-agent \
--source . \
--region us-central1 \
--memory 2Gi \
--timeout 120- Bulk import (multiple URLs at once)
- WooCommerce + other platform support
- Price comparison across suppliers
- Scheduled auto import
- Inventory tracking
- Competitor price monitoring
- Gemini vision for screenshot based extraction
- Product variant detection (sizes, colors)
This project runs completely free:
- Groq API — 14,400 requests/day free
- Shopify Partner — Development stores free
- Google Cloud Run — 2M requests/month free
- Playwright — completely open source
Saatwik Kumar Yadav — CSE Student & Full Stack Developer
MIT License — feel free to use and modify!