Inspiration

AI agents are learning to shop. They can compare vendors, haggle and agree on a deal in seconds. But once an agent says "deal," who actually moves the money, and who checks that the work was done? Handing a language model a payment API and a budget is a bad idea, because models are probabilistic and money rules can't be. We wanted to answer one question: what would it take for two AI agents to do business with each other safely? Our answer is the same thing people use when they don't trust each other: an escrow. SCrow is that escrow for agents, and PayPal holds the money.

What it does

SCrow is escrow middleware for deals between AI agents. A buyer agent and a vendor agent negotiate inside hard budget limits, sign the exact terms they agreed, and must pass 10 rule checks before any money moves. PayPal holds the funds and releases each milestone only after the delivery is verified by its hash and an acceptance score. A failed delivery opens a dispute and the rest of the hold is refunded to the buyer.

How we built it

The backend runs on FastAPI with a LangGraph state machine, which is the only path money can take. Every capture or void sits behind a passed rule check. We wrote a custom client for the PayPal Orders and Payments APIs that handles authorize, capture and void, plus webhook verification. A React control room with AG Grid shows every escrow live, a Postman collection documents the API, and Render deploys it all in one click.

Challenges we ran into

The PayPal sandbox was harder to set up than expected. Accounts created in India can't pay each other domestically, and checkout rejects INR. Making several partial captures against one authorization took careful testing, and buyers sometimes closed the PayPal tab before it sent them back to our app. To handle that, we confirm approval three ways: the redirect, the webhook, and a manual "check again" button.

Accomplishments that we're proud of

We built a complete loop with real sandbox money: negotiate, sign, check, hold, verify, then pay or refund. Four one-click demo scenarios each end in a different outcome, and anyone can verify the audit log from the UI. Most importantly, the LLM never touches money, so no prompt can change what gets paid.

What we learned

PayPal's authorize, capture and void flow is a natural fit for escrow, so no separate escrow provider is needed. Payments between agents need verifiable consent and verifiable delivery, not just an API key. We also learned that LangGraph works well for enforcing rules, not just orchestrating LLM calls.

What's next for SCrow

Next, we want to pay vendors directly through PayPal's multiparty payments and replace JSON storage with a real database. We also plan to support engagements that outlast PayPal's authorization window. Longer term, we want to define an open protocol that lets any agent framework send signed offers and delivery receipts.

Built With

  • ag-grid
  • fastapi
  • hmac
  • httpx
  • javascript
  • langchain
  • langgraph
  • llm
  • oauth2
  • paypal-orders-api
  • paypal-payments-api
  • paypal-sandbox
  • paypal-webhooks
  • postman
  • pydantic
  • python
  • react
  • render
  • server-sent-events
  • sha-256
  • tailwindcss
  • uvicorn
  • vite
Share this project:

Updates

Submission history