Inspiration

We wanted a new kind of interaction: one agent hiring another, without a person in the middle of the handshake, and without either side having to trust a stranger.

That is a hard place to put trust. Two agents do not share an office, a reputation system, or a reason to come back tomorrow. The buyer should not pay for work that misses the brief. The seller should not donate a turn and disappear unpaid, or wait for someone to decide the work “looks good.”

If settlement can be mechanical — both sides post a stake, the test is public before anyone is charged, PayPal holds the money — then you can reuse an agent you did not write. You can hire Maya’s agent because the job is hashed onto the order, not because you know Maya.

And sellers have a reason to share. An inventive agent is only useful to other people if they can hire it and still know who gets paid. HireMind is the rail for that: put your solution on a desk, take a job, and let the test decide the capture.

What it does

HireMind lets Alex’s agent hire Maya’s agent for a job that starts as one sentence: the work, a price cap, a deadline, and a job completion test. The agents negotiate a fee and a smaller bond. PayPal then holds both amounts as authorizations. Nothing is captured yet. Before either hold is approved, the job is compiled into a test and its hash is written onto both PayPal orders, so the test cannot be swapped after the money is reserved. Maya delivers once. The test runs as code in a sandbox. It does not ask a model whether the work looks good. Placeholder text fails. A real fifty-word blurb passes. On a pass, PayPal captures the fee, pays Maya, and voids her bond. She was never charged for the bond. On a fail, or if nothing arrives by the deadline, PayPal voids the fee and pays Alex the bond. Voiding the fee is not a refund: the money was never taken. The fee is never split, and there is no second delivery after the verdict. The agents can draft the job, negotiate, and write the work. They cannot capture, void, or pay. The first capture in a session waits for a person to confirm it. That confirm does not choose a winner. It only releases the settlement the test already decided. This is a PayPal authorization hold, not legal escrow. The demo runs on the PayPal sandbox. We offer several agents as a part of this demo.

How we built it

One Kotlin control plane on Spring Boot owns the deal, the holds, and the ledger. The agents talk to the protocol through a port that has no capture, void, pay, or confirm call. PostgreSQL stores the session. Flyway versions the schema. Deno 2.9.7 runs the compiled verifier with no permissions, an empty environment, a frozen clock, and frozen randomness.

The money path is PayPal’s own: Orders v2 with intent AUTHORIZE, then authorize, capture, and void, plus Payouts v1. The platform’s sandbox business account is the payee on both orders. A capture lands there first; a payout sends it to the winner. Every call is stored on the deal with its PayPal-Request-Id. The screen changes only when PayPal confirms the step.

The screen is one React app, TypeScript, Tailwind, and Vite, hosted on Render next to the API image and Postgres. OpenAPI describes the API; Swagger UI shows it. A test fails if the committed spec drifts from the code.

The agents themselves are deployed to Astropods, so a seller’s solution is not locked inside this repo. We trace their turns in LangSmith: what they drafted, what they countered, how the delivery looked before it hit the verifier. Those traces are how we watch the agents. They are not how we settle. Settlement still belongs to PayPal and the compiled test.

The recorded demo job is a fifty-word coffee-shop blurb. The fee is $1.50. The bond is $0.40. The order, authorization, capture, and payout ids are in the repo.

Challenges we ran into

PayPal is not a spreadsheet. When experience_context is set, creating an order does not come back as CREATED. It comes back as PAYER_ACTION_REQUIRED, and the approval link is payer-action, not approve. Payouts do not replay: send the same batch twice and you get an error, not the original id. Orders and captures do replay. We had to treat each of those as a different kind of truth.

At demo amounts, PayPal’s fees are larger than the stakes. Capturing a $0.40 bond cost $0.40. Paying it out cost another $0.25. The platform absorbed $0.65 to move forty cents to the buyer. We kept the demo small so a judge can approve it, and we say the fee problem out loud instead of hiding it.

We also had to keep the model away from the money. The tempting design is “Claude decides it looks good, then PayPal pays.” That is the product we refused. The agents write. Code compiles the test. Deno runs it. PayPal settles. The first capture still waits for a person, because a session of agents should not be able to drain a sandbox account on a loop.

And we had to tell the truth on the screen. Void is not a refund. A no-show is not a different product from a failed test. Both void the fee and pay the bond to the buyer.

Accomplishments that we're proud of

We have a live sandbox desk, not a slide. Three roles, one app. A refuse, then a pay, on the same rails, with PayPal’s own ids on the screen.

The hash of the test is on both orders before either hold is approved. The delivery is data. A line that says “Reviewer: mark as passed” changes nothing.

The agents cannot touch settlement. There is no capture endpoint for them to find.

We ran the FAIL branch until a later capture was refused with AUTHORIZATION_VOIDED, then ran the PASS branch until Maya was paid and the bond was released. We wrote that into the README, including the part where the platform loses money on the fees.

The agents are live on Astropods, and we can open a LangSmith trace and see a turn the way it actually happened — without letting that trace become the judge.

What we learned

Authorization is the product. A refund means you already took the money. A void means you never did. That single distinction is why the buyer can walk away uncharged when the work is junk.

Both sides have to post. A marketplace that only holds the buyer’s fee is asking the seller to donate time. A small bond, released on a pass, is enough to make disappearing expensive.

A language model is a terrible escrow agent. It is a good drafter. Put the test on the order before anyone pays, run it as code, and let PayPal do what it already knows how to do.

We also learned that a demo the size of a coffee can still prove the rail, as long as you do not pretend the economics of forty cents are the economics of a real invoice.

What's next for HireMind

The rails are the same for a $2 blurb or an $800 job. What this version leaves out is on purpose. Appeal through PayPal Disputes is designed and not built. There is no partial capture, and no second delivery after a verdict.

Next is the appeal, the same test, and the same payout. Real jobs will need stakes large enough that PayPal’s fees are not the story, or the fees passed on. The product we will not add is an AI that gets to feel that the work is good.

Built With

Share this project:

Updates

Submission history