Skip to content

Latest commit

ย 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

IKEA Shopping Assistant ๐Ÿ›‹๏ธ๐Ÿค–

A conversational AI shopping assistant for IKEA that combines natural language understanding, semantic search, and browser automation to create an intelligent, clickless cart management experience.

Python Flask Playwright LangGraph


โœจ Features

๐ŸŽฏ Smart Clarification Flow (NEW!)

  • Vague Query Detection: Automatically detects queries like "looking for chairs" without details
  • Interactive Chips: Clickable options for chair type, price range, and colors
  • Multi-Turn Conversations: Understands refinements like "less than $250" after showing results
  • Context Awareness: Remembers previous searches and merges new constraints

๐Ÿ›’ Intelligent Cart Operations

  • Natural Language: Say "add the ergonomic chair with armrests" instead of "add the first one"
  • LLM-Powered Matching: Semantic understanding of product descriptions
  • Automated Actions: Browser automation adds/removes items automatically
  • Video Recordings: Every cart action recorded with split-screen display
  • Cart Total Calculation: Ask "what's my cart total?" for detailed breakdown

๐ŸŽฅ Split-Screen UI (NEW!)

  • Dynamic Layout: Chat (60%) + Video Panel (40%) during cart operations
  • Closeable Panel: ร— button returns to full-width chat
  • Smooth Transitions: 0.3s animations for professional feel
  • Auto-Detection: Videos automatically extracted to side panel

๐Ÿ” RAG-Powered Search

  • Semantic Search: Find products using natural language
  • Hybrid Matching: Combines keyword and vector search
  • Smart Filtering: Price range, colors, features extraction
  • ChromaDB: Fast vector similarity search

๐Ÿ’ฌ Conversational Interface

  • Context Awareness: Remembers previous searches and cart items
  • Product Cards: Beautiful HTML product displays with images
  • Formatted Responses: HTML formatting with emphasis and bullet points
  • Session Management: Persistent state across interactions

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.11+
  • Google API Key (for Gemini LLM)
  • Chromium/Chrome (for Playwright)

Installation

  1. Clone the repository
git clone <your-repo-url>
cd ClickelssUI
  1. Install dependencies
pip install -r requirements.txt
  1. Install Playwright browsers
playwright install chromium
  1. Set up environment variables
cp .env.example .env
# Edit .env and add your GOOGLE_API_KEY
  1. Run the application
python web/app.py
  1. Open your browser
http://127.0.0.1:5000

๐Ÿ’ก Usage Examples

Clarification Flow

You: "looking for chairs"
Agent: [Shows interactive chips for type, price, color]
You: [Clicks "Office chair" and "Under $200"]
Agent: [Displays filtered results]

Multi-Turn Refinement

You: "office chairs with armrests"
Agent: [Shows 5 results]
You: "less than $250"
Agent: [Refines results to show only chairs under $250]

Cart Total

You: "what's my cart total?"
Agent: Your cart has:
       โ€ข FLINTAN Office chair - $139.00
       
       Subtotal: $139.00
       Tax (8%): $11.12
       TOTAL: $150.12

Smart Product Selection

You: "add the chair with lumbar support"
Agent: โœ… Added MARKUS Office chair to cart!
       [Split-screen shows video of action]

๐Ÿ“ Project Structure

ClickelssUI/
โ”œโ”€โ”€ agent/                     # AI Agent Layer
โ”‚   โ”œโ”€โ”€ ikea_agent.py         # Main conversational agent
โ”‚   โ”œโ”€โ”€ product_resolver.py   # LLM product matching
โ”‚   โ”œโ”€โ”€ rag_tool.py           # RAG search interface
โ”‚   โ””โ”€โ”€ tools/cart_tools.py   # Cart operation tools
โ”‚
โ”œโ”€โ”€ automation/                # Browser Automation
โ”‚   โ”œโ”€โ”€ browser_manager.py    # Playwright session management
โ”‚   โ””โ”€โ”€ ikea_cart.py          # Cart automation + video recording
โ”‚
โ”œโ”€โ”€ scraper/                   # Data Collection
โ”‚   โ”œโ”€โ”€ ikea_scraper.py       # Web scraper
โ”‚   โ”œโ”€โ”€ rag_manager.py        # ChromaDB manager
โ”‚   โ””โ”€โ”€ data_processor.py     # Data cleaning
โ”‚
โ”œโ”€โ”€ web/                       # Web Interface
โ”‚   โ””โ”€โ”€ app.py                # Flask application
โ”‚
โ”œโ”€โ”€ data/                      # Product Data
โ”‚   โ”œโ”€โ”€ raw/                  # Scraped JSON
โ”‚   โ””โ”€โ”€ chroma_db/            # Vector embeddings
โ”‚
โ””โ”€โ”€ tests/                     # Test Suite
    โ”œโ”€โ”€ test_product_selection_simple.py
    โ””โ”€โ”€ test_remove_from_cart.py

๐Ÿ› ๏ธ Technology Stack

Core Technologies

  • Python 3.11 - Main language
  • Flask 3.1 - Web framework
  • Playwright 1.47 - Browser automation

AI/LLM

  • Google Gemini 2.5 Flash - Primary LLM
  • LangGraph 0.2 - Agent orchestration
  • LangChain Core - Tool integration

Data & Search

  • ChromaDB 0.5 - Vector database
  • ONNX Embeddings - Default embedding model
  • Semantic Search - Hybrid keyword + vector

๐Ÿ”ง Configuration

Environment Variables (.env)

# Required
GOOGLE_API_KEY=your_gemini_api_key_here

# Optional (for OpenAI embeddings)
OPENAI_API_KEY=your_openai_key_here

Application Settings

  • Port: 5000 (default)
  • Debug Mode: Enabled in development
  • Session Storage: File-based (flask_session/)
  • Video Storage: videos/ (auto-created, cleared on restart)
  • Screenshot Storage: screenshots/ (auto-created)

๐Ÿ“Š Key Metrics

Metric Performance
Product Search < 1 second
LLM Processing ~1-2 seconds
Cart Operations ~5-8 seconds
Video Recording Real-time
Multi-Turn Refinement < 1 second

๏ฟฝ Recent Updates

Version 3.0 - Enhanced Conversations (November 2025)

  • โœ… Clarification flow for vague queries with interactive chips
  • โœ… Multi-turn conversation with refinement support
  • โœ… Cart total calculation via LLM with detailed breakdown
  • โœ… Split-screen UI with closeable video panel
  • โœ… Improved follow-up formatting with HTML and product cards

Version 2.0 - LLM Product Selection

  • โœ… Natural language product matching
  • โœ… Confidence-based decision making
  • โœ… Automatic clarification for ambiguous queries
  • โœ… Comprehensive test suite (5/5 passing)

Version 1.0 - Initial Release

  • โœ… RAG-powered product search
  • โœ… Browser automation with Playwright
  • โœ… Video recording of cart actions
  • โœ… Flask web interface

๐Ÿšง Known Limitations

  1. Single Session: Only one user session supported at a time
  2. IKEA Website Changes: May break if IKEA updates their UI
  3. Browser State: Requires manual login to IKEA first (cookies persist)
  4. Video Storage: Videos cleared on server restart

๐Ÿ”ฎ Future Enhancements

  • Multi-category support (beyond chairs)
  • User preference learning
  • Price tracking and alerts
  • Image-based product search
  • Multi-language support
  • Voice interface
  • Mobile app

๐Ÿ“š Documentation


๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

๐Ÿ“ License

This project is for educational purposes. Please respect IKEA's terms of service and robots.txt.


๐Ÿ™ Acknowledgments

  • LangChain - Agent framework
  • LangGraph - State machine orchestration
  • Playwright - Browser automation
  • ChromaDB - Vector database
  • Google Gemini - LLM capabilities

๐Ÿ“ง Support

For issues or questions:

  1. Check existing issues
  2. Review documentation
  3. Create a new issue with details

Built with โค๏ธ using LLMs, RAG, and Browser Automation

Version: 3.0.0
Last Updated: November 2025
Status: โœ… Production Ready

About

AI-powered clickless shopping assistant for IKEA using LLMs, RAG, and browser automation

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages