Inspiration
Freelancers carry every risk alone. A client pays 30 days late, or never. A friend passes you work and gets nothing for it. You wait weeks for money you already earned.
Agencies solve this with a company around the work. Solo freelancers don't have one. We wanted to give a small group of freelancers the safety net of a company, without the company. PayPal already moves the money. AI could do the paperwork. The missing piece was a fair set of rules that a group can trust.
What it does
A guild is a few freelancers who act like one company.
- Share work. Post a job you can't take. The AI picks the best member and explains why. A capacity board (Bryntum Scheduler) shows who is actually free.
- Split every payment. The client pays a PayPal invoice. The worker, the member who found the client, and a shared safety pool are paid out automatically, 85 / 10 / 5 by default.
- Get paid on day one. Once the client approves the work, the pool can pay part of your share right away. It takes the money back, plus a 2% fee, when the client pays.
- Covered when a client ghosts. The AI sends polite, then firmer, PayPal reminders. If the client still doesn't pay, you file a claim. The AI checks it for red flags, an admin decides, and the pool pays.
- Hire the guild by AI agent. A client's AI (Claude Desktop, Cursor, any MCP client) asks for a quote and hires the guild with one call. The client gets a link to sign and pay.
- A real agreement. The client accepts a work agreement in their portal. The exact text is stored with a SHA-256 fingerprint.
- Every dollar traceable. A money trail shows each invoice's journey with real PayPal IDs.
How we built it
The rule we kept everywhere: the AI suggests, rules decide, people approve.
- Backend: FastAPI, SQLModel and Alembic on Render, with Supabase Postgres and Supabase Auth. All money is integer cents.
- Frontend: Next.js 16 as a static export on Cloudflare Workers, with Tailwind CSS, SWR, AG Grid for the jobs table and Bryntum Scheduler for the capacity board.
- PayPal: Invoicing v2 (invoices and reminders), Payouts v1 (splits, claims and early pay), Orders v2 (deposit holds: authorize, capture, void), Subscriptions v1 (the monthly member fee that grows the pool), and verified Webhooks.
- AI: Cloudflare Workers AI (Llama 3.1 8B). It writes match reasons, scope drafts, reminders, claim reviews and quotes. Every answer comes back as JSON checked against a schema.
- Agents: an MCP server built with the official MCP Python SDK. It calls a public API with an API key: quote, hire, check status.
- Daily jobs: GitHub Actions run reminders, auto-approval (5 business days of silence counts as approval) and advance defaults.
Money is never decided by the AI. For example, early pay is plain code:
$$\text{advance} = \min\left(0.7 \times \text{invoice},\ \$1{,}000,\ \text{worker share} \times \tfrac{100}{102}\right)$$
and one advance can never use more than half of the pool. An admin can set an agent mandate that lets small things happen without a click, like a friendly reminder or a small claim. Each of these is capped per week and logged with the name of the admin who set the rule. Kill switches turn off any AI feature instantly.
Challenges we ran into
- Keeping the AI honest about money. The model once invented a client budget that was never in the brief. Now a budget only counts if the client actually wrote it, and an agreement summary is thrown away unless it repeats the exact total.
- Getting the order of payments right. An early version took back an advance after the payouts ran, so a worker could keep both. The advance is now repaid first, inside the same step that splits the payment.
- Letting an AI agent hire safely. The agent can't set a price. Hiring only takes the quote ID, the quote is fixed for 7 days, and hiring the same quote twice returns the same job.
- A demo that judges can't break. We added a read-only admin, so anyone can see everything an admin sees while nothing they click changes the data.
- Build problems. Turbopack ran out of memory on Bryntum, so the build uses webpack. A wrong build script once made Cloudflare time out after 30 minutes.
Accomplishments that we're proud of
Every PayPal call in the demo is real (sandbox): invoices, reminders, payouts, deposit holds and webhooks. A full story runs end to end: an AI agent hires the guild, the client signs, the worker is paid on day one, and a ghosting client is covered by the pool, all with real PayPal IDs on the money trail.
What we learned
AI is great at writing and explaining, and risky at deciding. Putting a small, fast model behind strict rules and human approval gave us the speed of AI without trusting it with money. We also learned how much of fintech is about order of operations and idempotency, not features.
What's next for The Guild
Real (non-sandbox) payouts, more than one guild per person, phone notifications so admins can approve claims on the go, and letting guilds tune their own split and pool rules with a vote.
Try it
guild.mokshadsankhe.me/try: one click, no sign-up. The Judge account sees everything an admin sees, and nothing you click changes the demo.
Built With
- ag-grid
- alembic
- bryntum
- cloudflare-workers
- cloudflare-workers-ai
- fastapi
- llama
- mcp
- next.js
- paypal
- paypal-orders
- paypal-payouts
- paypal-subscriptions
- postgresql
- python
- react
- render
- sqlmodel
- supabase
- swr
- tailwindcss
- typescript
Log in or sign up for Devpost to join the conversation.