Feature · The loop · Issue No.01, page 12

The five‑stage decision loop.

Every time a shopper loads a page, Osmo runs the same loop. It takes thirty‑eight milliseconds, and it is the only thing we do.

By
Osmo Engineering
Reading time
4 min
Tagged
bandits · latency · shopify
p99
38
ms
01 Signal

See what the shopper is doing right now — what's in the cart, whether they've shopped here before, whether they buy at full price, how much room you have on margin, what's selling slow.

A real shopper, just now
In the cart
2 × merino crew · $48
Visit history
4th visit, has bought before
Buys at full price?
Usually, yes
Margin on this cart
34% — healthy
Inventory pressure
scarf, ending the season
Time of day
Friday evening, Seoul
Pulled from your Shopify · in under one millisecond
02 Candidates

Lay out every offer you've turned on: each discount level, each free‑gift product, each free‑shipping threshold, each bundle, and showing nothing.

Choice set · 11 legal actions
Show nothing
5% off
10% off
15% off
Free socks
Free tote bag
Free ship over $50
Free ship over $60
Add a scarf · $22
Bundle: buy 3 get 1
25% off
25% off ruled out — would break your margin floor
03 Score

For each offer, predict the margin you'll earn — and how confident the engine is in that number.

Expected margin per shopper · with confidence range
Add a scarf
+$8.40 ±0.90
Free ship · $60
+$5.40 ±1.20
Free socks
+$3.80 ±1.50
10% off
+$2.70 ±1.60
Show nothing
+$0
Pick the best · keep room to learn 1.4ms
04 Post

Render the chosen offer inside your Shopify theme. No redirects, no flicker, no extra app blocks.

checkout.myshopify.com · step 2 of 3
🔒 secure
Merino Crew Neck · Oat
Size M · Qty 2
$48
"Complete the look"
Add the merino scarf · Oat. Ships in the same box.
$22
Osmo picked · add a scarf · 74% confidence · 38ms
05 Learn

Within the hour, the result — did they buy, what did they buy, what margin did you keep — flows back. Every shopper teaches the next.

The hour after a decision
0 min · the offer goes live
Scarf shown to the shopper at checkout
47 sec · order placed
$56 · margin earned +$9.30
12 min · Shopify confirms paid
Outcome recorded · counted toward learning
54 min · model refreshed
12,408 shoppers learned from since last refresh
Your store, your model never pooled across merchants
Tech note · Why not an LLM

A transformer is the wrong tool for a 38‑millisecond budget.

Checkout has to feel instant, and it has to protect your margin. A big language model can do neither — it takes a third of a second to think and it cannot show its work. Osmo is small and specialised: roughly 88 kilobytes per store, sitting at the edge of Shopify’s network. Every decision comes with a number you can read — expected margin, a confidence range, and the offer it picked. If you ever need to ask why, the answer is on one line.

88 KB

model size, per store

1.4 ms

to evaluate one offer

0

made-up answers, ever

The one‑pager

One loop, five stages, five surfaces.

What it reads
Orders & returns
from your Shopify, live
Browsing & cart
storefront pixel
Email & SMS opens
refreshed hourly
The engine
Osmo
one model
eleven possible offers
picks the offer for this shopper
Where it shows up
Discounts at checkout
applied automatically
Cart upsells & gifts
added to the cart
Free-shipping rules
threshold per shopper
Win-back emails & SMS
via your Klaviyo / Postscript
Next · The action space

See the decisions, not the dashboards.