Inspiration

Traditional freelance and contractor platforms take an exorbitant 10% to 20% cut, freeze funds for 7 to 14 days, and rely on slow, manual dispute mediation. At the same time, we are entering the era of Agentic Commerce—where autonomous AI agents, coding agents, and human developers collaborate.

Yet, there was no trustless, programmatic payment layer capable of:

  1. Objectively scoping contracts into cryptographically testable criteria.
  2. Holding funds securely in PayPal Escrow.
  3. Autonomously verifying code PRs, unit tests, and deliverables without human bias.
  4. Triggering instant, programmatic PayPal payouts upon verified proof-of-work.

We built AgentPact to turn PayPal into the foundational settlement protocol for the agentic economy.

What It Does

AgentPact orchestrates a three-agent autonomous financial workflow:

  • 🤖 AI Contract Scoper (Gemini 2.5 Flash): Ingests unstructured client PRDs and synthesizes weighted, verifiable acceptance rubrics with milestone amounts.
  • 💳 PayPal Smart Escrow Engine (Orders v2): Programmatically authorizes and locks client funds into a sandbox escrow vault.
  • 🧠 Autonomous Code Verifier Agent: Audits GitHub PRs, commits, and deliverable notes against acceptance criteria with zero-hallucination evidence matching.
  • ⚡ Instant PayPal Payouts (Payouts v1): Upon passing score ($\ge 80\%$), instantly dispatches funds directly to the freelancer's PayPal email with unique batch tracking.
  • ⚖️ Autonomous Arbitrator Agent: In disputes, synthesizes technical evidence and executes fair, binding pro-rata splits.
  • 📊 Enterprise Command Center (AG Grid v33+): Provides real-time financial telemetry, escrow risk scoring, sorting, and live transaction filtering.

How We Built It

  • Frontend & Fullstack: Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS, Lucide Icons.
  • Enterprise Grid: AG Grid Community v33+ customized with themeQuartz fintech dark mode.
  • Database: Neon Serverless PostgreSQL with Prisma ORM.
  • AI Core: Google Gemini 2.5 Flash (@google/generative-ai) with structured JSON schema outputs.
  • Payment Rails: PayPal REST API v2 (Orders API v2 for escrow hold, Payouts API v1 for instant milestone disbursement).
  • Security Guardrails: SHA-256 deliverable fingerprinting, prompt-injection sanitization, and state-machine balance guards.

Challenges We Overcame

  1. Preventing Agent Payout Exploitation: Built an immutable financial state machine so an AI agent can never trigger an unauthorized payout without meeting strict verification criteria.
  2. PayPal Sandbox Order Lifecycle: Implemented a dual authorization architecture handling both live sandbox checkout approvals and instant fast-track demonstration modes.
  3. Zero-Hallucination Audits: Engineered a strict evidence verification guardrail requiring verbatim code citations before any milestone criterion can be approved.

Accomplishments We're Proud Of

  • Flawless end-to-end integration of real PayPal Sandbox Orders and Payouts.
  • Dual-Perspective synchronized UI enabling clients and developers to test both roles in real time.
  • Production-grade deployment with zero TypeScript errors.

What's Next for AgentPact

  • GitHub Webhook sidecar to automatically verify commits on git push.
  • Multi-currency support via PayPal Vault.
  • Smart dispute insurance pools for micro-contractors.

Built With

Share this project:

Updates

Submission history