CHECKMATE — AI Agents That Shop for You, and Can Prove They Did It Right.
The Problem: Can You Really Trust an AI to Spend Your Money?
AI agents are rapidly changing how people shop online. Imagine telling an AI assistant to find and purchase the best laptop, headphones, or any other product within your budget. It sounds convenient, but there is a serious problem: how can you trust an AI agent with your money?
Traditional AI shopping assistants can hallucinate product details, overlook hidden costs, misunderstand purchase requirements, fall for manipulated product listings, or proceed with a purchase that no longer matches the user's original intent.
I believe an AI agent should not have unrestricted authority over someone's money.
My Solution: CHECKMATE
CHECKMATE is a multi-agent AI shopping and purchasing platform that I developed to make agentic commerce safer, more transparent, and verifiable.
I designed the platform around ten specialised AI agents that work together to understand shopping requests, discover real products, evaluate sellers, analyse terms, calculate costs, verify checkout details, manage payments, and reconcile purchases.
However, I established one fundamental principle:
AI agents can reason. They cannot independently authorise your money.
I implemented a deterministic policy engine that evaluates purchasing requirements and returns PASS, FAIL, or UNKNOWN. Missing information is never treated as approval.
The system generates a hashed, versioned purchase plan that the user must review and approve before payment can proceed.
Once the purchase is completed, CHECKMATE generates a cryptographically signed Purchase Truth Passport, providing verifiable evidence of what was requested, approved, checked, and paid.
How It Works
1. Understand
The user describes what they want in plain English. I use Gemini to transform the request into structured purchasing requirements, including budget, specifications, condition, delivery, and return preferences.
2. Discover
The Discovery Agent searches real product listings through Google Shopping, Amazon, eBay, and Walmart using SerpAPI.
3. Evaluate
I developed specialised agents to independently assess:
- Product relevance and specifications.
- Seller credibility and trust signals.
- Return policies, warranties, and subscription terms.
- Total costs, including shipping, taxes, and unknown charges.
4. Enforce
I implemented a deterministic policy engine that evaluates the collected evidence. It prevents AI-generated recommendations from overriding user-defined requirements.
5. Approve
CHECKMATE generates a hashed and versioned purchase contract. The user approves the exact purchase plan, and that approval is cryptographically bound to its version.
6. Verify and Pay
Before payment, CHECKMATE rechecks the live listing or inspects the partner merchant's checkout against the approved plan. Any mismatch blocks the payment.
I integrated PayPal Sandbox to handle order creation, buyer approval, payment capture, and refunds.
7. Reconcile and Prove
After payment, the Reconciliation Agent compares the actual transaction against the approved purchase plan. CHECKMATE then generates a signed, tamper-evident Purchase Truth Passport that can be independently verified.
What Makes CHECKMATE Different?
1. AI Does Not Control Your Money
I designed CHECKMATE to separate AI reasoning from financial authorisation. AI agents can recommend products, but only the deterministic policy engine can establish whether a transaction satisfies the user's purchasing rules.
2. UNKNOWN Never Means PASS
If a warranty, return policy, or other important detail cannot be verified, CHECKMATE does not invent an answer. It identifies the uncertainty and presents it to the user.
3. Protection Against Manipulated Listings
I implemented safeguards to treat product listings as untrusted data. Prompt injection attempts cannot override the user's original purchasing requirements.
4. Cryptographically Bound Approval
Purchase approvals are tied to a specific version and SHA-256 hash of the purchase plan. Even a change in the approved amount invalidates the previous approval.
5. Verifiable Purchase History
I implemented a hash-chained audit trail. The final Purchase Truth Passport is digitally signed and can be independently checked for tampering.
6. Human-Controlled Agentic Commerce
Users retain control through three operating modes: approve each purchase, configure spending mandates, or use watch-only mode.
PayPal Integration
I integrated PayPal as a central component of CHECKMATE's purchasing workflow rather than treating it as simply a payment button.
I used PayPal REST APIs in the Sandbox environment:
- Orders API v2: Creates orders and supports buyer approval and payment capture.
- Payments API v2: Supports refunds when reconciliation identifies a mismatch.
- Webhook verification: Verifies PayPal event signatures for payment capture and refund events.
- Idempotency: Uses PayPal-Request-Id to prevent duplicate payment operations.
- Signed authorisation: PayPal order creation is gated by a valid, HMAC-signed purchase approval.
This integration demonstrates how AI agents can participate in commerce without receiving unrestricted payment authority.
Built With
AI and Agents: Google Gemini 3.1 Flash Lite, specialised agent architecture, deterministic policy engine.
Payments: PayPal REST APIs, Orders v2, Payments v2, PayPal Sandbox, webhooks.
Backend: Python, FastAPI, SQLAlchemy.
Frontend: Next.js 14, TypeScript, Tailwind CSS.
Product Discovery: SerpAPI, Google Shopping, Amazon, eBay, Walmart.
Verification and Testing: Playwright, pytest, GitHub Actions.
Deployment: Docker, Render.
Challenges I Faced
One of my biggest challenges was ensuring that an AI-powered system could make intelligent purchasing recommendations without being trusted to make unrestricted financial decisions.
I addressed this by separating probabilistic AI reasoning from deterministic policy enforcement.
Another challenge was dealing with incomplete or manipulated product information. Instead of allowing the model to fill gaps with assumptions, I designed an evidence-based evaluation system in which unknown information remains explicitly unknown.
I also had to ensure that the purchase approved by the user was exactly the purchase presented to PayPal. I addressed this through versioned purchase plans, cryptographic approval signatures, live checkout verification, and transaction reconciliation.
What I Learned
Building CHECKMATE independently gave me the opportunity to explore the intersection of multi-agent AI systems, financial technology, cybersecurity, and agentic commerce.
I gained practical experience in multi-agent orchestration, secure API integration, deterministic decision systems, payment authorisation, cryptographic verification, and human oversight in financial automation.
Most importantly, I learned that the future of agentic commerce is not simply about making AI agents more autonomous. It is about making their actions accountable and verifiable.
What's Next?
I envision CHECKMATE evolving into a trust infrastructure for agentic commerce, enabling consumers to delegate shopping tasks while retaining verifiable control over their money.
My future plans include deeper merchant integrations, automated real-store checkout verification, external timestamping, and more sophisticated spending mandates.
CHECKMATE — Because "the AI bought it" should come with proof.
Built With
- agentic-ai
- artificial-intelligence
- docker
- fastapi
- github-actions
- google-gemini
- multi-agent-systems
- next.js
- paypal
- paypal-sandbox
- playwright
- pytest
- python
- render
- rest-api
- serpapi
- sqlalchemy
- tailwind-css
- typescript