AgentAllowance: Bringing Trust and Control to AI-Powered Commerce

About AgentAllowance

AI agents are becoming increasingly capable of making purchases and handling payments on behalf of users. However, giving autonomous agents access to money without proper restrictions creates risks such as overspending, unauthorized purchases, and manipulation through malicious instructions.

We built AgentAllowance, a smart spending control system that adds a security layer between AI agents and PayPal.

Our goal is to make AI-powered shopping safer by ensuring that users remain in control of every spending decision.

How We Built It

AgentAllowance combines a deterministic rules engine, Google Gemini AI, and the PayPal Orders API.

Users can define spending policies in natural language, such as monthly budgets, category limits, restricted categories, and approval thresholds.

Gemini converts these instructions into structured rules and checks whether a requested purchase matches the user's original task.

Our system evaluates every transaction and produces one of three decisions:

  • ALLOW: The purchase satisfies the applicable rules and intent checks.
  • ASK: The purchase requires user approval.
  • BLOCK: The purchase violates a spending restriction.

For payment processing, we integrated the PayPal Orders API in the sandbox environment. The payment workflow supports order creation, buyer approval, and payment capture.

We also developed a dashboard with transaction monitoring, approval controls, an audit log, and an emergency kill switch.

What Makes It Different?

Traditional spending limits mainly check whether a purchase is within budget.

AgentAllowance goes further by checking whether the purchase is actually related to what the user requested.

For example, if a user asks an agent to buy coffee beans, Gemini can identify whether the selected product matches that task. A cloud storage subscription might be within budget but unrelated to the user's request, so it can be sent for approval.

This combination of financial rules and AI-powered intent verification is our key innovation.

Safety and Security

We designed the system with safe defaults:

  • If AI verification fails, the transaction is sent for user review.
  • AI-generated outputs are validated before use.
  • Purchase descriptions are treated as untrusted data.
  • Pending transactions reserve budget to prevent overspending.
  • The kill switch allows users to pause the agent.

What We Learned

Through this project, we explored how payment APIs and generative AI can work together in an agentic commerce environment.

We gained practical experience with PayPal sandbox integration, Gemini API integration, backend development, transaction validation, and building user-focused financial controls.

Future Scope

We plan to extend AgentAllowance with merchant allowlists, detailed spending reports, separate allowances for individual AI agents, and saved payment methods for controlled autonomous payments.

Our vision is simple:

Let your agent shop, without giving it your wallet.

Built With

Share this project:

Updates

Submission history