Inspiration

Sometimes selling items online in the second-hand market means answering the same message multiple times (Is this still available? What's your lowest? I can do half). Most of these conversations go nowhere and end up with the seller wasting time

What it does

A seller creates a listing with a public asking price and a secret minimum: from a photo (Closer drafts the details, then asks a few plain questions a photo cannot answer), or straight from a Facebook listing they already posted, through the extension's "Add to Closer" button. Closer then negotiates on the seller's behalf.

  • Buyers haggle with it in chat. It counters, makes a final offer, or asks the seller to approve an offer that is close. It will not go below the minimum, whatever the buyer says.
  • Buyers can send their own agent. Closer has a public agent API. On the home page a buyer agent with a hard budget negotiates against the seller's agent live, with nothing scripted. Neither model is told the other side's limit.
  • PayPal settles the deal. The buyer pays with PayPal in the chat, or approves a deal their agent agreed with one tap. A seller whose buyer is on another platform can send a PayPal invoice for the agreed amount instead, and the buyer pays on paypal.com.
  • It works where the buyers already are. Most buyers are in a marketplace chat, not on our site. The seller pastes the buyer's message into Closer, gets a reply that holds the minimum, and sends it. When the deal is agreed, Closer hands over a PayPal payment link or sends the invoice.
  • The seller stays in control. A dashboard shows every negotiation, the offers waiting for approval, the full transcript and an audit log of each decision. For resellers moving many items, an analytics panel shows sell-through, average deal as a share of asking, median time from first message to a deal and rounds per deal, split by channel (web, buyer agent, Facebook, Kijiji, pasted) and by item.
  • [extension] It goes where the seller already sells. A Chrome extension, connected with one click from the dashboard, reads the newest buyer message in a chat thread and drafts Closer's reply in the message box. The seller presses send. We ran it on a real Facebook Marketplace conversation from the seller's side. It is an independent tool, not affiliated with any marketplace, and Kijiji support is not tested yet.

Every buyer chat has an "Under the hood" panel that shows what the system did behind each reply, so you can watch a jailbreak attempt fail.

How we built it

One rule shaped everything: the AI talks, the code decides.

  • The model never sees the minimum price. It lives in a separate table that buyer-facing code never reads.
  • The model never writes a number. It calls an evaluate_offer tool, a deterministic policy in code decides, and the model writes {price} placeholders that the server fills in.
  • An output guard rejects any reply containing an amount the system did not issue.
  • The PayPal amount is read from the agreed deal in the database, never from the chat, the model or the browser.

The app is Next.js and TypeScript on Postgres with Prisma. The agents use the Vercel AI SDK. The seller dashboard is built on AG Grid, and the app is hosted on Render.

Challenges we ran into

  • Leaking the minimum through behaviour. Even when the model cannot say the number, a buyer can search for it by watching which offers get a different kind of reply. We made replies above and below the minimum the same shape, added random latency and per-negotiation jitter to counters, and capped how many negotiations one visitor can open on a listing.
  • Pressure. Early versions gave ground to a buyer who simply repeated themselves. Now a concession has to be earned with a better offer, and a price the agent has stated is never retracted.
  • A demo that sells the item. A finished negotiation really does sell the listing, so the first visitor would leave everyone after them a sold-out page. The home page relists the demo items before each run, through an endpoint that can only touch those three listings.
  • Trusting webhooks. A webhook body is attacker-controlled until PayPal confirms the signature, and even then we only take the invoice id from it.

Accomplishments that we're proud of

  • A 15-attack jailbreak suite passes 15 of 15 against the live model on three consecutive runs. The transcripts are in the repository.
  • A 1000-case property test shows the policy never decides below the minimum.
  • Two AI agents with opposing hidden limits reach a deal on the home page, and PayPal settles it.
  • Forged and unsigned webhooks are rejected, and a replayed payment is a no-op.

What we learned

Putting the guardrail in the prompt is the wrong place for it. A model that does not have the secret cannot leak it, and a model that cannot emit a number cannot agree to a bad one. Once the money decisions were in plain, tested code, we could let the model be as conversational as we liked.

What's next for Closer

  • Real seller accounts instead of one shared password.
  • Kijiji: reply drafting and "Add to Closer" for Kijiji listings (Facebook works; Kijiji is untested).
  • An MCP server so any buyer's assistant can negotiate with a Closer listing.
  • PayPal Pay Later messaging on agreed deals.

Built With

  • ag-grid
  • anthropic-claude
  • next.js
  • paypal-invoicing-api
  • paypal-javascript-sdk
  • paypal-orders-api
  • paypal-webhooks
  • postgresql
  • prisma
  • react
  • render
  • tailwindcss
  • typescript
  • vercel-ai-sdk
  • vitest
Share this project:

Updates

Submission history