Inspiration
Getting a good deal online means messaging sellers, haggling, comparing offers and dodging scams. Most people don't bother, so they overpay. AI agents are about to start spending money for us, and that needs hard safety rules, not just good prompts.
What it does
You type one sentence ("Noise-cancelling headphones under $300, need them within 5 days"). Envoy turns it into a brief (cap, target price, deadline), then sends one AI negotiating agent to every seller at once. Each seller is its own AI agent with a secret lowest price. Envoy uses competing offers as leverage, shows the whole thing live in a "price race", and blocks scam sellers on the spot (fake urgency, "pay me via Zelle"). It then picks the best safe deal and explains why.
Checkout uses PayPal as escrow: the order is created with intent AUTHORIZE, so PayPal holds the money instead of charging it. Envoy captures the payment only after the seller ships, and voids the hold if they don't ship in time, so the shopper is never charged for nothing.
How we built it
- Node.js + Express backend, Server-Sent Events to stream every negotiation live
- AI agents on Gemini or Groq (free tiers, with rate-limit pacing and retries) or Claude, with structured JSON outputs validated by Zod
- Guardrails enforced in code: the agent can never offer above your cap, never pay an unverified or flagged seller, never raise its own offer back down
- PayPal Orders v2 (create, authorize) and Payments v2 (capture, void) with idempotency keys, plus the PayPal JS SDK buttons
- 41 automated tests, including "can't overspend" and "can't pay a seller twice"
- A full offline demo mode (scripted agents and simulated checkout) so anyone can try it with no keys
Challenges
Making free-tier LLMs reliable (rate limits, malformed JSON), keeping AI agents inside hard money rules, and designing an escrow state machine that is safe against double clicks and retries.
What's next
Real seller marketplaces, voice requests, and webhook-based shipping confirmation.
Built With
- claude
- css
- express.js
- gemini
- groq
- html
- javascript
- node.js
- paypal
- paypal-orders-api
- server-sent-events
- zod