Inspiration

Thai cafes and bakeries sell through LINE chats: owners reply by hand, total on a calculator and wait for bank-transfer slips. Tourists can't read Thai menus and often can't pay by Thai QR. We wanted an agent that does the counter person's whole job.

What it does

Customers chat in Thai, Chinese or English. A Gemini tool-calling agent recommends items, builds the cart, and creates a PayPal Orders v2 checkout link in the chat. The server captures on return and the agent confirms. The merchant dashboard shows paid orders, PayPal IDs and signature-verified webhooks, plus a merchant assistant that lists orders and sends PayPal Invoicing v2 invoices.

How we built it

Node.js 20 + Express, JSON store, plain HTML/JS. Agent loop over Gemini's OpenAI-compatible API with tools (search_catalog, add_to_cart, create_paypal_checkout, check_order_status, send_paypal_invoice). The model passes item IDs and quantities only; all prices and PayPal amounts are computed server-side. PayPal: OAuth, Orders v2 create/capture/get with idempotency, Webhooks with signature verification and amount checks, Invoicing v2. LINE webhook ready. 49 automated tests in mock mode.

Challenges

Keeping replies in the customer's language, keeping the LLM away from money, capture races between return URL and webhook, and Gemini free-tier quotas.

What's next

Launch on a real LINE Official Account, PromptPay for locals, multi-merchant onboarding, refunds.

Full write-up: https://github.com/18230/siam-shop-agent/blob/main/docs/DEVPOST.md

Share this project:

Updates

Submission history