Inspiration

AI shopping agents are evolving from recommending products to making real purchases. But what happens when an agent makes an unauthorized purchase or exceeds its spending limits? Traditional payment systems record transactions but cannot independently prove what an agent was authorized to do. We built Gawah to bridge this trust gap with an independent witness and accountability layer for AI-driven payments.

What it does

Gawah provides authorization, monitoring, and dispute resolution for AI shopping agents through four components:

  1. Mandates: Digitally signed spending permissions defining limits, merchants, and product categories.
  2. Guardian: Validates purchase requests against mandates and uses AI-powered semantic analysis to detect unauthorized purchases.
  3. Ledger: Records approved and blocked decisions in a signed, hash-chained, tamper-evident ledger.
  4. Dispute Counsel: Analyzes transaction evidence and recommends whether to defend a disputed charge or concede and provide a remedy. A centralized dashboard provides visibility into payments, blocked purchases, disputes, and evidence.

How we built it

We built the backend using Python and FastAPI, with ES256-signed JSON mandates inspired by Google's AP2 concepts (not a full AP2 implementation). Groq-powered language models handle semantic cart evaluation and dispute analysis. An AI Shopper Agent interacts with a demo merchant and initiates purchases, while PayPal Sandbox handles payment processing. A Next.js dashboard provides a unified interface to monitor the complete workflow. The architecture separates the agent's actions from authorization and evidence generation, ensuring independent accountability.

Challenges we ran into

Our biggest challenge was ensuring that Guardian fails closed when AI models are unavailable, so model failures never result in blindly approved purchases. We also had to maintain a consistent cart schema across multiple services, coordinate the complete purchase-to-dispute workflow, and handle Groq API rate limits without compromising system reliability.

Accomplishments that we're proud of

We successfully built an end-to-end workflow connecting signed spending mandates, AI-powered purchase evaluation, PayPal Sandbox payments, and tamper-evident decision records. The system also supports evidence-backed Defend/Concede dispute recommendations and refund workflows that restore the agent's available spending budget. We are proud to have built this complete workflow with 516+ automated tests.

What we learned

An AI agent should not be trusted to describe or verify its own actions. Accountability requires independent authorization, verifiable records, and evidence that can be examined when something goes wrong.

What's next for Gawah

Real merchant integrations, authenticated dashboards, and a hosted shopper.

Built With

Share this project:

Updates

Submission history