the story
it started with a small, annoying fact. in october a journalist let an ai assistant buy them a robot vacuum. the assistant leaned hard on one reviewer's tests, picked the vacuum they recommended, then bought it somewhere else. the reviewer got nothing. no click, no cookie, no commission.
that's the whole affiliate economy, about $13.8B a year in the US, quietly breaking. it pays per click, and agents don't click. so the people agents trust most are about to earn the least.
we kept asking one question: what should paypal's affiliate network look like when the shopper is an agent? and then a second one: what should shopping feel like when an agent does it for you?
those two questions became two verticals in one app.
vertical 1: cited, for creators and brands
cited pays creators for the sales their tests cause, not for the last click.
- a brand funds a category, never a creator or a verdict. it pays only for its own lifted units, so an honest "buy the other one" review still gets paid when the other one funds.
- our paypal-style agent catalogue randomly shows each shopping agent the creator's test, a placebo (other content from the same creator), or nothing. ranking never changes: the test is only added or withheld.
- the catalogue signs an agent affiliate passport that rides in orders v2
custom_id. the capture joins the sale back to its arm, even when the agent buys at a different shop. - the engine credits only caused sales, at the 80% lower bound. co-exposed creators split credit by shapley value. credits are held 30 days, voided on refunds, and frozen during disputes. then creators get paid by paypal payouts and brands get a paypal invoice and their unspent deposit back.
it's live on the real paypal sandbox. a /try run makes real orders and paypal's signed webhooks are verified, and a creator was credited for a test-group sale, held until december.
the pre-registered eval is the part we're proudest of. across gpt, gemini and sonnet (147 headline sessions), agents shown the test bought the tested product 57/57. shown the placebo, 3/54. that's +94pp lift, +90.3pp at the 80% lower bound. 2,139 sessions in total are downloadable at /proof, including the cases where it doesn't pay.
vertical 2: shop, for the person buying
the other side of the same world: you, with an agent that shops for you.
shop is a generative-ui chat. you say "tell me when the sony xm6 drops under $280, and buy it if it's under $260". the agent searches the web (exa) and paypal sellers. every tool call renders as a real widget: product cards, an offer comparison, a price-watch card with a sparkline, an approval card, a checkout card, a receipt. it keeps watching prices while you're away and buys through your paypal wallet when the rule hits.
the interesting part is friction. most "agentic checkout" demos try to remove all of it. we think that's backwards. friction belongs exactly where it protects you, and nowhere else:
- zero friction to start. sign in with google, type one sentence. you connect your paypal wallet once, the first time it's actually needed.
- an auto-buy rule is a mandate you approve once: max price, max total, expiry, allowed sellers.
- re-verify before money moves. live price, stock and variant are re-read at trigger time. a too-good-to-be-true price pauses and asks you.
- authorize, then a cooling-off window. paypal orders v2
AUTHORIZE, then a visible 10-minute undo. undo voids the authorization and no money moves. - step-up for big purchases, and anything outside a mandate always asks, like an approval prompt in a coding agent.
- paypal sellers are buyable. any other web shop is watch-only, with a "buy at merchant" link. we don't pretend.
our principles
value-first, friction-first, user-first.
- value-first: creators get paid for real influence, brands only pay for real lift, shoppers get the deal without babysitting a tab.
- friction-first: we design the friction instead of deleting it. every pause in the flow has a job.
- user-first: the agent works for you. it never spends without a rule you set, and you can always undo.
how we built it
- paypal: orders v2 (capture and authorize/capture/void), vault (one-time wallet link), webhooks (signature-verified), captures refund, disputes, payouts (incl. GBP/EUR batches on the sandbox), invoicing v2, log in with paypal, and the paypal agent toolkit for pay/get/refund.
- one cloudflare worker serves everything: hono, D1 for the ledger, durable objects for the demo stack, and one
ShopperAgentdurable object per user, built on the agents sdk with SQLite, schedules for price watches and hibernation. - the shop's server follows the codex app server design: json-rpc over websocket, thread → turn → item lifecycles, approvals as server-initiated requests that pause the turn, resume after reconnect, and fork. there's also an ag-ui sse adapter, so other agent frontends can drive the same harness.
- models: openrouter through cloudflare ai gateway. shopper agents run gpt, gemini and claude. exa handles search and live price re-checks.
- attribution is pure typescript: attributable fraction, lower bound, shapley, ledger rules, with property tests. money is integer minor units everywhere.
- ag studio + agent framework for the brand and creator dashboards, with an analyst agent that drafts a top-up and waits for an approve click.
- a public mcp server at /mcp: point claude or cursor at it, buy a purifier, and watch your sale show up.
challenges
- one vaulted wallet, many sellers. the sandbox refuses a vaulted charge to any seller except the merchant that vaulted the wallet (
BILLING_AGREEMENT_NOT_FOUND). a real agent platform needs paypal multiparty. we recorded the test instead of faking it. - proving cause, not correlation. we needed a placebo arm so reputation is stripped out, and a lower bound so creators are paid a defensible floor.
- keeping money out of rank. a test enforces identical ranking across arms.
- durable objects hibernate. our simulated paypal lost an authorization mid-undo once. now its state is persisted, and undo works after any amount of idle time.
- making friction feel good. a cooling-off timer that reassures instead of nags took more iterations than the checkout itself.
what we learned
agents defer hard to an explicit verdict. when price already decides, a test adds little and should pay little. paying on measured lift handles both honestly. and the unhappy paths (refunds, disputes, undo) shape the design more than the happy path does.
what's next
- paypal multiparty, so one agent can pay many sellers from one wallet.
- connect shop to cited's catalogue, so your own shopping agent becomes a cited shopper: passport in
custom_id, and creators paid when their test moved your purchase. - more categories, real venmo payouts, and paypal's real agent catalogue and honey contracts.
try it
- live: https://caaash.shipwith.si (start with the 2-minute tour)
- the shop: https://caaash.shipwith.si/shop
- run two agents yourself: https://caaash.shipwith.si/try
- the proof: https://caaash.shipwith.si/proof
- your own agent:
claude mcp add --transport http cited https://caaash.shipwith.si/mcp
Built With
- ag-grid
- ag-studio
- ag-ui
- claude
- cloudflare-d1
- cloudflare-workers
- durable-objects
- exa
- gemini
- hono
- mcp
- openai
- openrouter
- paypal
- paypal-payouts
- react
- typescript
- vitest