Inspiration
Agents are starting to buy things: a research agent pays for a data lookup, a host agent hires a designer agent. Today that means one of two bad options: hand an agent your card (no limits, no audit trail), or approve every cent by hand (no autonomy). Rooms by Aurmada is a shared room where people and AI agents work together, so we asked: what if the money rules lived in the room itself?
What it does
- You give the room a goal, a spend cap and an approval line ("ask me before any hire over $5").
- The host agent (an LLM) plans which specialist agents to hire (Research, Copy, Design, each with a fixed price). It never plans past your cap.
- You fund the cap once with PayPal (Orders v2 create + capture via PayPal Smart Buttons). The money is held for that room only.
- Specialists do the work in the shared transcript, each building on what earlier agents delivered.
- The host agent verifies each delivery against its brief before any money moves.
- Each verified agent is paid through PayPal Payouts to its operator's PayPal account; a 5% room fee is kept.
- Any hire over your approval line waits for your Approve/Decline in the room. Declined hires cost nothing.
- Close the room and the unspent budget is refunded to your PayPal (capture refund).
- Every money movement is a receipt in the transcript and a row in an AG Grid ledger with its PayPal reference (order, capture, payout batch, refund IDs).
How we built it
- PayPal developer platform (sandbox): JS SDK Smart Buttons for the funding approval; REST APIs for OAuth2 client credentials, Orders v2 (create, capture), Payouts v1 (create batch, get batch status) and Payments v2 (refund a capture). Every write carries a PayPal-Request-Id idempotency key.
- AI: Cloudflare Workers AI running Meta Llama 3.3 70B for three agent roles: the host planner (goal to hiring plan within budget, as JSON), the specialist workers, and the escrow verifier (pass/fail with a reason). The code also runs against any OpenAI-compatible endpoint or an offline stub.
- Cloudflare Pages + Pages Functions for the app and API, Cloudflare D1 (SQLite) for rooms, transcript, hires and a signed ledger. All on free tiers.
- AG Grid Community for the ledger view.
- An end-to-end test runs the whole engine against a mocked PayPal API and in-memory SQLite.
- Development was assisted by an AI coding agent.
Challenges we ran into
- Making it impossible for agents to overspend: the planner drops hires that would break the cap, and the engine re-checks the remaining budget before every job.
- Never paying twice: jobs are claimed atomically before work or payout, and every PayPal call is idempotent.
- Keeping humans in the loop without making them babysit: one approval line, set once, decides which hires need an OK.
Accomplishments that we're proud of
The full money loop runs live on the PayPal sandbox from one page: funding order captured, agents paid by Payouts (batches reach SUCCESS), unspent budget refunded, and each step posted into the room as a receipt with its PayPal ID.
What we learned
Agentic commerce needs the same things human commerce has: budgets, approvals, proof of delivery before payment, refunds and receipts. Putting them in the shared room makes them visible to every agent and person in it.
What's next for Rooms Agent Pay
Agent-to-agent subcontracting inside a room (an agent hiring a tool or another agent from its own sub-budget), PayPal Agent Toolkit integration, payouts in more currencies, and bringing this into Rooms by Aurmada next to its pay-per-call (x402) tool broker.
Testing it
Open https://rooms-agent-pay.pages.dev, type a goal (or pick an example), keep the $15 cap and $5 approval line, click "Open the room". Click the PayPal button and log in with the sandbox buyer [email protected] / judge-buyer1, then Complete Purchase. Approve the hire that needs your OK, then click "Close room & refund" and "Refresh PayPal status". No real money moves; everything is PayPal sandbox.
Built With
- ag-grid
- cloudflare-d1
- cloudflare-pages
- cloudflare-workers-ai
- javascript
- llama-3.3
- paypal
- paypal-js-sdk
- paypal-orders-api
- paypal-payouts