Inspiration
As AI agents become increasingly capable of performing tasks independently, including making purchases and handling financial transactions, an important question arises: How do we ensure that AI acts within the limits of the user's trust and authority? We were inspired by the growing potential of agentic commerce but also recognized its risks. An AI agent should be able to recommend and initiate purchases, but it should never have unrestricted control over a user's money. This led us to build ClearGuard-OS, a payment protection layer designed to make autonomous AI transactions safer and more accountable.
What it does
ClearGuard-OS introduces a controlled workflow between AI agents and payment systems. Before a transaction proceeds, our deterministic Guardrail Engine checks user-defined budgets, spending limits, and permitted purchase categories.
The platform combines:
AI-powered purchase initiation to support intelligent transaction workflows.
Deterministic guardrails to block unauthorized or excessive spending. PayPal integration for payment order creation and authorization. Buyer approval to keep users in control of financial decisions. Delivery verification to support controlled payment progression. Tamper-evident audit ledger to maintain transaction history and accountability. Our central principle is simple: AI can initiate a purchase, but the user remains in control of the money.
How we built it
We developed ClearGuard-OS using a Next.js frontend and a Python FastAPI backend. The backend handles transaction workflows, validation, authentication, and payment-related operations. PayPal Sandbox supports the payment integration, while a deterministic rule engine enforces transaction policies independently of AI-generated decisions. We also developed a delivery verification workflow and a cryptographic audit ledger using SHA-256 hashing to improve transaction traceability
Challenges we ran into
One of our biggest challenges was designing a system where AI flexibility would not compromise financial security. We had to ensure that AI-generated decisions could never bypass deterministic spending restrictions. Integrating payment authorization while separating it from payment capture was another important challenge. We also worked on authentication, evidence verification, webhook replay protection, transaction consistency, and secure handling of delivery-review decisions. Rather than treating payment protection as a simple API integration, we approached it as a complete security and trust problem.
Accomplishments that we're proud of
Successfully building an independent deterministic rule engine that cannot be overridden by AI-generated prompts or decisions.
Implementing a seamless PayPal Sandbox payment integration with a clear separation between order authorization and capture.
Developing a cryptographic audit ledger using SHA-256 hashing that guarantees transparency and traceability for every agentic transaction.
What we learned
Building ClearGuard-OS strengthened our understanding of payment workflows, API integration, backend security, authentication, cryptographic verification, and responsible AI system design. Most importantly, we learned that building trustworthy AI is not just about making agents more capable. It is about ensuring that their capabilities operate within clear, enforceable boundaries.
What's next for ClearGuard-OS
Expanding multi-gateway payment support beyond PayPal to include major credit card processors and alternative payment rails.
Implementing advanced, fine-grained spending policies (e.g., recurring subscriptions, merchant whitelists, and dynamic risk scoring).
Introducing a multi-user enterprise workspace for managing team budgets and agent permissions.
Built With
- autonomous
- cryptography
- fastapi
- gateway
- next.js
- payment
- paypal
- python
- react
- sandbox
- security
- sha-256
- tailwind
- typescript