Inspiration
When people shop online they see a price tag, not the real cost. A console needs controllers, games and an online subscription. A phone comes with a plan. And nobody tells you what the purchase means for your salary, in your currency. We wanted a shopping agent that answers "what should I actually buy, and can I afford it?" and then pays safely.
What it does
You tell BuyWise AI what you want to buy, for example "I need noise-cancelling headphones".
- The agent first asks your country and monthly salary, so every amount is shown in your own currency (₹ for India).
- It researches live products through Channel3 and builds 2-3 complete, like-for-like options, including the accessories and subscriptions you will need.
- Each option card shows pay today, true first-year cost and impact on your salary, with a comparison grid and a cost chart.
- When you choose, BuyWise builds a purchase plan, locks it with a SHA-256 hash, and asks for a PIN that the AI never sees.
- The PayPal Agent Toolkit creates the order on the server, reads it back to verify the amount matches the locked plan, and you approve in PayPal.
How we built it
- Agent: Google Gemini with tool calling (search products, build options, rank, prepare the purchase plan).
- Deterministic engines: cost, affordability, scoring, bundle checks and like-for-like checks are plain TypeScript. The AI picks the options; code does the maths, so numbers are never hallucinated.
- Payments: PayPal Agent Toolkit (
create_order,get_order,pay_order) in Sandbox, plus a transaction state machine with idempotent capture and webhook verification. - Stack: Node + Express + TypeScript backend, Angular 21 frontend with AG Grid and AG Charts, live exchange rates, deployed on Render.
- Safety: rate limits, a daily AI cap, per-session ownership checks, and a PIN with lockout.
Challenges we ran into
- PayPal's order-create response doesn't include the amount, so we read every order back to verify it before the user pays.
- Keeping AI options comparable: an early run compared a console with a different product type, so we added a like-for-like check.
- Showing local currency (₹) while PayPal Sandbox charges in USD: we convert with live rates and show both on the final charge.
- Gemini model access and quota limits on new API keys.
What we learned
Letting the AI decide what to buy and letting code decide how much it costs makes an agent you can trust with money.
What's next
Log in with PayPal, more local markets and currencies, and price-drop alerts before you buy.
Built With
- ag-charts
- ag-grid
- angular.js
- channel3
- express.js
- google-gemini
- node.js
- paypal
- paypal-agent-toolkit
- render
- typescript
- vitest
- zod