"It's not just a dashboard. It's a digital workforce that never sleeps."
AutoAgent is a next-generation e-commerce intelligence platform that deploys a fleet of specialized AI agents to autonomously manage inventory, recover abandoned revenue, process orders intelligently, and answer business questions through a conversational multimodal interface.
๐ Live Demo ยท ๐ Features ยท ๐๏ธ Architecture ยท โก Quick Start
Running an e-commerce operation means drowning in operational overhead:
- Abandoned carts silently drain 70%+ of potential revenue โ and no one sends the right email at the right time
- Dead stock ties up capital while low stock causes lost sales, both requiring constant manual monitoring
- Order communications (VIP thank-yous, return risk outreach, shipping updates) are repetitive yet critical
- Business questions ("What's my best-selling product this week?") require navigating 3 different tools to answer
AutoAgent collapses all of this into a single, AI-native command center.
The revenue rescue engine. AutoAgent continuously monitors cart activity and triggers intelligent recovery sequences:
- Intelligent Detection: Automatically flags carts that have gone cold, ranked by recovery potential
- Adaptive Strategy based on cart value:
- High-Value Carts (> $100) โ Generates a personalized, exclusive 15% discount code to overcome hesitation
- Standard Carts โ Crafts urgency-driven copy focused on product value and FOMO
- One-Click Dispatch: Drafts a complete, personalized recovery email and sends it instantly โ no copy-paste needed
- Recovery Tracking: Carts are tagged
recoveredonce actioned, giving a clean pipeline view
Transforms passive inventory tables into an active intelligence layer:
- Dead Stock Analysis: Flags products with declining velocity and automatically drafts Flash Sale campaigns to liquidate stock and free up cash flow
- Low Stock Alerts: Detects SKUs approaching critical thresholds and generates ready-to-send vendor reorder requests with quantity recommendations
- Visual Product Cards: Rich, interactive card UI replaces static tables โ each card shows stock level, status badge, last sold date, and available actions at a glance
- Stock Status Classification: Products are continuously classified as
In Stock/Low Stock/Out of Stockbased on live inventory data
Turns order fulfillment into a relationship-building engine:
- VIP Recognition: Detects high Lifetime Value (LTV) customers โ defined by multi-item, high-value orders โ and auto-drafts personalized "Thank You" notes to deepen loyalty
- Return Risk Management: When a return is processed, AutoAgent proactively drafts a retention email designed to address the likely root cause and reduce churn
- Fulfillment Updates: Automates shipping status communications for pending and in-transit orders, keeping customers informed without manual effort
- Order Status Board: Full order panel with status filters (
Pending,Shipped,Delivered,Returned) and one-click AI actions on each
A multimodal AI chat interface that acts as your always-on business analyst:
- Context-Aware Conversations: The AI has full awareness of your live inventory levels, order statuses, and sales trends โ ask it anything
- Rich UI Widgets: Unlike generic chatbots, AutoAgent renders visual Product Cards, Order Summaries, and Action Buttons directly inside the chat thread โ results you can act on, not just read
- Agentic Tool Calls: The AI can query inventory, flag orders for action, and surface recommendations all within a single conversation turn
- Markdown Rendering: Responses support full GFM (tables, code blocks, lists) via
react-markdown+remark-gfm
The command center home screen:
- Weekly Revenue Chart: Recharts-powered bar graph showing daily revenue and units sold for the past 7 days
- KPI Strip: Live counters for Total Revenue, Orders Processed, Active Alerts, and Recovery Rate
- Alert Feed: Consolidated live feed of inventory warnings and cart recovery opportunities across the store
| Category | Technology | Version | Purpose |
|---|---|---|---|
| UI Framework | React | 19.2 |
Component-based UI with concurrent rendering |
| Language | TypeScript | 5.8 |
Full type safety across agents, services, and UI |
| AI Core | Google Gemini (@google/genai) |
1.30 |
LLM powering all agent reasoning and generation |
| Database | Supabase (@supabase/supabase-js) |
2.91 |
PostgreSQL backend for real-time data persistence |
| State Management | Zustand | 5.0 |
Lightweight global state for UI and data layers |
| Charts | Recharts | 3.5 |
Declarative, composable analytics visualizations |
| Date Utilities | date-fns | 4.1 |
Lightweight, tree-shakeable date handling |
| Icons | Lucide React | 0.555 |
Consistent, accessible SVG icon system |
| Markdown | react-markdown + remark-gfm | 10.x |
Rich text rendering in the chat interface |
| Build Tool | Vite | 6.2 |
Sub-second HMR dev server and optimized builds |
| Deployment | Netlify | โ | Zero-config static site delivery with CDN |
AutoAgent is built on a services-layer + component-layer separation. UI components never call the AI directly โ they delegate to purpose-built agent services that encapsulate all business logic and LLM prompting.
AutoAgent Application
โ
โโโ ๐งฉ UI Layer (components/)
โ โโโ Layout.tsx # App shell, sidebar navigation, view router
โ โโโ Dashboard.tsx # Executive Briefing Room โ KPIs, charts, alerts
โ โโโ Inventory.tsx # Inventory Commander โ product cards, stock alerts
โ โโโ Orders.tsx # Smart Order Processor โ order board, VIP actions
โ โโโ RecoveryAgent.tsx # Abandoned Cart Recovery โ cart pipeline, email drafts
โ โโโ ChatAgent.tsx # AutoAgent Command Center โ multimodal AI chat, widgets
โ
โโโ ๐ค Agent Services Layer (services/)
โ โโโ geminiService.ts # Gemini API client โ base LLM call abstraction
โ โโโ aiService.ts # General AI service โ chat routing, context injection
โ โโโ recoveryAgent.ts # Cart recovery logic โ value segmentation, email generation
โ โโโ inventoryAgent.ts # Inventory intelligence โ dead stock, reorder drafting
โ โโโ orderAgent.ts # Order intelligence โ VIP detection, retention emails
โ
โโโ ๐ Shared Types (types.ts)
โ โโโ Product, Order, Cart, ChatMessage, SalesData, ViewState
โ
โโโ ๐ Mock Data (constants.ts)
โโโ MOCK_PRODUCTS, MOCK_ORDERS, MOCK_CARTS, SALES_DATA
User Action (e.g., "Recover this cart")
โ
โผ
UI Component (RecoveryAgent.tsx)
โ
โผ
Agent Service (recoveryAgent.ts)
โโโ Segments cart by value (> $100 = VIP tier)
โโโ Builds context-rich prompt with cart data
โโโ Calls Gemini API via geminiService.ts
โ
โผ
Gemini LLM Response
โ
โผ
Parsed & Typed Output โ Rendered in UI
(Email draft displayed, action button activated)
- Node.js
18+and npm9+ - A Google Gemini API Key (free tier available at ai.google.dev)
- (Optional) A Supabase project for real data persistence
# 1. Clone the repository
git clone https://github.com/Ismail-2001/E-commerce-Automation-Agent.git
cd E-commerce-Automation-Agent
# 2. Install all dependencies
npm install
# 3. Configure environment variables
cp .env.example .envEdit .env and add your credentials:
# Required โ Google Gemini AI Core
VITE_GEMINI_API_KEY=your_gemini_api_key_here
# Optional โ Supabase for real data persistence
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here# 4. Start the development server
npm run devThe app will be live at http://localhost:5173 ๐
| Script | Command | Description |
|---|---|---|
| Dev Server | npm run dev |
Vite HMR dev server on port 5173 |
| Production Build | npm run build |
TypeScript compile + Vite bundle |
| Preview Build | npm run preview |
Locally serves the production bundle |
E-commerce-Automation-Agent/
โ
โโโ components/
โ โโโ Layout.tsx # App shell, sidebar, navigation state
โ โโโ Dashboard.tsx # Home โ KPIs, Recharts revenue graph, alerts
โ โโโ Inventory.tsx # Product cards, stock status, AI actions
โ โโโ Orders.tsx # Order board with status filters and AI tools
โ โโโ RecoveryAgent.tsx # Cart recovery pipeline and email composer
โ โโโ ChatAgent.tsx # Multimodal AI chat with rich widget rendering
โ
โโโ services/
โ โโโ geminiService.ts # Base Gemini API client and call abstraction
โ โโโ aiService.ts # Context-aware AI routing for the chat interface
โ โโโ recoveryAgent.ts # Cart segmentation + recovery email generation
โ โโโ inventoryAgent.ts # Dead stock detection + reorder request drafting
โ โโโ orderAgent.ts # VIP detection + retention email generation
โ
โโโ App.tsx # Root component and view state management
โโโ types.ts # Shared TypeScript interfaces (Product, Order, Cart...)
โโโ constants.ts # Mock seed data for development
โโโ index.tsx # React DOM entry point
โโโ index.html # HTML shell
โโโ netlify.toml # Netlify deployment configuration
โโโ vite.config.ts # Vite build and plugin configuration
โโโ package.json # Dependencies and scripts
The project ships with a pre-configured netlify.toml. Deployment is one command.
Via Netlify UI:
- Push to GitHub
- Go to Netlify โ Add new site โ Import from GitHub
- Select your fork โ Netlify auto-detects the build config:
- Build Command:
npm run build - Publish Directory:
dist
- Build Command:
- Add environment variables in Site Settings โ Environment Variables
- Click Deploy โ
Via Netlify CLI:
npm install -g netlify-cli
netlify login
npm run build
netlify deploy --prod --dir=dist- Agentic cart recovery with adaptive value-based strategy
- Inventory dead stock detection and flash sale drafting
- Low stock alerts with reorder request generation
- VIP order recognition and personalized outreach
- Return risk retention email automation
- Multimodal AI chat with rich UI widgets
- Recharts analytics dashboard with weekly revenue data
- Netlify deployment with CI/CD
- Supabase Integration: Replace mock data with live PostgreSQL database
- Real-time Subscriptions: Use Supabase Realtime for live inventory updates
- Email Service: Connect Resend or SendGrid to actually send recovery emails
- Auth: User authentication for multi-merchant workspaces
- Voice Mode: Speak to your store using the Web Speech API
- Product Image Analysis: Upload product photos for AI-powered listing suggestions
- Demand Forecasting: Predict stock needs based on sales velocity trends
- Shopify / WooCommerce Connector: Plug into real storefronts via API
- Independent pricing agent for dynamic price optimization
- Supplier management agent for automated vendor negotiations
- Marketing agent for ad copy generation and campaign briefing
- Cross-agent collaboration for end-to-end autonomous operations
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name
- Commit using Conventional Commits:
git commit -m "feat: add shopify connector service" - Push and open a Pull Request against
main
Distributed under the MIT License. See LICENSE for details.
Built to make autonomous commerce the default, not the exception.
If AutoAgent changed how you think about e-commerce operations, consider starring โญ the repo.
Built with โค๏ธ by Ismail Sajid