Inspiration

I run AtlasOfOne, a small shop that sells one personalised product: a printable maze book for kids aged 4??, drawn on the real taxiways of the airport their family flies from. On a marketplace every order still needs my hands ??read the buyer's message, check the airport, make a proof, wait for the yes, render the book, deliver it. The buyer waits hours for a file the computer can make in seconds. I wanted the shop's own agent to do the whole order, with PayPal handling every step where money moves ??and with rules the agent cannot talk its way around.

What it does

A parent types one line: "My 5-year-old Mia loves planes, we fly out of LAX."

  1. The agent finds the airport and renders a watermarked proof of the real cover with the child's name.
  2. Only after the parent approves the proof does it open a PayPal checkout (Orders v2, JS SDK v6 button).
  3. On capture the shop renders the book (Letter + A4 PDFs) and hands over the download. Brief to finished book: about thirty seconds in the recorded run.
  4. Order status and refunds go through the same chat. Full refund within 14 days, for any reason ?? the agent calls the PayPal Agent Toolkit, the webhook confirms it, and the download link closes.

Agent-to-agent commerce. The same guarded tools are exposed as an MCP server (/mcp). A family assistant agent can shop there. On its first checkout it can ask for an agent mandate: the owner sees the proof, the price and the limits, agrees, and pays once. PayPal vaults the wallet, and the agent can then reorder without another approval ??inside limits the shop enforces (catalogue price, 3 books a day, 30 days). In the recorded demo the book is ready about four seconds after the agent's mandate call (the whole agent run, model turns included, takes 14 seconds). The owner switches it off on the order page; the next attempt is refused, and the shop forgets the vault id and asks PayPal to delete it.

How we built it

  • Agent: Google Gemini 3.5 Flash through Vercel AI SDK 7, five tools (find_airports, make_proof, create_checkout, check_order, refund_order). Without a model key, a rule-based parser runs the same flow.
  • PayPal: Orders v2 created server-side from the catalogue (intent: CAPTURE, NO_SHIPPING for a digital good, a PayPal-Request-Id on every create and capture) 쨌 JS SDK v6 one-time payment session with a server-issued client token 쨌 server-to-server capture 쨌 webhooks (PAYMENT.CAPTURE.COMPLETED / REFUNDED / DENIED, CHECKOUT.ORDER.APPROVED) each verified with verify-webhook-signature on the raw body 쨌 @paypal/agent-toolkit for get_order and create_refund 쨌 Vault (store_in_vault: ON_SUCCESS) behind the mandate.
  • MCP: Streamable HTTP server sharing src/tools.mjs with the chat agent; one MCP session = one shop session, so an agent can only see and refund the orders it created.
  • Tests: headless end-to-end scripts (brief ??proof ??PayPal popup ??sandbox buyer ??download; the MCP buyer agent; the mandate reorder) and unit tests for the claim guard.

Design rules the agent cannot break

  • The model chooses what, never how much. No tool takes an amount; the price lives only in the catalogue.
  • Show before charge. The PayPal button appears only after the buyer has seen the real proof.
  • No claimed step that didn't happen. Tool errors come back explicitly, and a deterministic guard compares any reply that promises a checkout with the checkout cards that actually exist.
  • Unhappy paths are product, not footnotes: render fails after payment ??automatic full refund; airport we can't draw ??the agent lists what it can draw; duplicate webhooks ??fulfilment runs once per capture id.

Challenges we ran into

  • The Agent Toolkit's create_order has no shipping_preference, and a digital download must never ask for an address ??so the shop creates orders with its own Orders v2 call and uses the toolkit for reading and refunding.
  • A vault token carries no spending limits of its own. The mandate's limits had to be enforced by the shop, checked on every reorder, and revocable in one click.
  • The claim guard once fired on a harmless sentence ("please check out the proof card above") and opened a checkout nobody asked for. That reply is now a regression test, together with every other real reply that ever fired it by mistake.

Accomplishments that we're proud of

  • A real product, end to end: a stranger can go from one sentence to a paid, downloaded book in about thirty seconds.
  • An agent can buy from another agent under a mandate the human can see, limit and revoke.
  • Every money state is reconciled by a signature-verified webhook, not by trusting the model.

What we learned

The interesting part of agentic commerce is not the chat ??it is deciding which decisions the model is never allowed to make, and making the shop, the payment platform and the webhook enforce them.

What changed during the hackathon

AtlasOfOne and its maze-book generator existed before the submission period (the book is sold as a listing on Etsy). Everything in this repository is new work from 2026-10-10 on: the order agent, the PayPal integration (Orders v2, JS SDK v6, webhooks, Vault, Agent Toolkit), the MCP server, the agent mandate, the refund flow and the public SAMPLE renderer. The production maze generator stays private; the open-source build bundles one airport and watermarks every page, and runs the full purchase end to end.

What's next

Switch the sandbox to live PayPal and make this the shop's own direct-order channel next to the marketplace, then open the MCP endpoint to gift-finding agents.

Responsible AI

The page names the model that answers, says it can make mistakes, and says the shop ??not the AI ??sets prices and limits. The agent never asks for card numbers, passwords or addresses. Data kept: the child's first name, the airport and the chat; no account, no email, no tracking. Demo data is deleted after judging.

Built With

  • cloudflare-tunnel
  • gemini
  • javascript
  • model-context-protocol
  • node.js
  • openstreetmap
  • oracle-cloud
  • paypal-agent-toolkit
  • paypal-js-sdk-v6
  • paypal-orders-v2
  • paypal-vault
  • paypal-webhooks
  • playwright
  • vercel-ai-sdk
Share this project:

Updates

Submission history