Inspiration

AI agents are starting to buy things for people. Small merchants will feel it first, and before any money moves they need three answers: who is this agent, did a real person agree to this purchase, and what is the price? A model that can be talked into a discount is a liability at checkout. We wanted to build the checkout for that moment, with PayPal as the money rail.

What it does

Marlow is the shop agent for Field & Grain, a furniture workshop in Austin whose buyers are AI agents (Juniper, Northwind, and Atelier).

  1. A buyer agent asks in plain words: "Walnut writing desk for Juniper, Austin, before Friday, ceiling $880."
  2. Marlow searches the catalog, checks market comps and the workshop floor, and prices the piece from shop policy: $840, so a 40% deposit of $336. The model never sets an amount.
  3. A mandate check confirms the agent is registered and that a person signed consent for this item, city, budget, and deadline. Unknown agents are refused, card numbers are masked and refused, and requests over the buyer's ceiling are declined by policy.
  4. The buyer approves in PayPal, which authorizes and holds the deposit. That hold rewrites the workshop schedule: an unpaid hold gives up Thursday's mill and the desk takes it.
  5. When the van is loaded, Marlow captures the deposit, invoices the balance, and can refund part of it through PayPal. The books update in an AI dashboard.

Every check the agent ran shows on screen as a green or red chip, so you can see exactly why a sale went through or was refused. The live demo has six one-click scenarios: three sales and three guardrails.

How we built it

  • PayPal: Orders v2 with intent AUTHORIZE, Payments v2 capture and partial refund, Invoicing v2 for the balance, all through the official PayPal Server SDK (generated by APIMatic), plus the PayPal JS SDK button for buyer approval. Every amount comes from the server's policy function, never from the browser.
  • AI: the shop agent runs on the Vercel AI SDK with OpenAI gpt-4o-mini and five tools (take a request, search the catalog, authorize, capture, refund). The model chooses tools; policy owns the price.
  • Mandates: an HMAC signature over the agent, ceiling, city, and deadline, so changing any of them breaks it.
  • Bryntum Scheduler powers the workshop floor, AG Studio (AG Grid and AG Charts) powers the books with its AI assistant, and the live demo runs on Render. Channel3, Elastic, Kernel, Zapier, Postman, and Astropods are wired in for comps, search, listing checks, notifications, API testing, and deployment.
  • Next.js 16, React 19, TypeScript.

Challenges we ran into

Keeping the AI useful without letting it touch money. We gave the model tools that can only act on amounts the policy already signed. Making a payment hold visible was the other: tying the PayPal authorization to the workshop schedule made the hold something you can see.

Accomplishments that we're proud of

A full PayPal lifecycle in the sandbox (authorize, capture, refund, invoice) driven by an agent. Refusals that are as visible as approvals. An app judges can clone and run with zero keys, plus an always-on live demo.

What we learned

Agentic commerce needs three things before money moves: identity, consent, and a price the merchant controls. PayPal's authorize-then-capture flow is a natural fit for agent purchases.

What's next for Marlow

A real agent registry, persistent orders, onboarding for real merchants, and letting outside agents shop through a standard protocol, all inside the merchant's policy.

Try it

Built With

Share this project:

Updates

Submission history