Tollgate is an open-source firewall for AI agents that move money through PayPal. Agents call Tollgate — over MCP or REST — instead of calling PayPal directly, and every money-moving request passes through a deterministic policy engine plus an AI guard that can only make verdicts stricter, never looser, before it ever reaches PayPal's sandbox.
flowchart LR
Agent[AI Agent] -->|MCP / REST| Gateway[apps/gateway]
Gateway --> Auth[Authn + idempotency]
Auth --> Policy[Policy Engine<br/>packages/policy]
Policy --> Guard[AI Guard<br/>packages/guard-ai]
Guard -->|allow| PayPal[PayPal Sandbox<br/>packages/paypal]
Guard -->|hold| Approval[Approval Request + ntfy]
Guard -->|block| Reject[Reject + reasons]
Approval --> Human[Human approves on phone]
Human --> PayPal
Gateway --> Audit[(Hash-chained audit log<br/>packages/db)]
Gateway -->|SSE| Dashboard[apps/dashboard]
TODO: docker compose up, pnpm demo, PayPal sandbox credentials.
TODO: 2-minute walkthrough script — legit payout, injected invoice blocked, held payout approved from phone, kill switch.
TODO: NL→policy compiler, injection scan, intent check — and why the AI can only escalate, never relax, a verdict.
TODO: Payouts, Captures Refund, Invoicing v2, Orders v2 — sandbox only.
TODO: trust boundaries, fail-closed rules, hash-chained audit log — see docs/ARCHITECTURE.md.
MIT — see LICENSE.