Inspiration
In Sri Lanka, finding the cheapest grocery run is a mathematical nightmare. Shoppers have to constantly juggle base prices across supermarkets like Keells and Glomark, decode complex credit card promotion rules, and figure out if a PickMe or Uber delivery fee cancels out their savings. We realized that humans shouldn't be doing this math—so we built an autonomous Agentic AI to do it for them.
What it does
Smart Basket is a procurement engine that guarantees the absolute lowest grocery bill. Users simply type (or upload a photo of) their messy grocery list. They don't have to worry about typos or exact formatting. Our AI:
Parses & Corrects: Uses Jac's native LLM integration to fix spelling (e.g., "milcc" to "Milk") and extracts mathematical quantities.
Traverses the Graph: An autonomous Jac Walker navigates a data-spatial graph of stores, inventories, and bank promotions.
Calculates Net Cost: It calculates the true out-of-pocket cost using this logic: Net Expenditure = sum (Item Price * Qty) - min(PromoDiscount, MaxCap) + DeliveryFee
Handles Edge Cases: If an item is out of stock, it triggers a secondary LLM to suggest relevant alternatives instantly.
How we built it
We built the entire application—both the frontend UI and the backend logic—natively using the Jac programming language on the Jaseci platform, completely exceeding the 80% code requirement.
We used JacHammer AI to rapidly develop our components. The backend models the retail landscape as a spatial graph: Supermarkets and Bank Promos are Nodes, while Delivery Routes are Edges. We utilized Jac's powerful by llm ability to act as our semantic parser, directly converting natural language into graph queries without relying on clunky external API wrappers.
Challenges we ran into
Real-world retail is messy. Our biggest challenge was handling the "Discount Trap"—where a bank offers 30% off, but caps the maximum discount at Rs. 1000. We had to program our Walker to strictly calculate caps and dynamic spatial delivery fees before deciding which store was actually cheaper. We also had to refine our LLM prompts to dynamically multiply base prices by user-requested quantities (e.g., 1.5kg).
Accomplishments that we're proud of
We are incredibly proud of building a true Agentic AI rather than just a standard chatbot. Our Walker actively navigates a spatial graph to make constrained mathematical decisions on behalf of the user. We are also proud of building a sleek, responsive frontend entirely within the Jac ecosystem (frontend.cl.jac).
What we learned
We learned how uniquely powerful Jac's spatial computing paradigm is for optimization problems. Representing stores and promos as connected nodes made traversing and calculating costs incredibly intuitive compared to standard relational databases.
What's next for Smart Basket
Our next step is Split-Basket Routing. If carrots are 80% cheaper at Keells, but chicken is 50% cheaper at Cargills, a future Walker will dispatch two separate couriers if the combined savings outweigh the double delivery fees. We also plan to fine-tune the LLM to parse local "Singlish" and Sinhala/Tamil terminology!
Built With
- agentic-ai
- jac
- jachammer
- jaseci
- llm
- react
- spatial-computing
Log in or sign up for Devpost to join the conversation.