Inspiration

AI agents are becoming increasingly capable of handling everyday tasks, including searching for products, comparing prices, and making purchasing decisions. But giving an AI agent the ability to shop raises an important question: How do we give AI the freedom to act without giving it unrestricted control over our money? We were inspired by the need to make agentic commerce safer and more trustworthy. Imagine asking an AI assistant to handle your weekly grocery shopping. You want it to find the best deals and save you time, but you don't want it exceeding your budget, purchasing from untrusted merchants, or making expensive decisions without your permission. That is the problem we set out to solve with SpendGuard.

What it does

SpendGuard is an AI-powered shopping agent that allows users to delegate product discovery and shopping preparation while maintaining control over their spending. Users can define financial rules such as: Weekly or monthly spending budgets. Maximum purchase amounts before approval is required. Approved merchants and restricted merchants. Spending limits for specific categories. Users can then describe what they want in natural language. The AI agent searches the available products, compares options, and prepares a shopping cart. Before a purchase proceeds, SpendGuard's independent policy engine evaluates it against the user's spending rules. Depending on the result, a purchase can be: Allowed: The purchase satisfies the user's configured rules. Requires approval: The purchase exceeds an approval threshold and needs the user's authorization. Blocked: The purchase violates a restriction, such as an unapproved merchant. For eligible purchases, users can review the cart and proceed through PayPal Sandbox checkout. The core idea is simple: AI can recommend and prepare purchases, but it cannot independently authorize itself to spend the user's money.

How we built it

e designed SpendGuard around a clear separation of responsibilities: the AI agent handles shopping intelligence, while a deterministic policy engine handles financial authorization.

Our technology stack includes:

React, TypeScript and Vite: For the interactive frontend and shopping experience. ASP.NET Core and C#: For backend APIs, business logic, policy evaluation, and payment orchestration. PostgreSQL(Neon): For user profiles, spending rules, products, carts, approvals, and transaction records. AI integration: For natural-language shopping requests, product discovery, comparisons, and cart preparation. PayPal Developer Platform: For integrating PayPal Sandbox checkout into the purchasing workflow. The purchase workflow follows these steps: The user defines spending rules. The AI agent interprets the shopping request and prepares a cart. The backend sends the proposed purchase to the policy engine. The policy engine evaluates the cart against the user's rules. If approval is required, the user reviews and authorizes the purchase. The user completes the PayPal Sandbox checkout. The backend verifies the payment outcome and updates the transaction records. An important architectural decision was to keep financial authorization outside the AI agent. The agent cannot modify the user's rules, approve its own purchase, or bypass the policy engine.

Challenges we ran into

One of our biggest challenges was finding the right balance between AI autonomy and financial control. An AI shopping agent should be useful enough to make decisions and reduce manual effort, but it should never have unrestricted authority over a user's finances. We addressed this by separating AI-generated recommendations from deterministic backend decisions.

Other challenges included:

Designing reliable spending rules: Ensuring that budgets, merchant restrictions, and approval thresholds are evaluated consistently. Payment authorization: Understanding the distinction between an AI preparing a purchase and a buyer actually authorizing a PayPal payment. Payment state management: Ensuring that a checkout redirect or frontend action is not mistaken for a successfully completed payment. Security and trust: Preventing the AI agent from changing policies or accessing sensitive payment credentials. User experience: Making spending decisions and approval requirements clear without making the shopping process unnecessarily complicated. These challenges helped shape SpendGuard into more than a conventional AI shopping assistant.

Accomplishments that we're proud of

We are proud of building a concept that addresses one of the most important questions surrounding agentic commerce: how can people trust AI agents to perform financial tasks? Some of our key accomplishments include: Creating an AI-powered shopping experience driven by natural-language instructions. Designing an independent spending policy engine that evaluates purchases before payment. Establishing clear purchase outcomes: allowed, requires approval, or blocked. Integrating PayPal Sandbox into the purchase workflow. Separating AI decision-making from financial authorization. Designing a system where users remain in control of their budgets, merchant permissions, and purchase approvals. Our biggest accomplishment is the principle behind SpendGuard: we don't believe the future of AI commerce should require users to surrender control of their money.

What we learned

We learned that building a useful AI agent is not just about making it intelligent. It is equally important to define what the agent is allowed to do, what it must never do, and who has the final authority.

We also gained a deeper appreciation for the complexities of payment workflows, particularly the difference between creating an order, obtaining buyer approval, capturing a payment, and confirming its final status.

What's next for Guardrail AI/ Spendguard

We see SpendGuard as more than a hackathon project. We believe it could become a financial control layer for the next generation of AI-powered commerce.

Our next steps include:

More payment integrations: Expanding beyond the initial PayPal Sandbox experience as supported payment capabilities become available. Advanced spending policies: Supporting recurring budgets, category-specific limits, time-based restrictions, and more granular purchase permissions. Spending intelligence: Providing interactive dashboards, spending trends, merchant comparisons, and AI-powered financial insights. More merchant integrations: Connecting to real merchant catalogues and expanding product discovery beyond a curated marketplace. Improved AI autonomy: Exploring delegated purchasing capabilities where supported, while maintaining strict user-defined permissions and approval boundaries. Production readiness: Strengthening security, fraud prevention, auditability, payment reconciliation, and scalability. Our long-term vision is to make it possible for anyone to delegate everyday shopping to AI with confidence, knowing that their financial rules remain in control.

Built With

Share this project:

Updates

Submission history