How HeySurf bridges native iMessage blue bubbles with ephemeral web canvases using Keiki
Web chat wrappers are dead. We bridged Surf into native iMessage with Keiki so you text it like a friend, while it streams live UI into a frosted glass canvas on the web. Here is the plumbing, the pacing, and what it cost us to learn.
Nobody wants to open a twelfth browser tab to talk to an agent. The chat-wrapper era produced a thousand React apps that all feel the same, and users rightly ignore most of them. If you want an ambient assistant to earn a permanent spot in someone’s day, you meet them where their thumb already rests: the iMessage thread they never close.
The problem is that running an enterprise-grade iMessage relay is an infra nightmare. Apple’s ecosystem was never designed for agent traffic. Do it naively and you get flagged, throttled, or quietly dropped. This post is the story of how we bridged Surf into blue bubbles without running a closet full of Mac Minis, and how each reply simultaneously lands as paced native bubbles and as live UI state on our frosted glass web canvas.
The problem: web chat is a tax nobody pays
Every agent product asks for the same sacrifice: open our app, stay in our tab, check back on our schedule. Ambient intelligence cannot work that way. The moments that matter (a reminder before a meeting, a quick fact mid-errand, a nudge before something slips) happen in the seconds between other apps. By the time someone has found your tab, the moment is gone.
iMessage is the opposite: preinstalled, always there, and already where people type to humans they trust. The bar is brutal though. A bubble that arrives three seconds late, out of order, or split in the wrong place reads as broken, not merely slow. And the delivery path underneath has to survive real volume without Apple’s filters deciding you are spam.
The stack: Keiki as the line, not the product
We use Keiki for everything that is not our product. Keiki handles the line orchestration, the webhook delivery, and the iMessage protocol plumbing: signed turn ingress, inbound normalization, delivery retries, and the unglamorous details of keeping a consumer number alive and unthrottled. We write zero Mac provisioning scripts and babysit zero hardware.
That split is the whole point. Our engineering time goes into what Surf does with a turn, not into keeping a relay alive. Keiki gives us a clean contract: every inbound text arrives as a signed event at our endpoint, and every outbound bubble goes back through their line. What happens in the middle is ours.
Architecture, in broad strokes
Three pieces matter. We will keep the internals ours, but the shape is worth borrowing.
Inbound: signed events through the Keiki SDK
An iMessage lands at Keiki’s line, gets normalized, and reaches our control plane as a signed turn over a webhook. We verify the signature before anything else runs. Keiki’s envelope gives us the sender, the conversation, and the text, and a dedupe layer means a retried delivery can never fire the agent twice.
Orchestration: sub-second containers per turn
Each turn is dispatched to the orchestration layer, which spins up a small cloud VM container (1 vCPU, 4 GB RAM) fast enough that cold start is invisible in the reply latency. If the user already has a run in flight, the text is steered into it instead of colliding, so a follow-up sent mid-answer lands in the same context rather than forking a parallel agent.
Outbound: one reply, two surfaces
This is the part most products get wrong. A single agent response goes two directions at once: it is split into paced native iMessage bubbles (one per natural chunk, respecting a character cap so a paragraph never arrives as a wall of text) while the same turn streams ephemeral UI state to the web canvas. The canvas is our Zinc-styled frosted glass surface: it shows the richer artifact that bubbles cannot carry, then gets out of the way.
Hard-earned lessons
- Pacing beats speed. A five-bubble reply that arrives as one dump feels robotic. We pace deliveries so the conversation reads like a person texting, and we learned to jitter that pacing so bursts never look like a batch job firing.
- Recursive agent loops are a delivery problem, not just a cost problem. An agent that calls tools in a loop can emit partial text every few seconds. If you stream each fragment, the user gets fifty bubbles. We buffer at natural boundaries and flush at tool calls, so the bubble count stays sane while the activity still feels live.
- Under one second end-to-end is the difference between magic and demo. Every hop counts: webhook verification, dispatch, cold start, first token. We shaved each one until a short reply lands inside the window where a text still feels like a reply and not a notification.
- The canvas is ephemeral on purpose. Streaming UI state to a live glass canvas lets the web surface be ambitious without turning iMessage into a link farm. The bubble stays small; the artifact lives one tap away.
The verdict
The result is that Surf feels native on both ends. You text it like a friend and get blue bubbles back; when the answer is bigger than a bubble, it is waiting on the canvas. None of that is possible if you are burning founder hours keeping a relay alive.
So, a direct thank-you to Nizzy and the whole Keiki team: you gave a three-person team at Novisurf Co enterprise-level messaging infrastructure, and you did it as a real product instead of a pile of scripts. If you are building an agent that needs to live in someone’s texts, go talk to them before you buy a Mac Mini.
Want to feel the difference between a bubble and a canvas? Text Surf something hard.
Give it a try
Meet your Bud and hand it a first task. It takes a few minutes to set up.
Open HeySurf