Inspiration
Every year, enterprises lose billions of dollars in vendor disputes, delayed
purchase orders, and frozen payment cards. While Large Language Models can write code and summarize documents, they have historically been dangerous to trust with corporate funds due to prompt injection risks and hallucinations.
What it does
NexusCommerce AI is an autonomous multi-agent procurement platform that automates sourcing, dynamic negotiation, milestone-based fund holds, and dispute evidence compilation:
1. **The Mandate as the Core Object**: The buyer signs a cryptographically
bound ProcurementMandate defining hard envelopes: item specifications,
quantity, max unit price ceiling, budget cap, and delivery deadlines.
2. "Code Decides, LLM Proposes": Agents negotiate dynamically, but a
deterministic Python PolicyEngine is the exclusive gatekeeper to PayPal
API calls. Any out-of-bounds offer immediately trips a circuit breaker into a
Human-in-the-Loop (HITL) review hold.
3. PayPal Two-Step Milestone Captures: Rather than simple instant payments,
funds are managed through PayPal Orders v2:
- Milestone 1 (Pre-Authorization Hold): 100% of funds are secured under
a 29-day authorization hold (intent: AUTHORIZE).
- Milestone 2 (Mobilization Partial Capture): 30% is disbursed upon
carrier tracking departure scan (final_capture: false) with explicit PayPal-
Request-Id idempotency.
- Milestone 3 (Final Settlement Capture): The remaining 70% is captured
only upon certified delivery (final_capture: true).
4. Tamper-Evident Evidence Bundles: Every deal generates a Merkle-sealed
audit trail combining the signed mandate, negotiation transcript, agreement
canonical SHA-256 hash, carrier proof, and PayPal capture receipts for instant
dispute defense.
5. AG Studio & AG Grid Spend Intelligence: An interactive analytics
command center providing negotiation alpha metrics, dynamic convergence curves,
and CSV audit exports.
6. Zero-Key Judge Harness: A built-in demo mode allowing evaluators to
audit the full lifecycle end-to-end with zero API keys required.
How we built it
We built NexusCommerce AI to solve a fundamental question: How can autonomous AI agents negotiate and procure high-value B2B enterprise goods while providing 100% mathematical safety and tamper-proof dispute defense on PayPal?
Challenges we ran into
- Preventing Prompt Injection in Financial Agents: We rejected the common
flaw of relying on LLMs to self-police. Instead, we architected a strict "Code
decides, LLM proposes" invariant where an un-bypassable Python policy layer
mathematically asserts unit prices and budget ceilings before any API execution.
- Reconciling Multi-Stage Math Across Agent Loops: Synchronizing agent bid spreads, multi-unit quantities, partial capture percentages (30/70), and supplier asking quotes into a single source of truth across all analytics components.
- Cross-Platform Resilience: Developing and verifying the entire stack inside an ARM64 Linux container with zero-cost serverless compatibility.
Accomplishments that we're proud of
- 22 passing automated tests with 100% deterministic coverage of edge cases, adversarial surge attacks, and webhook idempotency.
- Adversarial Surge Protection: Deflected a simulated rogue vendor prompt injection attempt, freezing unauthorized spend with $0.00 capital loss.
- Production-Ready Dispute Defense: Generating a legal-grade dispute certificate package with cryptographic Merkle verification in under 50 milliseconds.
What we learned
We gained a deep appreciation for PayPal Orders v2 Two-Step Authorization & Capture architecture. Unlike simple one-click checkouts, milestone authorizations provide the exact technical foundation needed for enterprise agentic commerce without requiring third-party escrow accounts.
What's next for NexusCommerce AI
- Direct bi-directional ERP integration with SAP S/4HANA and NetSuite.
- Cross-border multi-currency FX hedging for international supply chains.
Log in or sign up for Devpost to join the conversation.