Inspiration
PayPal's Agent Toolkit gives AI agents real power over a business account, with on and off switches as its only control. Prompt injection means a customer's email can steer that power.
What it does
Leash is a firewall between any AI agent and PayPal. Owners write rules in plain words. Every one of the 47 toolkit tools passes through them, and every claim is checked against PayPal's own records. Actions are allowed, held for one-tap approval, or blocked, and all of it is logged.
How we built it
Next.js 16, PayPal Agent Toolkit, Orders, Refunds, Invoicing and Vault, Gemini function calling, Postgres on Neon, a stateless MCP gateway, AG Grid for the audit log, and a pure decision engine tested with fast-check.
Challenges we ran into
A property test caught a bypass in our own ownership check, and a live run caught an agent creating the same invoice twice. Both are now covered.
What's honest about it
Leash limits what a fooled agent can do. It cannot stop a wrong refund that fits every rule, and it runs on the PayPal sandbox.
Built With
- ag-grid
- fast-check
- gemini
- mcp
- neon
- next.js
- paypal
- postgresql
- typescript
- vercel