Inspiration

Online shopping often looks simple until hidden costs, shipping fees, delivery timelines, and product mismatches make the decision complicated. An item may appear to fit a budget but exceed it once all costs are included. We wanted to explore how AI could make shopping more intelligent while keeping users in control of their money. This inspired us to build AgentCart AI, an AI-powered shopping assistant that compares products, calculates total costs, explains why certain options are rejected, and requires explicit buyer approval before checkout.

What it does

AgentCart AI is an AI shopping agent that helps users find suitable products through natural-language requests. It searches a product catalog, compares available options, calculates estimated landed costs—including item price, shipping, and tax—and enforces constraints such as budget, stock availability, delivery time, minimum ratings, and brand preferences. It explains why products fail to meet requirements and suggests alternatives when possible. Users can review the selected product and its cost breakdown before explicitly approving the checkout process, with PayPal Sandbox integration supporting the payment flow.

How we built it

We developed AgentCart AI using Next.js, React, TypeScript, and Tailwind CSS, with server-side APIs for catalog search, agent orchestration, pricing validation, and checkout operations. Zod supports input validation, while Vitest helps test the application's core logic. We separated AI-assisted reasoning from authoritative business rules. The AI helps interpret shopping requests and communicate recommendations, while deterministic server-side logic enforces constraints and recalculates costs. This approach makes decisions more transparent and helps prevent an AI recommendation from bypassing a user's requirements. We also designed the experience to show the reasoning behind product selection and to preserve an explicit approval step before payment. The project supports a demo-data and in-memory mode, allowing the core experience to be demonstrated without a configured production database.

Challenges we ran into

One of our biggest challenges was ensuring that a product's displayed price did not mislead users about its actual cost. We addressed this by evaluating the estimated total, including shipping and tax, rather than checking the item's price alone. Another challenge was ensuring that recommendations respected every constraint. A product that exceeds the budget or fails another mandatory requirement must be rejected rather than presented as an eligible choice simply because it is otherwise attractive. We also worked on maintaining consistent product information across search results, recommendations, proposals, and checkout, while designing a clear interface for explaining decisions and reviewing a purchase before approval.

Accomplishments that we're proud of

We’re proud of building AgentCart AI, an AI-powered shopping assistant that combines conversational intelligence with deterministic safeguards. We implemented landed-cost calculations, hard budget and delivery constraints, product eligibility checks, transparent rejection explanations, alternative recommendations, and a buyer-controlled checkout flow. We also built an interactive interface with live agent activity updates and automated tests to validate core functionality. Our biggest achievement is designing an agent that doesn't simply recommend products—it evaluates them against user requirements and keeps the buyer in control.

What we learned

This project taught us that building a useful AI agent involves much more than connecting a language model to a chat interface. Reliable agents need structured tools, validated inputs, deterministic decision rules, clear explanations, and safeguards around consequential actions. We learned how to combine AI orchestration with full-stack development, API design, automated testing, and payment-flow concepts. Most importantly, we learned that trustworthy AI should assist users without taking control away from them.

What's next for AgentCart AI — Autonomous Commerce with Smart Guardrails

Our next steps include improving product-specific details and images, integrating a verified real-world product catalog, completing end-to-end testing of the PayPal Sandbox flow, and strengthening persistent database support. Our goal is to make AgentCart AI a more transparent and dependable shopping assistant—one that helps people make informed purchasing decisions while keeping their budgets and final approval at the center of every transaction.

Built With

Share this project:

Updates

Submission history