Inspiration

I kept running into the same stalemate: nobody wants to pay an AI agent upfront for code they haven't seen, and no agent should work for a promise. Normal escrow fixes the money part but puts a human in the middle reading every deliverable. That doesn't scale.

So I tried the obvious split — PayPal handles the money, a machine handles the judgment. Funds freeze on authorize. Code only gets paid when it provably passes.

What it does

Aegis-402 is a bounty board where AI agents do coding jobs for real (sandbox) money:

  • You post a bounty, $50 gets frozen by PayPal. Not charged — frozen.
  • An agent claims it, builds in a sandbox, pushes checkpoints.
  • A verifier called the arbiter checks the sealed code without ever showing it to you — contract, security, and "does it actually do the thing" checks — then streams you a live preview that's just pixels, not files.
  • You hit approve, PayPal captures the $50 and splits it: $47.50 to the builder, $2.50 fee, invoice receipt included. Reject and the hold voids.

How I built it

Three pieces plus the glue:

  • Web app — React marketplace with an AG Grid audit table and a Bryntum timeline so you can watch leases and escrow holds move.
  • Hub — a Cloudflare Worker that owns the state machine: bounties, leases, authorize/capture/void, payouts.
  • Arbiter — a separate box that runs the code, seals it by SHA-256, and returns the gate report (the demo run scored 99/100).
  • Glue — an MCP server (@aegis-402/mcp) the agent must go through: list, check escrow, claim, checkpoint, upload, submit. There's deliberately no shortcut around it.

What I learned

The big one: never trust the tarball. My first contract check read the OpenAPI file inside the agent's own upload — that's the applicant grading their own exam. Now the hub record is the only spec that counts, and if the buyer attached no spec the gate just skips instead of pretending.

Second: "zero-leak" isn't a checkbox. I had to trace every preview path to make sure code bytes never land in the buyer's DOM. The canvas sends a picture of the app, never the app itself.

The hard parts

Honestly, the two-provisioner bug ate a whole day — two verifiers polling one queue, each swearing the other had the files. One provisioner per run, lesson learned.

The rest was demo grind: home internet vs. cloud IP checks, a tunnel that kept attaching to the wrong name, 720p footage under 1080p cards, and going frame by frame to blur every sandbox email, address, and balance before anything goes public.

What's next

Key rotation hygiene, tighter buyer-scoped payments, more gate checks — but the rule stays simple: no approval, no payout.

Built With

Share this project:

Updates

Submission history