💡 Inspiration
Walk down any street in India or into any neighborhood bodega, and you will witness the authentic soul of commerce: conversation and human connection. Shoppers don't navigate rigid dropdown menus or hunt for coupon codes. They talk to the shopkeeper: "Bhau, give me 5 kg of fresh atta and a liter of sunflower oil—can you do ₹320 for both?" The shopkeeper smiles, calculates the margin in their head, and agrees with a bundle deal.
When quick-commerce conglomerates entered the market, they flattened this vibrant human experience into cold, sterile grids while charging independent merchants crippling platform commissions. Local kirana stores operate on razor-thin net margins of 12% to 18%. When packing fast-moving grocery orders, if an item is out of stock or packed incorrectly, the merchant faces dispute chargebacks, manual refunds, and lost customer trust.
We asked ourselves: Why should quick commerce destroy the neighborhood store when technology can empower it?
We built CartSettle to bring the authentic charm, voice interaction, and natural bargaining of the local kirana store online—fortified with enterprise-grade autonomous intelligence and a self-healing, zero-downtime AI engine.
⚙️ How We Built It
CartSettle is built as a unified, real-time tri-party ecosystem connecting Shoppers, Store Owners, and Delivery Partners:
- The Autonomous 4-Tier Zero-Downtime AI Engine
In commerce, an AI timeout or rate limit means lost revenue. Rather than relying on a fragile single LLM API, we engineered a resilient, self-healing 4-Tier Failover Cascade:
Tier 1 (Google Gemini Core): Uses high-throughput models (gemini-flash-lite-latest) for multi-turn agentic reasoning, colloquial speech normalization, and dynamic tool execution. Tier 2 (Google Gemini Backup): An automated pool of secondary credentials and fallback candidate models that activate immediately if Tier 1 encounters traffic spikes or temporary 429 quota limits. Tier 3 (Groq Cloud LPU Engine): When cloud provider outages occur, requests seamlessly reroute to Groq's high-speed inference processing units (openai/gpt-oss-120b, gpt-oss-20b, and qwen/qwen3.8-27b), converting tool schemas on the fly and delivering completions in under 800 ms. Tier 4 (CartSettle Local Deterministic Engine): An in-memory catalog search and cart manipulation safety net that guarantees uninterrupted shopping and checkout even if all external cloud networks go dark.
- The Margin-Guarded Bargaining Engine
To prevent price negotiation from eroding merchant profitability, we built an autonomous pricing safeguard. When a shopper offers a custom counter-price, the engine dynamically checks the product's wholesale cost and the store owner's minimum margin threshold. If the customer's offer is profitable, the deal is instantly locked and applied to the cart. If the requested price falls below cost, the AI agent conversationally negotiates a fair middle ground or suggests a high-margin bundle deal (e.g., "Take 3 packs for ₹135"), ensuring the store never sells at a loss.
- Multimodal Computer Vision Packing Station
To eradicate missing item disputes, the merchant points their device camera at the packed grocery bag before handover. Multimodal vision models audit the physical packages against the database order manifest, highlighting discrepancies on screen in real time before courier dispatch.
- The Modern Tech Stack Frontend: React, Tailwind CSS, Lucide icons, Web Speech API with real-time audio visualization, and AG Grid Enterprise for merchant inventory management. Backend: Django REST Framework, Neon Serverless PostgreSQL, Celery, and custom multi-model agentic middleware. Hosting: Global Edge CDN delivery via Vercel (Frontend) and Render (Backend). 🚧 Challenges We Faced
The Single-Provider Quota Cliff: During active testing, external LLM endpoints frequently hit API rate limits or sudden 404 deprecations on legacy models. Solving this inspired our crowning architectural achievement: the 4-Tier Cascade. We implemented active cooldown trackers and dynamic schema converters so that failover from Google Gemini to Groq LPU happens invisibly to the shopper with zero latency penalty.
Balancing Negotiation Flexibility with Merchant Safety: Teaching an AI agent to bargain conversationally like an Indian shopkeeper without hallucinating absurdly low prices required strict architectural guardrails. We decoupled the conversation model from price mutation, enforcing all discounts through deterministic backend margin validators.
Colloquial Multilingual Term Normalization: Real shoppers use mixed dialects (e.g., "do packet doodh", "1 kg atta", "haldi", "poha"). We built an intelligent phonetic and semantic resolver that maps regional colloquialisms to canonical catalog SKUs with unit-quantity extraction.
🎓 What We Learned Agentic Commerce Must Be Grounded in Unit Economics: An AI shopping assistant is only as good as the profit margins it protects. Autonomous systems must serve the merchant's bottom line just as much as the shopper's convenience. Architectural Resilience Trumps Single-Model Hype: Production AI applications cannot depend on a single API key or cloud provider. Multi-provider orchestration—pairing Google Gemini's multimodal reasoning with Groq's hardware-accelerated inference—is the blueprint for zero-downtime applications. Local Retail Has an Unbeatable Advantage: When independent grocers are equipped with accessible voice AI, vision auditing, and automated dispatch, their hyper-local proximity and personal touch easily outperform warehouse-based corporate competitors.
Built With
- ag-grid
- agentic-ai
- artificial-intelligence
- computer-vision
- django
- e-commerce
- fintech
- google-gemini
- groq
- javascript
- multimodal-ai
- neon-db
- paypal
- postgresql
- python
- quick-commerce
- react
- redis
- render
- rest-api
- tailwind-css
- vercel
- vite
- voice-ai
- web-speech-api