Inspiration

One of us grew up around Pune's auto belt, in Chakan, where Tier-1 suppliers build controllers for EV makers. The pattern there is always the same. A supplier emails "goods dispatched, please release payment." The buyer pays. A week later the line stops, and it turns out nothing ever left the supplier's dock.

Then we looked at the numbers:

  • One hour of downtime in a large car plant costs about $2.3M (Siemens, 2024).
  • Maruti Suzuki couldn't build ~46,000 cars in a single quarter because of missing chips.
  • Duplicate payments are the #1 cause of lost profit in accounts payable (apexanalytix, 2026).
  • Business-email fraud cost companies $2.77B in one year (FBI IC3).

Lying suppliers aren't the real problem. The buyer carries all the risk: overpriced quotes, slipped dates, double invoices, fake bank-account changes, and deadlines that collapse because one part got stuck. So we built a team of AI agents that works for the buyer.

What it does

DisruptionOps is a buyer-side multi-agent system. It watches every customer project, part, supplier, shipment and dollar.

A Supervisor (LangGraph) routes every turn to one of eight specialists:

Agent Job
Sentinel Risk triage; patrols buy timers, supplier push-outs and expiring PayPal holds
Investigator Builds the evidence; Gemini reads supplier claims against carrier truth
Liaison Every email: RFQs, chases, and payee-change confirmations to the contact on file
Sourcing Deterministic solver, informed by long-term supplier memory
Approval Pauses the graph with interrupt() until a human decides
Procurement Raises purchase orders
Treasurer The only agent that can move money, with no LLM inside; every PayPal call goes through the guards
Verifier Closes an incident only when usable stock covers the need

A Copilot (Gemini ReAct agent) answers questions using read-only tools, including the PayPal Agent Toolkit.

The Buyer Shield: guards between the agents and your money

Guard What it stops
Fair price Broker markups (a quote at 4.6× should-cost was blocked)
Budget envelope Spending past a project's cap for its date window
Payee lock "We changed our bank account" fraud: 72 h cooling-off, confirmation sent to the contact on file, owner sign-off
Duplicate shield The same PO or invoice paid twice (CC-7725 vs CC-7725-A)
Pay-on-proof Paying for goods that never shipped: PayPal hold, captured only on a verified receipt
Late credit + quality holdback The late penalty and rejected units come off the capture; retention waits for line acceptance
Hold expiry A PayPal hold expiring during a long ocean voyage
Early-pay + chargebacks Takes 2/10 discounts when they beat the cost of capital; bills suppliers for rework by PayPal invoice

Buy timers. Every part on every project gets an order-by date:

$$ t_{\text{order-by}} = t_{\text{need}} - L_{\text{lead}} - T_{\text{transit}}(\text{mode}) - B_{\text{buffer}} $$

When a timer turns red, the Sentinel hands the part to the team. The order still has to pass every guard before PayPal holds the money.

Late-delivery credit, enforced through a PayPal partial capture:

$$ C = V_{PO} \cdot p_{LD} \cdot \frac{d_{late}}{7}, \qquad \text{capture} = V_{\text{accepted}} - C - R_{\text{retention}} - D_{\text{early-pay}} $$

Early-pay optimizer: a "2/10 net 30" term is worth paying early when

$$ r = \frac{d}{100-d}\cdot\frac{365}{n_{net}-n_{disc}} \approx 37\% > \text{cost of capital} $$

Verified live on the deployed system (PayPal sandbox):

  • Supplier lie caught. A supplier claimed "dispatched" while the carrier showed "no pickup". The Investigator caught it, and the Treasurer voided the $1,404.76 PayPal hold.
  • Memory used. Sourcing excluded that supplier because of its record in long-term memory.
  • Human approval mid-run. The graph paused for approval and resumed on the same thread, raising a new PO and hold.
  • Broker quote blocked. A quote at 4.6× should-cost was refused: $3,400 overcharge stopped.
  • Late, partly rejected delivery (PO-7718, 6 days late, 380/400 units passed):
    • −$174.88 late credit;
    • $408.05 retention held;
    • $3,497.55 captured and paid out to the locked payee.
  • Duplicate invoice refused (CC-7725-A).
  • Early-pay discount of 2% taken (37%/yr vs 12% cost of capital).
  • Chargeback sent to a supplier as a real PayPal invoice (INV2-JPSU-F5RF-66EG-KFPB).
  • Inbound email. A supplier's "please pay our new PayPal account" email (look-alike domain) was locked. A "PO-7718 will now ship on 24 Nov" email became a push-out the team chased.
  • Hidden shared supplier. Two "independent" connector suppliers turned out to depend on the same plating house, flagged on the globe.

How we built it

The core rule: AI reads, deterministic code decides, and only the Treasurer moves money, through PayPal.

  • LangGraph multi-agent graph:
    • Supervisor + 8 specialists;
    • AsyncPostgresSaver checkpoints every turn (one thread per incident, restart-safe);
    • interrupt() / Command(resume=…) for human approvals;
    • AsyncPostgresStore for long-term memory (supplier trust: trusted / watch / proof-only, plus past incident episodes).
  • Gemini reads messy inputs: supplier emails, quotes, claims, QC notes. It drafts messages and powers the Copilot. Its output is treated as untrusted and it never calls a payment API.
  • Python (FastAPI) runs:
    • the solver (certification, hazmat, budget, due date);
    • the three-way match (PO ↔ invoice ↔ goods receipt);
    • every guard, with each verdict written to a guard_events ledger.
  • PayPal (sandbox), the full money lifecycle:
    • Vault v3: a one-time human-approved spending mandate.
    • Orders v2 AUTHORIZE: holds funds without moving them.
    • Payments v2: capture, partial capture (final_capture=false for retention), void, refund, reauthorize.
    • Payouts: only to the locked, verified supplier payee.
    • Invoicing v2: supplier chargebacks.
    • Webhooks: signature-verified and idempotent; they never overwrite finer states.
    • Agent Toolkit: read-only tools for the Copilot.
  • Email: SMTP out (approval codes, chases, confirmations) and IMAP in. Supplier replies are parsed and routed to the agents: payee changes, acknowledgements, new ship dates.
  • Frontend: React 19 + Tailwind v4, "Lavender Glass" design.
    • AG Grid Enterprise: materials tree, PayPal ledger, guard ledger, supplier trust.
    • AG Studio: finance dashboards.
    • Bryntum Gantt / Scheduler / TaskBoard: timeline with order-by and payment milestones, supplier lanes, incident board.
    • Mapbox GL: supply globe with sub-tier links.
    • Live Agent Team and Messages screens.
  • Infrastructure:
    • Supabase Postgres with row-level security per organisation;
    • Render (Docker, migrations on boot);
    • Vercel;
    • a Postman collection for every agent, guard and PayPal endpoint.

Challenges we ran into

  • A vaulted PayPal token can't pay a third party directly (BILLING_AGREEMENT_NOT_FOUND). We redesigned the flow: hold and capture to the platform merchant, then Payout to the verified supplier. That is exactly where Payee Lock, late credits and retention fit.
  • Concurrency vs tenancy. A PayPal webhook arriving mid-capture reset our per-request tenant setting on Supabase's transaction pooler, so a payout log write failed. We moved to the session pooler, and payment events now inherit their organisation from the payment row.
  • Evidence arrives mid-run. The carrier scan that exposes a lie can land while the agents are still working. We coalesce new evidence into one follow-up run on the same thread instead of dropping it.
  • Memory that's fair. Our first trust rule banned a supplier after a single late delivery. Now lying or a payee-redirect attempt disqualifies a supplier on its own, while lateness and defects only count when they repeat. Trust is recomputed from history on every read.
  • Holds expire. PayPal authorizations expire after 29 days, so the Sentinel reauthorizes long-transit holds.
  • Webhooks vs our own states. PayPal's "capture completed" webhook was overwriting "retention held". Reconciliation now keeps finer states.

What we learned

  • Supply-chain trust is a payments problem as much as a logistics one. When money moves only on proof, suppliers lose the incentive to lie.
  • The best AI-plus-money design is agents for language and coordination, code for decisions, PayPal for custody.
  • Real procurement pain (duplicate invoices, payee fraud, unenforced late penalties) is boring, and worth billions.

What's next

  • Live PayPal onboarding for supplier accounts.
  • Real commodity-index feeds for automatic price cuts.
  • Sub-tier supplier declarations collected over email.
  • A pilot with a Chakan Tier-1 plant.

Built With

Share this project:

Updates

Submission history