Inspiration
Every freelancer knows the moment. You send a quote and wait. The client comes back with a number that makes you wince. You counter, they counter, and then three days of silence follow. On the other side of the table, every buyer knows it too: you're never sure the price is fair, you hate haggling, and you can't tell if the seller would have said yes to less.
Negotiating a price is a skill, and for most people it's slow, awkward and uneven. Meanwhile, paying has become a single click. We kept asking ourselves: why is agreeing on a price still so painful when paying it is so easy?
So we imagined each side with an agent in their corner. Your agent knows the most you'll pay. The seller's agent knows the least they'll accept. Neither ever tells the other. They meet in the middle, quickly, fairly and in the open, and when they shake hands, two humans still get the last word. That idea became Accord.
What it does
Accord is a marketplace for freelance services where AI agents do the haggling.
- Find and propose. A buyer searches listings by keyword, category and price, then sends a proposal using one of their requests. Sellers can find buyers' open requests too.
- Accept to start. A negotiation begins only when the other side accepts. Accepting locks the seller's listing and the buyer's request, so nobody gets double-booked.
- Three rounds, live. A buyer agent and a seller agent trade offers on screen, each with a short, plain-language reason. A deal has to happen in at most three rounds, or the session ends and explains why, and Accord suggests the next best sellers.
- Chat, but never a back door. Buyer and seller can message each other about scope the whole time. Chat can never move the price.
- Two humans decide. When the agents agree, both people approve the price. Nothing moves until they both say yes.
- Pay with PayPal. The buyer pays through the PayPal sandbox, and the payment status comes from PayPal's own response, never from our text.
Private by design: a buyer never sees the seller's price floor, and a seller never sees the buyer's budget. In one of our test runs, a $95 listing settled at $87, and neither side ever saw the other's limit.
Accord runs entirely in the PayPal sandbox. No real money moves.
How we built it
We started with five rules on day one and refused to bend them: price limits are enforced in code, never only in prompts; a negotiation has at most three rounds; a seller has one active negotiation at a time; payment status comes from PayPal's API response; and chat can never change the price.
The agents only propose. A negotiation engine on our backend is the only thing that can accept a price. It checks every offer against both private limits and the three-round cap, and it blocks or clips anything out of bounds, so even a confused or manipulated agent can't break a deal.
- Agents: a Python and FastAPI service with a buyer strategy and a seller strategy, plus a rule-based fallback so a negotiation still finishes if the model is slow or down. Gemini can optionally reword the notes, but the algorithm sets the prices.
- Backend: Node.js, Express and Prisma on PostgreSQL (Supabase). It handles proposals, seller and request locks, two-sided approval, chat, an audit log, rate limits, and the PayPal Orders API. It creates the order for the agreed price only after both approvals, and captures it after the buyer approves.
- Front end: React, TypeScript and Vite, with the PayPal JavaScript SDK v6 button, live screens that follow each negotiation, and an AG Grid sales history.
We also built contract-first: we wrote our API down in one shared file, API.md, and treated it as the source of truth between all four of us.
Challenges we ran into
- Keeping secrets secret. The hardest rule to keep was also the most important. Every response is built field by field, and we tested what each side can see in the browser's network tab, not just on screen.
- Locks under pressure. If two buyers click at the same moment, only one may win. We lock the seller and request rows inside a database transaction, so two accepts can't both succeed.
- Four people, one database. A schema change from one copy of the project quietly dropped columns that another copy relied on, and approvals broke. We learned to have one owner for the database and to send model changes to that person.
- PayPal sandbox quirks. The seller's account can't pay itself, and a saved test card sent checkout into a loop until we switched to the PayPal balance. Small details like these cost us real hours.
- Slow connections. A free-tier database and home networks gave us dropped connections and timed-out transactions, so we gave the multi-step actions more room and made them safe to retry.
- Making two opposed agents converge. Each agent wants the opposite outcome, so the agent contract had to push both toward the middle in three rounds without ever leaking a limit.
Accomplishments that we're proud of
- The whole journey works end to end: search, proposal, accept, a live three-round negotiation, two-sided approval, and a real PayPal sandbox capture.
- The hard limits really are hard. The engine, not the AI, decides every price.
- Privacy holds under test: neither side ever receives the other's limit.
- Payment is locked on the server until both people approve, so the UI isn't the only protection.
- We shipped as a team of four working on different machines and branches, and made it all run together.
What we learned
- Agents propose, engines decide. The AI is the creative part, but the part that touches money has to be plain, testable code.
- Write the contract first. Agreeing on one shared API file early saved us from many arguments later.
- Build in small layers and test each one. Every time we skipped that, we lost time to bugs that were hard to trace.
- The boring parts matter. Logging, rate limits, locks and clear error messages are what make a demo trustworthy.
What's next for Accord
- Seller payouts through PayPal, and webhooks with signature checks to confirm payments.
- Delivery and milestones, so the work itself is tracked after the payment.
- Reviews, ratings and dispute handling.
- A smarter rematch matcher that scores candidates, and embeddings-based search.
- Real sign-in with PayPal, instead of our demo chooser.
- More currencies and a mobile app.
We started with a simple question: what if negotiating felt as easy as paying? And Accord is our answer.
Built With
- ag-grid
- express.js
- fastapi
- gemini-api
- node.js
- paypal
- paypal-javascript-sdk
- paypal-orders-api
- postgresql
- prisma
- python
- react
- supabase
- typescript
- vite