Inspiration

AI agents are evolving from assistants into autonomous systems capable of making decisions, purchasing services, and initiating payments.

But this raises an important question: How do we trust an AI agent with our money?

An agent authorized to spend $200 shouldn't be able to make a $10,000 purchase, bypass restrictions, or continue making payments after its access has been revoked.

We built AgentGuard because giving an AI agent access to payments should never mean giving it unlimited financial authority.

Our goal is simple: Make autonomous payments secure, controlled, and accountable.

What it does

AgentGuard is an AI-powered security gateway that verifies and evaluates autonomous agents' payment requests before money moves through PayPal.

It provides five core capabilities:

  • Agent Identity Verification: Uses Ed25519 digital signatures, credential validation, and replay protection to verify payment requests.
  • Spending & Policy Enforcement: Enforces transaction limits, budgets, and merchant restrictions before authorizing payments.
  • Anomaly Detection: Combines explainable rules for unusual spending amounts, transaction velocity, and other risk signals with optional scikit-learn Isolation Forest inference. The model is trained on synthetic transaction data and used when sufficient history is available. The Attack Simulator's displayed risk results are generated by deterministic backend rules, not fabricated ML predictions.
  • PayPal Integration: Connects authorization, budget reservations, PayPal Sandbox order creation, buyer approval, capture, and settlement.
  • Security Dashboard: Provides visibility into agents, transactions, authorization decisions, and security events.

We also built an interactive Attack Simulator featuring three rotating security modes and nine test cases covering identity attacks, spending violations, and behavioral anomalies.

Unlike a scripted UI demonstration, its security decisions are calculated by the actual backend in an isolated testing environment.

Try AgentGuard Live

How we built it

AgentGuard combines a security-focused backend with an interactive monitoring dashboard.

  • Backend: Python, FastAPI, SQLAlchemy, and Alembic
  • Frontend: React, TypeScript, Vite, Tailwind CSS, and AG Grid
  • Security: Ed25519 cryptographic signatures, nonce-based replay prevention, spending policies, and idempotent budget reservations
  • AI/ML: Rule-based anomaly detection with optional Isolation Forest inference
  • Payments: PayPal Sandbox Orders v2
  • Database: SQLite for local development and Neon PostgreSQL for hosting
  • Deployment: Render

Each payment request passes through identity verification, policy enforcement, and risk evaluation before it can proceed to PayPal checkout.

We used AG Grid to make security data easier to investigate, with interactive sorting, filtering, pagination, custom cell renderers, and CSV exports. The public application runs on Render, with Neon PostgreSQL supporting hosted storage.

A key design decision was keeping identity verification, policy enforcement, risk evaluation, and PayPal execution separate. This means an agent can pass authentication but still have its payment blocked by a spending limit or risk decision.

Challenges we ran into

Our biggest challenges were:

  • Securing agent identities: Preventing impersonation, tampered requests, revoked credentials, and replay attacks.
  • Enforcing financial limits: Handling concurrent transactions without allowing agents to exceed their authorized budgets.
  • Preventing duplicate payments: Implementing idempotency and safely handling uncertain PayPal responses.
  • Integrating PayPal Sandbox: Connecting authorization, buyer approval, capture, and budget settlement into one reliable workflow.
  • Deploying a secure public demo: Keeping simulations isolated from operational payment data while providing an accessible hosted experience.

Each challenge reinforced how important reliability and accountability are when software is allowed to spend money.

Accomplishments that we're proud of

Our biggest milestone was successfully completing a real $5.00 USD PayPal Sandbox payment from start to finish.

The verified flow included:

Signed Authorization → ALLOW → PayPal Order → Buyer Approval → Capture COMPLETED → Budget Settled

The transaction used Sandbox test funds, not real money.

Other accomplishments include:

  • 308 automated tests passed — 232 backend and 76 frontend.
  • 9 backend-executed attack scenarios across three rotating simulator modes.
  • Cryptographically verified agent identities with replay and credential-revocation protection.
  • Database-backed spending controls with concurrency and idempotency safeguards.
  • A publicly deployed interactive dashboard for demonstrating payment security.

The hosted demo uses synthetic data, while the completed PayPal Sandbox payment was verified separately through local integration testing.

What we learned

Building AgentGuard taught us that verifying an agent's identity is not the same as authorizing its actions.

Even a legitimate agent should only be allowed to spend within clearly defined financial boundaries.

We also learned how critical concurrency, idempotency, and payment reconciliation are when dealing with financial transactions.

Most importantly, we realized that trustworthy autonomous AI needs enforceable security controls, not just instructions telling agents to behave responsibly.

What's next for AgentGuard

We want to expand AgentGuard into a reusable security layer for agentic commerce.

Our future plans include:

  • Human-in-the-loop approvals for high-risk transactions.
  • Advanced behavioral ML models for more intelligent anomaly detection.
  • Developer SDKs for integrating AgentGuard with popular AI-agent frameworks.
  • Multi-agent financial governance with shared budgets and delegated permissions.
  • Production-readiness improvements and broader PayPal integration testing.

Our Vision

As AI agents become capable of spending money independently, businesses will need security infrastructure that gives them control without sacrificing automation.

AgentGuard makes a step toward that future: autonomous payments with verified identity, enforceable permissions, and financial accountability.

Autonomy without unrestricted authority. Payments protected by AgentGuard.

Built With

Share this project:

Updates

Submission history