Inspiration
What it does
How we built it
Inspiration
Freelancers get ghosted after delivering. Clients pay up front and get nothing. Escrow exists, but it still depends on a human to decide whether the work is done, which is slow, biased and expensive. We asked: what if the escrow could judge the work itself?
What it does
AutoSovereign is milestone-based escrow where PayPal holds the money and an AI agent decides when it is earned.
- A contract is split into milestones, each with acceptance criteria.
- The buyer funds the full amount through PayPal. The contract moves to
LOCKED_IN_ESCROW. - The freelancer submits evidence for each milestone.
- An AI agent checks the evidence against the criteria and returns approve or reject, with reasoning.
- Once every milestone is verified, the payout is released to the freelancer through PayPal Payouts.
Vague evidence is rejected, and the AI explains what is missing. A payout requested before verification is blocked on the server with HTTP 422, so the rule can't be bypassed from the UI.
How we built it
- PayPal (sandbox): Checkout/Orders funds the escrow, and the capture writes the funded state back to the database. The Payouts API releases the money and returns a real batch ID.
- AI: a verification agent behind
/api/agent/ai-verifyreads the milestone criteria and the submitted evidence and produces a verdict. That verdict is what unlocks the payout. - Backend: API routes for contracts, funding, verification and payout, backed by a seeded database.
Challenges we ran into
- Keeping contract state consistent between the PayPal capture and our own database.
- Making the AI strict enough to reject vague evidence, but fair enough to approve genuine work.
- Enforcing the payout rule on the server so the AI verdict, not the client, controls the money.
Accomplishments that we're proud of
A complete working loop: real sandbox funding, an AI rejection followed by an approval, a server-enforced guardrail, and a real payout that returns a PayPal batch ID.
What we learned
When an AI decision sits directly in front of a money flow, the guardrails have to live on the server. We also learned that clear, specific acceptance criteria make AI verification much more reliable.
What's next
- Human dispute escalation when either side contests a verdict
- Multi-currency payouts and partial releases per milestone
- Agent-to-agent contracts for agentic commerce ## Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for AutoSovereign
Built With
- gpt-oss-120b
- groq
- nextjs
- node.js
- paypal
- paypal-checkout
- paypal-payouts-api
- paypal-sandbox
- prisma
- typescript
- vercel-ai-sdk