Inspiration
Fraud is fast. Finding it is slow. Most people learn about a bad payment days later, from a statement or an angry email. By then the money is gone.
Now AI agents are starting to pay, refund and buy on their own. One bad prompt, one scam email the agent reads, or one bug in a loop can drain an account while the owner is away.
So we built Bridge Warden around one simple safety light: green when all is well, yellow when something needs a look, red when something bad happened. It watches the money, and it calls you the moment it goes wrong.
Code: https://github.com/NefariousTrey/bridge-warden (public, Apache-2.0)
Proof first: a live sandbox run (Oct 27, 2026)
We staged a break-in: a $1.00 payout to a stranger's address.
- About 44 seconds from the payout to the owner's phone ringing.
- 0.66 seconds inside Bridge Warden: webhook in, signature checked with PayPal, red decision, call sent. The rest was PayPal's sandbox sending the event.
- PayPal sent 3 webhooks for that one payout. Bridge Warden raised one alert and made one call.
- The owner answered and said "it was me." Bridge Warden kept the hold until he cleared it in the app.
What it does
Bridge Warden watches every PayPal transaction, in and out, and guards the payments your AI agents propose. If anything looks wrong, the light goes red and your phone rings.
One light, three colors
- Green: all is fine. Safe payments go through quietly.
- Yellow: a check found something, or Bridge Warden is paused while you fix a problem.
- Red: something bad happened. It stays red until you respond, even after a restart.
- Red never jumps straight to green. "I've seen this" steps red to yellow. "It's fixed" turns yellow green. BW Light shows this on every page and in AG Studio.
It calls you
- A real fraud alert phone call through Twilio (your own Twilio account), in a natural Google Chirp3-HD voice you pick in Settings.
- The call walks you through PayPal's own steps. It never gives out a phone number: "use the number on paypal.com".
- A phone call can't clear red. Only the owner, in the app, can. A scammer on the line can't talk past it.
- Missed call? It tries again 15 minutes later, then once more: 3 calls in all. Optional email on missed calls if you set up email.
- No Twilio? Hear the call plays the same call in your browser.
It pauses while you fix it
- After you respond, the light steps down to yellow and Bridge Warden stays paused. New payments wait for your yes, so one problem can't turn into ten.
It checks its own work
- After every alert call and money action, it re-reads your PayPal state and compares it to its own log. A mismatch turns the light yellow and pauses it.
It guards AI agents
- An agent can only propose a payment. Bridge Warden answers ALLOW, HOLD (waits for your yes) or BLOCK, with plain-English reasons.
- It catches gift-card and crypto pressure, prompt injection, lookalike payees, hidden Unicode tricks, duplicate charges, fast loops and amounts over your limits.
- Your yes is bound to that exact payment, once.
It shows where your money goes (History, built on AG Grid and AG Studio)
- The BW AG Grid agent sorts spending into bills, subscriptions, gas, food and other, flags money spikes, and finds subscriptions paid twice or not used.
- It can only raise the light. It can never turn it green, approve, or move money.
- Ask the BW AG Grid agent in AG Studio's chat panel: real xAI answers with the real token cost shown under each one.
It keeps a record
- A signed, hash-chained History of every move and light change. Download it as proof for a dispute.
- Report to PayPal: a ready summary with times, amounts and IDs. You send it yourself.
Your data stays yours
- Your own copy keeps its data on your own computer or your own Render service. We never get it.
- Bridge Warden never turns on call recording.
Dev mode fires every light on purpose (red, yellow, back to green) under a bold TEST MODE banner, with sample data that never reaches PayPal.
AI notice: Bridge Warden is an AI and can make mistakes. It is built to catch most problems, but it doesn't replace your own eyes. Check your PayPal activity yourself from time to time.
How to try it
- Hosted demo, nothing to install: https://bridge-warden.onrender.com. Open the Judge Guide at /judges and follow the 6 steps. The login is in the private testing instructions. It runs on Render's free plan, so the first page can take about a minute to wake up. On this shared demo, Test my alert opens Hear the call. It never rings a phone.
- Your own copy in one click: press Deploy to Render: https://render.com/deploy?repo=https://github.com/NefariousTrey/bridge-warden. Render asks a few boxes, all optional (type
noneto skip). Add your own phone and your own Twilio for a real call. Add your own xAI key for AI. Your login key is made for you (Render, your service, Environment). It opens in Dev mode with sample data. For a real call, turn Dev mode off in Settings, then press Test my alert. - On your own computer, no phone: clone https://github.com/NefariousTrey/bridge-warden, run
python -m bridge_warden judge, openhttp://127.0.0.1:8765/, and press Hear the call. Full steps:README.md,SETUP_YOUR_OWN.mdandJUDGE_TESTING.md.
Tested in sandbox with sample data to verify it works as intended.
How we built it
- Python 3.10+, standard library only for the app. pytest for tests: 1019 passed, 20 skipped, 0 failed (Nov 4, 2026, commit 3f8ec92). The skipped tests need live PayPal sandbox or xAI access, the licensed AG Studio files, or private files kept off the repo.
- PayPal REST APIs (sandbox): OAuth 2.0, Orders v2 (create and capture), Payouts v1, Payments v2 refunds, Webhooks with
verify-webhook-signature, and Transaction Search as a backup poller. The client is locked to the sandbox host. - AI: xAI Grok API (structured JSON) as a stricter-only second opinion on proposed payments, on redacted summaries, and only with xAI Zero Data Retention confirmed. Grok also powers the help chats and the AG Studio chat. An offline Naive Bayes scam model scores every payment for free. The rules decide. The AI explains.
- Twilio Voice for alert calls, with a press-or-say menu and a Google Chirp3-HD voice. Cloudflare Workers answer the call menu and check Twilio's signature.
- AG Grid Community (MIT) for History grids, and AG Studio (Agent Framework: AgStudioAiModule, createAiHarness, our own xAI adapter, 4 read-only custom tools) for the BW AG Grid agent.
- Render: hosts the judge demo on the free plan, and a
render.yamlBlueprint powers the one-click Deploy to Render. - Under the hood: HMAC hash-chained audit log, approvals bound to a SHA-256 fingerprint of the exact action,
PayPal-Request-Idon every write, pinned HTTPS hosts, login cookie plus CSRF and Origin checks, a strict Content-Security-Policy. - Designed and built by Trey (@Nefarious_Trey), with Grok as a coding assistant.
Challenges we ran into
- PayPal sends the same story more than once. One payout made 3 webhooks, some 40 seconds late. We group events by payout batch: one problem, one call.
- A call is not proof of who you are. Anyone can say "it was me." The call can raise red but never clear it.
- Red forever is not helpful. We added the red-to-yellow step so the account stays paused, without screaming, until it is fixed.
- AG Studio vs. our strict page security. We moved AG Studio into its own small framed page and added a test that every owner button stays clickable.
- Letting judges try real calls safely. A shared demo can't ring strangers' phones on our account. So the hosted demo plays the call in the browser, and Deploy to Render gives each judge a full copy on their own Twilio.
Accomplishments that we're proud of
- A real phone rang about 44 seconds after a stranger payout, with 0.66 seconds spent inside Bridge Warden.
- Three webhooks, one alert, one call.
- A red light that can't be talked past on the phone.
- An AI agent that can raise the alarm but can never turn the light green or move money.
- 1019 passing tests, and a one-click copy anyone can deploy.
- A color-blind mode and status art with a built-in non-color cue.
What we learned
- Speed is the whole game in fraud.
- The AI must never be the thing that says yes. The human decides.
- Webhooks repeat and arrive late. Dedupe is not optional.
- Plain words beat clever ones when someone is scared about their money.
What's next for Bridge Warden
- Move from sandbox to live PayPal accounts, with a careful review of limits.
- More AG Studio views: risk trends and a market-price column.
- More alert channels and languages.
Built during the hackathon
Bridge Warden was built during the PayPal AI Hackathon submission period: the agent gate, the account watch, the alert calls, the light rules, the after-call audit, the History agent, the Deploy to Render Blueprint and the test suite. Code and assets (logo, cover art, dot art) were made new during the hackathon. It uses outside services and libraries that are not ours: PayPal APIs, xAI API, Twilio, Google Chirp3-HD voice through Twilio, Cloudflare Workers, Render, AG Grid Community (MIT), AG Studio (commercial, optional), Channel3 (optional) and Suno for the video music. The full list is in NOTICE in the repo.
Acceptable Use. This software may be used only for lawful purposes. You may not use it to harm, harass, defraud, deceive or exploit any person, or to infringe any person's rights, including rights to equal treatment, privacy and personal autonomy.
Disclaimer of Warranty. This software is provided "AS IS", without warranty of any kind, express or implied, including warranties of merchantability, fitness for a particular purpose and non-infringement. The authors developed it with reasonable care and due diligence and welcome feedback.
Limitation of Liability. In no event shall the authors be liable for any claim, damages or other liability arising from the use or misuse of this software, including any use that violates law or these terms.
Bridge Warden is an independent hackathon project. It is not a PayPal product and is not made or endorsed by PayPal.
Made by Trey (@Nefarious_Trey), with Grok as a coding assistant.
- Code: https://github.com/NefariousTrey/bridge-warden
- Find Trey and our other products: https://nefarioustrey.grok.me
Built With
- ag-grid
- ag-studio
- cloudflare-workers
- grok
- javascript
- naive-bayes
- paypal
- paypal-orders
- paypal-payouts
- paypal-rest-api
- paypal-webhooks
- pytest
- python
- render
- twilio
- xai