Inspiration

To be fair, I thought hard about what to build here, mostly because my country hasn't been allowed to use PayPal for a long time. However, as a traveler and someone who have been conversant with AI i decided to build what Travala does (agents booking and paying for hotels with payments in crypto) but using PayPal's agentic commerce. Well, i figured there was a lot of them. Then I had to pivot and deep dive into problems that could arise when agents handle funds and do the wrong thing, and where it leaves users and merchants. That's how Recourse came about.

What it does

So with a very simple example, let's assume you asked an agent to book a hotel in Singapore for you under $500 for 3 days and must be refundable. But then, the refundable options got sold out, but instead of returning the verdict, it picked up a non-refundable offer/discount by the company.

Say later, your plans change, but now you can't get your refund as you should. In this case, it is neither the users nor is it the merchants fault...but the agent. Usually if you insist on a dispute, the merchant ends up bearing the loss.

This is where Recourse shines. Before an agent company (the operator) is allowed to let its agents book, it signs a capped agreement, say $600 per mistake, and saves a PayPal payment method. When its agent messes up, Recourse proves exactly what happened, a person approves the decision, and PayPal handles the money.

You get your refund, the agent company gets charged for it, plus the PayPal fee on the charge. The hotel stays exactly as it would if nothing happened. And if a hotel tries to set traps for agents, with hidden rules, misleading listings or sneaky instructions aimed at the agent, Recourse flags it, and the blame lands on the hotel instead.

How I built it

  • Every agent action is logged and can't be edited
  • Every agent payment carries a fingerprint of the buyer's instructions and of that log, so I can pull it back from PayPal later and prove nothing changed.
  • AI proposes who is at fault, while the code checks every claim. A human remains in the loop for approvals
  • PayPal handles all the money: bookings, the saved operator payment method, refunds, and confirmation of every payment.
  • Tech stack for Recourse includes: node, express, typescript, and postgres for backend, react and AG Grid, plus a read-only AG Studio assistant that can explain but never pay.

Challenges we ran into

  • Signing up issues and hitting walls because we created or used sandbox emails that weren't opened using US as a country. Stalled me greatly.
  • Making a "careless" agent fail on purpose, without faking it, was weirdly hard. Apparently the agent was just too smart and kept picking the right hotel. S ## Accomplishments that we're proud of Well, personally loved that I was able to finish this under 30 hours. prior to this I had just come out from very serious ZK builds for Near and Zcash. So this was also amongst one of the three serious builds I had this month and finishing it before the deadline is a great dal for me.

What we learned

Oh my, learned a lot about the whole Sandboxed environment for PayPal. AG studio is also something I have never used before in my builds but this time around, I came across it and appreciated it. Also, for the hard stuffs, it was proving what an agent was exactly told, what the agent saw, and what it eventually chose. Once we got past that with solid proof, deciding who bears the burden wasn't that much of ana issue anymore.

What's next for Recourse

I want any agent, built on any framework, to be able to plug in and get covered. And I want buyers to see an agent's track record before they let it spend their money, the same way you check a driver's rating before you get in the car.

Built With

Share this project:

Updates

Submission history