Inspiration

AI agents are beginning to move money on their own. A hallucinated invoice or a prompt injection hidden inside a payment request can drain an account before a human ever sees it. Today's payment flows assume a person clicks "pay". We built the control layer that assumes the requester is an agent, and treats every request as untrusted until it proves otherwise.

What it does

VaultPay Guard puts five gates between an AI agent's payment request and your money:

  1. Proposer — an LLM turns the request into a structured payment intent.
  2. Injection guardrail — the request is scanned for prompt-injection and manipulation attempts. Blocked requests never reach evaluation.
  3. Policy engine — deterministic rules, not vibes: per-transaction cap of $250, daily cap of $500, a balance limit, and a payee allowlist.
  4. Independent checker — a second model reviews the proposal against policy. It can only tighten a decision, never loosen one, and unparseable output fails closed.
  5. PayPal execution — approved payments are created and captured through the official PayPal Orders API (sandbox).

Every decision, pass or reject, is written to a public audit ledger rendered with AG Grid, so anyone can replay exactly why money moved, or didn't.

Live proof on PayPal Sandbox: a legitimate $120 invoice passed all five gates and was captured end to end (Order 74Y1949148771203J, Capture 3H61088581550660S). A $900 payment was rejected by the policy caps. A payment request carrying a prompt injection was blocked by the guardrail before evaluation.

How we built it

The core service is Python using only the standard library, talking to the PayPal Orders API v2 in sandbox mode. An LLM proposer/checker pair handles intent and review, a JSON policy file drives the deterministic engine, decisions are appended to a JSONL audit ledger, and the ledger is presented with AG Grid. The app is deployed on Render. 83 automated tests cover the policy engine, the guardrail, and the ledger. Execution is two-phase and idempotent: creating an order and capturing it are separate, explicit steps.

Challenges we ran into

The PayPal sandbox checkout can look like it loops on the approval step while the approval is actually recorded server-side, so we learned to verify state through the API and the ledger instead of trusting the UI. We also had to make the checker fail closed: any output we cannot parse must reject the payment, never approve it.

Accomplishments that we're proud of

A real end-to-end capture on PayPal Sandbox with verifiable order and capture IDs, a guardrail that demonstrably stops an injection attempt before evaluation, and a public ledger that makes every single decision auditable after the fact.

What we learned

When money moves, determinism beats intelligence: the LLM proposes, but plain code disposes. Separating the proposer from an independent checker catches failure modes that a single model happily waves through.

What's next for VaultPay Guard

Mainnet rollout with human-in-the-loop approval above configurable thresholds, richer policies (velocity limits, merchant categories, per-agent budgets), webhook-based reconciliation, and alerts whenever the guardrail blocks a request.

Since submitting, VaultPay Guard was selected for the XERJ Corpus Hub, a public index of code solutions that AI agents consult as a reference: https://hub.xerj.org/contributors/dropjoin

Built With

Share this project:

Updates

Submission history