CogniCart – AI-Powered Intelligent Shopping Agent

1. Inspiration

Online shopping often requires customers to visit multiple platforms, compare countless products, evaluate specifications, check prices, and make purchasing decisions manually. This process can be time-consuming and overwhelming, especially when customers have specific requirements but don't know which product best satisfies them.

We were inspired by the idea of transforming traditional online shopping into an intelligent, conversational experience where users can simply describe what they need and let an AI agent assist with product discovery, comparison, and the purchasing workflow, while keeping the final purchase approval in the user's hands.

With the emergence of AI agents and agentic commerce, we wanted to explore how an intelligent shopping assistant could go beyond answering questions and actually help users complete transactions securely.

This led to CogniCart – a smarter way to shop using AI and PayPal.

2. What it does

CogniCart is an AI-powered shopping agent that simplifies product discovery and purchasing through natural-language interactions.

Users can describe their shopping requirements in ordinary language, including their preferred product category, budget, specifications, and priorities.

CogniCart then:

  • Understands user intent: Uses Gemini-powered natural-language processing to extract shopping requirements and preferences.
  • Discovers real products: Uses Channel3 for product discovery rather than relying entirely on a predefined product catalogue.
  • Filters and ranks products intelligently: Applies backend validation to filter products based on category, budget, and mandatory specifications, then uses Gemini to rank eligible products and generate recommendations.
  • Facilitates secure checkout: Integrates PayPal Sandbox for user-approved checkout, payment capture, and transaction verification.
  • Enforces spending controls: Performs server-side spending-limit checks and checkout reservations to help prevent unauthorized or excessive spending.
  • Maintains transaction records: Stores transaction information and supports payment receipts and order tracking.

Our goal is to move beyond a conventional shopping chatbot and build an AI agent that can participate in the actual shopping and purchasing process.

3. How we built it

CogniCart was developed using a modern full-stack architecture combining AI, product discovery, backend services, database management, and payment integration.

Technologies and services used:

  • Next.js, React and TypeScript: Used to develop the application frontend and backend API routes.
  • Google Gemini API: Used for natural-language intent understanding and AI-assisted product comparison.
  • Channel3 API: Used to retrieve product information for real-world product discovery.
  • Supabase: Used for authentication, database management, and transaction-related data storage.
  • PayPal Developer / Sandbox APIs: Integrated for payment creation, approval, and capture workflows.
  • Vercel: Used for application deployment and hosting.
  • Vercel AI SDK: Used with the Google Gemini provider to integrate AI-powered intent extraction and product-ranking functionality.

Our workflow:

  1. The user submits a shopping request in natural language.
  2. The AI layer interprets the request and extracts relevant requirements.
  3. Channel3 retrieves matching product information.
  4. The application evaluates and ranks products against the user's preferences.
  5. The user selects a suitable product and proceeds to checkout.
  6. PayPal handles the payment workflow.
  7. The backend validates transactions and spending limits, while Supabase maintains transaction records.

We also implemented supporting functionality such as payment receipts, order tracking, and transaction management.

4. Challenges we ran into

Building an AI-powered shopping agent that interacts with real product data and payment systems introduced several challenges.

  • AI API reliability: We encountered Gemini API HTTP 503 errors and temporary service unavailability, affecting intent processing and product ranking.
  • Product data integration: Integrating Channel3 product data required handling product specifications, availability, merchant offers, and prices consistently so that recommendations matched the user's requirements.
  • AI response consistency: Ensuring that AI-generated recommendations followed the user's actual requirements and returned structured, usable responses was challenging.
  • Payment security: Integrating PayPal required careful handling of payment creation, capture, authentication, and duplicate-payment prevention.
  • Spending-limit enforcement: We needed to ensure that spending restrictions were validated on the backend rather than relying on frontend controls.
  • End-to-end integration: Connecting AI services, product discovery, database operations, and PayPal into one reliable workflow required extensive debugging and testing.
  • Sandbox limitations: Working with PayPal Sandbox introduced certain testing constraints, including currency and account configuration limitations.

These challenges helped us understand that building a functional AI agent requires much more than connecting an LLM to an application. Reliability, security, validation, and integration are equally important.

5. Accomplishments that we're proud of

  • Developed a conversational AI-powered shopping experience that understands natural-language shopping requirements.
  • Integrated Channel3 product discovery into the shopping workflow.
  • Connected AI-powered intent understanding with product retrieval and recommendation logic.
  • Successfully integrated PayPal Sandbox payment workflows.
  • Implemented backend spending-limit enforcement and safeguards against duplicate payment capture.
  • Developed transaction management and payment receipt functionality.
  • Implemented simulated order-status progression with scheduled tracking updates and event recording.
  • Deployed the application using Vercel.
  • Designed an extensible architecture to support future AI capabilities, intelligent shopping workflows, and payment integrations.

Most importantly, we are proud of moving beyond the idea of a shopping chatbot and building a working foundation for AI-assisted commerce.

6. What we learned

Throughout this project, we learned that building an AI agent involves much more than prompt engineering.

We gained practical experience in:

  • Integrating LLM APIs into real-world application workflows.
  • Converting natural-language requests into structured requirements.
  • Connecting external product APIs to AI-driven recommendation systems.
  • Designing backend validation independent of AI-generated responses.
  • Implementing secure payment workflows using PayPal.
  • Managing authentication, transaction records, and database operations using Supabase.
  • Handling API failures, service limitations, and fallback mechanisms.
  • Building and deploying a full-stack application using Next.js and Vercel.

We also learned an important lesson: AI should make intelligent decisions, but critical operations such as payment validation, spending limits, and transaction execution must remain under strict backend control.

7. What's next for CogniCart

We envision CogniCart evolving into a more capable and reliable autonomous shopping platform.

Our future roadmap includes:

  • Multi-agent shopping architecture: Introduce specialized agents for product discovery, comparison, price analysis, and purchasing.
  • Improved AI reliability: Explore multiple LLM providers and intelligent fallback mechanisms to reduce dependency on a single AI service.
  • Advanced product intelligence: Improve product ranking using specifications, customer preferences, value for money, and historical pricing information.
  • Price monitoring: Extend the existing historical price retrieval and analysis functionality with automated price monitoring, user-defined target prices, and notifications when products reach preferred price levels.
  • Agentic purchasing workflows: Explore configurable purchasing preferences and approval workflows that allow users to authorize purchases within defined spending limits, while maintaining appropriate payment safeguards.
  • Agent-to-agent commerce: Explore interactions between shopping agents, merchants, and payment services to support emerging agentic commerce ecosystems.
  • Production readiness: Strengthen security, scalability, monitoring, and payment reliability to support real-world users.

Our long-term vision is to make CogniCart more than a shopping assistant: we want it to become a trusted AI shopping agent that can understand customer needs, make informed recommendations, and securely execute purchasing workflows on their behalf.

Built With

Share this project:

Updates

Submission history