Inspiration

AI agents can now find products for you, but almost nobody trusts one with their wallet. The missing piece isn't search, it's control: hard limits the agent can't talk its way around, and a human approval before any money moves. Haul is an agent you could actually let buy things.

What it does

You tell Haul what you need ("a packable rain jacket under $120 for a trip to Seattle"). It:

  1. Searches real products through the Channel3 catalog API and compares the options.
  2. Recommends a pick and explains the trade-offs.
  3. Proposes a checkout: an itemized cart card with the server's price and the server's verdict on your rules.
  4. Pays with PayPal only after you approve the payment in the PayPal button.
  5. Tracks and refunds: it can look up a PayPal order and refund it, but refunds also need your approval.

A rules panel sits next to the chat: a per-order limit, a total budget with a live meter, blocked categories, and a ship-to address.

How we built it

  • Next.js 16 (App Router), React 19, TypeScript, Tailwind v4.
  • Claude Sonnet 5.5 through the Vercel AI SDK, served by Amazon Bedrock (with an Anthropic API fallback). The agent has four tools: searchProducts, proposeCheckout, getOrderStatus and refundPayment.
  • PayPal JS SDK v6 for the payment button, and the PayPal REST APIs (Orders v2 to create and capture orders, Payments v2 for refunds) in the sandbox.
  • Channel3 /v1/search and /v1/products/{id} for product data, with an offline demo catalog as a fallback.

Guardrails that don't depend on the model

The key design decision: the AI never sets prices and never decides whether a payment is allowed.

  • The agent sends only product IDs and quantities; the server re-prices the cart from the catalog, so a hallucinated or injected price is ignored.
  • Your rules are checked on the server twice: when the quote is built, and again when the PayPal order is created. A $303.41 cart against a $150 limit is rejected with a 403 even if the model tries to push it through.
  • Checkout is a client-side tool: the agent pauses until you pay or cancel in PayPal.
  • Refunds go through an approval-gated tool.

Challenges we ran into

  • Making "the agent proposes, the human approves" feel natural in a chat UI. The checkout card is rendered from a tool call and pauses the agent until you pay or cancel.
  • Keeping the rule check in one place so the quote and the PayPal order creation can never disagree.
  • Working with PayPal JS SDK v6 and the newest Next.js and AI SDK releases, whose APIs differ from older examples.

What we learned

Trust in agentic commerce comes from deterministic limits around the model, not from a better prompt. Prices, budgets and approvals belong in server code; the model is great at the tedious part: searching, comparing and explaining.

About the demo video

The video was recorded with Haul's built-in demo catalog and scripted agent replies, because the PayPal sandbox and model credentials weren't connected at recording time. The UI, cart pricing and rule checks shown are the real app and server. The recording scripts are in the repo under demo/recording/.

What's next

  • The official PayPal Agent Toolkit for more PayPal actions (invoices, subscriptions, tracking).
  • Multi-merchant carts and price watching ("buy it when it's under $80").
  • Shared household budgets with per-person limits.

Built With

Share this project:

Updates

Submission history