💡 Inspiration

Procuring specialized developer and machine learning hardware—such as laptops for local LLM inference, PyTorch model training, and heavy compilation—is one of the highest-friction, highest-regret purchase journeys in e-commerce:

  1. Deceptive Hardware Specifications: A laptop marketed with an "RTX 4060" can perform drastically differently depending on its Total Graphics Power (TGP)—an unrestricted $115\text{W} - 140\text{W}$ TGP laptop runs PyTorch tensor operations over $40\%$ faster than a thermally choked $45\text{W}$ thin-and-light variant with the exact same chip name.
  2. The "50 Open Tabs" Exhaustion: Buyers spend hours cross-referencing soldered RAM limits, thermal dissipation headrooms, and benchmark scores across disparate vendor websites.
  3. The Dangerous Extremes of AI Shopping: Existing AI commerce agents either act as passive chatbots that regurgitate generic affiliate links without transaction power, or reckless unconstrained auto-buyers that store raw payment credentials and execute charges in the background without oversight—a catastrophic regulatory and security liability.

We built PayPilot AI to resolve this dilemma: giving autonomous AI agents full intelligence to discover, benchmark, and stage complex hardware purchases, while enforcing an unbreakable, mathematically verified Human-in-the-Loop financial boundary powered by official PayPal rails.


🚀 What It Does

PayPilot AI is an autonomous multi-agent commerce platform with real-time hardware benchmarking, cryptographic price locking, PayPal v2 settlement, and interactive Bryntum logistics fulfillment:

  • Natural Language Hardware Discovery: Users express complex, multi-variable constraints in natural language ("Find me a machine for local LLM fine-tuning under ₹85,000 with upgradeable memory").
  • Multi-Agent Evaluation Swarm: Four specialized AI agents (Supervisor, Research, Hardware Analyst, and Guardrail) collaborate to extract constraints, normalize local currencies, benchmark thermal design power (TGP), and score candidates from 0 to 100.
  • Cryptographic Server-Side Price Lock: Protects buyers against front-running price spikes and client-side DevTools tampering using a 15-minute cryptographically signed token.
  • Human-in-the-Loop Payment Authorization: The AI agent deterministically halts before checkout. The buyer inspects the itemized breakdown and physically authorizes the transaction through official PayPal SDK rails.
  • Instant PayPal v2 Capture & Settlement: The backend captures funds via PayPal Orders v2 REST APIs with duplicate idempotency protection, generating real PayPal Capture IDs (8B... / C-...) and logging the transaction to an append-only relational ledger.
  • Interactive Bryntum Logistics Fulfillment: Instantly provisions a multi-carrier transit schedule across regional hubs (Gurugram, Mumbai, Bengaluru) on an interactive Bryntum Gantt chart where drag-and-drop milestone updates synchronize with the merchant ledger in real time.

🛠️ How We Built It

  • Artificial Intelligence & Reasoning: Google Gemini (gemini-3.5-flash with resilient cascade to gemini-3.5-flash-lite) integrated with Google Search Grounding for real-time web verification, structured JSON constraint extraction, and multi-turn conversational state machines.
  • Financial Rails & Payments: Official PayPal JavaScript SDK (@paypal/react-paypal-js), PayPal Sandbox REST API v2 (/v2/checkout/orders and /v2/payments/captures), supporting server-side authorization checkpoints and idempotency keys.
  • Frontend Architecture: Next.js 14 (App Router), React 18, TypeScript, Tailwind CSS, Lucide Icons, and Canvas Confetti, featuring a high-efficiency Split-Screen Copilot interface.
  • Logistics & Scheduling: Bryntum Gantt Scheduler Suite providing high-performance canvas rendering, multi-carrier route tracking, and milestone dependency resolution.
  • Backend & Database: Node.js, Express.js, TypeScript, Sequelize ORM, and MySQL 8/9 with 8 relational tables maintaining full referential integrity across Users, Products, Orders, Transactions, Agent Executions, and Financial Approvals.
  • Containerization & Cloud: Multi-stage Docker builds optimized for sub-second cold starts on Google Cloud Run in asia-south1 (Mumbai).

🧗 Challenges We Faced

  1. The Financial Autonomy Dilemma: Designing an AI agent that feels magically proactive without creating financial liability. We solved this by strictly treating payments as a Human-in-the-Loop cryptographic escrow checkpoint rather than an autonomous background charge.
  2. Preventing Price Tampering & Front-Running: Ensuring malicious users cannot manipulate DOM state or network payloads to buy a ₹1,50,000 laptop for ₹1. The backend completely ignores client-submitted prices, re-fetching the canonical product record and validating the HMAC signature at the exact millisecond of PayPal order initialization.
  3. Normalizing Opaque Hardware Benchmarks: Translating disparate manufacturer specs into clean, comparative scores that correlate to real-world PyTorch matrix multiplication and thermal headroom.
  4. Idempotent Payment Captures: Guaranteeing that rapid multi-clicks or network disconnects during the PayPal approval window cannot result in double charges or dangling unfulfilled orders.

📚 What We Learned

  • Multi-Agent Specialization beats Monolithic Prompts: Dividing tasks into discrete agents (Supervisor $\to$ Research $\to$ Analyst $\to$ Guardrail) drastically reduced hallucination rates and improved recommendation precision.
  • Defense-in-Depth for Agentic Commerce: Autonomous AI agents must never possess direct write access to payment APIs. Financial execution must remain an authenticated, signed human handshake.
  • Enterprise Gantt Integration: Coordinating asynchronous e-commerce fulfillment with interactive logistics schedulers creates end-to-end transparency that elevates merchant trust.

🔮 What's Next for PayPilot AI

  • Multi-Merchant B2B Procurement: Expanding from single-unit consumer hardware to multi-seat enterprise developer workstation procurement with department approval hierarchies.
  • Autonomous RMA & Reverse Logistics: Leveraging AI agents to inspect delivery tracking exceptions, evaluate warranty claims, and manage automated return shipments via Bryntum.
  • Dynamic Cross-Border FX Hedging: Real-time multi-currency conversion with locked forward rates using PayPal Global Commerce APIs.

Built With

Share this project:

Updates

Submission history