Inspiration
Buying a gift means opening a dozen tabs, comparing prices, and worrying about the budget. Splitting a gift with friends is worse: someone fronts the money and then chases everyone for their share. We wanted to see whether an AI agent could do the legwork while a person stays in control of the payment.
What it does
Gift Concierge is a chat-based shopping agent. You describe who the gift is for and what you want to spend. It searches real products from real retailers, suggests picks with a one-line reason each, and builds a cart that stays within your budget. At checkout, you approve the payment in PayPal yourself; the agent cannot take payment. If you'd rather split the cost, it sends each contributor a PayPal invoice for their share and tracks who has paid. It automatically sends a reminder to any contributor who hasn't paid in 2 days. It also tracks prices in real time and if an item goes on discount, it will notify the user and update the cart automatically for the user to checkout the new list of products.
How we built it
- App: Next.js (App Router), TypeScript and Tailwind, with SQLite for carts and orders.
- Agent: Vercel AI SDK with tool calling, running an open-source model (GLM-5.3 Flash, MIT-licensed) through OpenRouter.
- Products: the Channel3 API for live product search and price re-checks.
- Payments: PayPal Orders v2 with the JavaScript SDK v6 for checkout, and PayPal Invoicing v2 for group gifts (all sandbox).
The key design choice was to enforce the rules in code, not in the prompt. Cart totals, the remaining budget, and when to offer extra items are calculated on the server and handed to the agent to quote. Prices come only from stored search results, so the agent can't invent a product or change a price. Before any charge, the server re-checks each item's current price and blocks checkout if anything changed.
Challenges
- Keeping the model honest. An open model sometimes skipped steps or ignored a rule. We fixed this by moving decisions into code and giving it a server-written instruction after each action. We also wrote scripted conversations to test the budget, decline, over-budget and cancel cases.
- Money has to add up exactly. PayPal rejects an order whose line items don't match its total, so all amounts use whole cents. Group shares are split so they always sum exactly to the cart total.
- Prices change. A price can differ between search and checkout, so we flag it for the user instead of silently charging a different amount.
- Group payments. Invoices go out only when the user clicks a button. If PayPal fails partway, the ones already sent are withdrawn, and the cart is locked while requests are out so nobody pays twice.
- Sandbox setup. A US buyer account and a US seller account are needed for USD orders, and the seller can't be the buyer.
What we learned
- Treat the model as an assistant inside guardrails, not as the thing that guarantees correctness.
- Offline tests with fake services caught real bugs, such as a budget parser that rejected "$150, ideally under $50".
- The newest SDK versions (AI SDK v7, Next.js 16, PayPal SDK v6) differ from older documentation, so reading the current docs paid off.
Limitations and next steps
This is a sandbox prototype: no real money moves and fulfilment is simulated. Next we would add automatic refunds, webhooks, and deployment.
Built With
- channel3
- css
- glm-5.3-flash
- next.js
- node.js
- openrouter
- paypal-invoicing-api
- paypal-orders-api
- react
- sqlite
- tailwind
- typescript