Transforming E-Commerce Optimization with Autonomous AI Agents
- Overview
- Inspiration
- Features
- Architecture
- Tech Stack
- Getting Started
- How It Works
- Challenges
- Accomplishments
- What We Learned
- Future Roadmap
- Team
- License
HALT is an innovative AI-powered platform that revolutionizes e-commerce A/B testing by creating realistic customer simulations. Instead of waiting weeks for real user data, businesses can now test store layouts and optimizations in minutes using autonomous AI agents that mimic diverse customer behaviors and preferences.
🔗 View Full Project on Devpost
Companies spend $1.5 billion annually on A/B testing in the United States alone. Industry leaders like Shopify and Amplitude constantly optimize e-commerce platforms, knowing that even a 0.1% boost in engagement can generate hundreds of thousands of dollars in additional revenue.
Our team aims to revolutionize this process by leveraging AI to:
- Accelerate testing cycles from weeks to hours
- Reduce costs associated with traditional A/B testing
- Enable data-driven decisions before production deployment
- Simulate diverse customer personas with realistic behaviors
- Store Manager Agent: Analyzes analytics and optimizes store layouts automatically
- Customer Agents: Simulate realistic shoppers with diverse personalities, goals, and behaviors
- 10 Unique Personas: From budget-conscious browsers to tech-savvy comparison shoppers
- Track customer interactions, browsing patterns, and purchase behaviors
- MongoDB integration for comprehensive event logging
- Visual feedback dashboard for store optimization results
- AI-powered category organization
- Responsive React-based storefront
- Real-time layout updates based on customer feedback
- Store Manager reviews analytics → proposes layout changes
- Customer agents test new layout → provide detailed feedback
- System iterates automatically to find optimal configurations
graph TB
subgraph "Frontend Layer"
A[React + Vite Storefront]
A1[Event Tracking System]
end
subgraph "Backend Layer"
B[Express + TypeScript API]
C[(MongoDB Database)]
end
subgraph "AI Agent Layer"
D[Store Manager AI<br/>Gemini Flash]
E[Customer AI Agents<br/>Gemini Flash + Browser Use]
end
subgraph "Feedback System"
F[FastAPI Feedback Server]
G[Real-time Display Dashboard]
end
A -->|User Events| A1
A1 -->|Analytics| B
B <-->|Store/Retrieve Data| C
D -->|Fetch Analytics| B
D -->|Update Layout| B
D -->|Trigger Tests| E
E -->|Browse Store| A
E -->|Submit Feedback| F
F -->|Display Results| G
D -->|Review Feedback| F
style A fill:#61DAFB,stroke:#333,stroke-width:2px
style B fill:#68A063,stroke:#333,stroke-width:2px
style C fill:#13AA52,stroke:#333,stroke-width:2px
style D fill:#4285F4,stroke:#333,stroke-width:2px
style E fill:#DB4437,stroke:#333,stroke-width:2px
style F fill:#00A67E,stroke:#333,stroke-width:2px
| Component | Technology | Purpose |
|---|---|---|
| Frontend | React + TypeScript + Vite | Customer-facing e-commerce storefront with event tracking |
| Backend | Express + TypeScript + MongoDB | RESTful API for layout management and analytics storage |
| Store Manager AI | Python + Gemini Flash | Autonomous agent that optimizes store layouts based on data |
| Customer AI Agent | Python + Gemini Flash + Browser Use | Simulates diverse customer behaviors and provides feedback |
Before running HALT locally, ensure you have:
- Node.js (v18 or higher) and npm
- Python (3.9 or higher)
- MongoDB instance (local or cloud)
- Google Gemini API key (Get one here)
- Playwright browsers installed
-
Clone the repository
git clone https://github.com/leungt30/HALT.git cd HALT -
Set up Python virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -r requirements.txt
-
Install Playwright browsers
playwright install
-
Install frontend dependencies
cd frontend npm install cd ..
-
Install backend dependencies
cd backend npm install cd ..
-
Configure environment variables
Create
.envfiles in the following directories:backend/.envMONGODB_URI=your_mongodb_connection_string PORT=3000
store-manager-ai/.envGEMINI_API_KEY=your_gemini_api_key BACKEND_URL=http://localhost:3000 FRONTEND_URL=http://localhost:5173
customer-ai-agent/.envGEMINI_API_KEY=your_gemini_api_key FRONTEND_URL=http://localhost:5173
HALT consists of 4 independent services that work together. You can run them individually or use the optimization loop script.
cd backend
npm run dev- Runs on:
http://localhost:3000 - Provides: RESTful API for layout management and analytics
cd frontend
npm run dev- Runs on:
http://localhost:5173 - Provides: Customer-facing e-commerce interface
cd customer-ai-agent
source ../.venv/bin/activate
uvicorn server:app --host 0.0.0.0 --port 8000- Runs on:
http://localhost:8000 - Provides: API endpoint to spawn customer simulations
cd store-manager-ai
source ../.venv/bin/activate
python agent.py- Autonomous agent that:
- Fetches analytics from backend
- Proposes layout optimizations
- Triggers customer simulations
- Reviews feedback and iterates
For a complete demonstration, use the included orchestration script:
chmod +x run_optimization_loop.sh
./run_optimization_loop.shThis script will:
- ✅ Start the Feedback Display Server (
http://localhost:8001) - ✅ Open a Chrome window showing real-time feedback
- ✅ Launch the Customer AI Agent Service
- ✅ Start the Store Manager AI optimization loop
Note: The script uses Vercel production endpoints for frontend/backend by default. To use local instances, modify the environment variables in the script.
-
Store Manager Analyzes
- Fetches customer event data from MongoDB
- Reviews metrics like bounce rates, category engagement, scroll depth
- Identifies optimization opportunities
-
Layout Proposal
- AI generates a new store layout hypothesis
- Reorganizes categories, products, and promotional content
- Updates layout via backend API
-
Customer Simulation
- Spawns 10 AI customer agents with diverse personas
- Each agent navigates the store with specific goals:
- Quick purchase vs. browsing
- Budget-conscious vs. feature-focused
- Tech-savvy vs. low technical skill
- Agents use Browser Use to interact naturally with the UI
-
Feedback Collection
- Each customer agent provides structured feedback:
- Shopping experience rating
- Ease of finding products
- Layout intuitiveness
- Visual appeal
- Feedback aggregated and displayed in real-time
- Each customer agent provides structured feedback:
-
Iteration
- Store Manager reviews feedback
- Proposes refined layout based on insights
- Cycle repeats until optimal performance achieved
One of our main challenges was creating a reliable workflow between multiple autonomous agents and establishing robust data flows throughout the system.
Key difficulties:
- Agentic Architecture: With multiple autonomous agents making decisions based on user behavior, determining how events should be collected, stored, and retrieved required careful design
- Meaningful Data Collection: Ensuring the storefront tracked metrics that were actionable for the Store Manager LLM
- LLM Integration: Our lack of prior experience with agentic architecture led to many early iterations where the manager lacked sufficient data for meaningful changes
- System Synchronization: Coordinating the Store Manager calling the backend → triggering customer agents → agents browsing the site → events generated → feedback collected → manager reviews
Integrating LLMs with decision-making into a traditional web stack required significant experimentation and exploration, ultimately making us stronger engineers.
We're proud of:
✅ Successfully integrating agentic LLMs into a live web environment, demonstrating their potential beyond traditional chatbot interfaces
✅ Designing and deploying a robust full-stack pipeline with clear data flows between 4 independent services
✅ Creating realistic customer simulations with 10 diverse personas that accurately mimic human shopping behaviors
✅ Delivering real-world impact potential for e-commerce operations and user shopping experiences
We gained deeper insights into:
- System Design: The importance of planning interactions between autonomous components before implementation
- Agentic Workflows: Managing complex state machines where agents operate independently yet collaboratively
- Data Flow Architecture: Designing event systems that capture meaningful, actionable insights
- LLM Prompt Engineering: Crafting effective prompts for autonomous decision-making vs. conversational AI
- Iterative Development: Embracing design overhauls as learning opportunities rather than setbacks
A large portion of our time was spent planning how our system would interact with itself—these discussions led to invaluable lessons about distributed AI systems.
Planned enhancements include:
- Recommendation System: Offer complementary goods based on user actions within shopping sessions
- Granular Event Tracking: More detailed customer interaction metrics
- Session-based Learning: Adapt recommendations dynamically during browsing
- Sales & Promotions: Allow Store Manager to create and test promotional campaigns
- Trend Research: Enable agents to research current trends online and adjust inventory
- A/B Test Comparison: Side-by-side testing of multiple layouts simultaneously
- Custom Persona Creation: Allow businesses to define their own customer archetypes
- Multi-store Management: Support for testing across multiple storefronts
- Integration APIs: Connect with Shopify, WooCommerce, and other platforms
HALT was built by our passionate team at UofTHacks 13:
|
Timothy Leung CS @ Mac |
Loic Wedji CS @ Brock |
Hilary He DevOps @ RBC | CS @ Mac |
![]() Alaqmar Gandhi DevOps @ RBC | CS @ BrockU |
This project was created for UofTHacks 13. See the repository for license details.
