Build Progress (SSE)
The primary way to observe a build. Open a Server-Sent Events stream and receive oneProvisioningEvent per
phase transition plus progress ticks in slow phases. On connect, the current
state is replayed first, then events stream until a terminal event (done
or error), after which the connection closes.
Authentication
Path Parameters
string
required
The
bld_… id returned by from-url (also available as the streamUrl).Wire Format
Each message is a standard SSE frame. Theid: is the event’s emittedAt
ISO8601 timestamp (usable as Last-Event-ID for reconnect). The event: name is
progress for non-terminal events, done for a successful terminal, or error
for a failed terminal. The data: is a JSON-encoded ProvisioningEvent.
error event:
ProvisioningEvent Contract
A single shape returned by SSEdata, the
poll snapshot, and the
webhook — render against this one
contract everywhere.
ProvisioningStatus values
ready is emitted only when the agent is published and its bounded index
run is complete (or a phase timeout elapsed) — so the first chat is grounded in
the creator’s content. Thin / partial content still publishes and reaches ready
with a warning rather than failing.ProvisioningErrorCode table
Each error carriesretryable so the client can branch (retry vs. explain).
Pre-flight failures (
plan_limit, insufficient_credits) and Turnstile / rate
issues surface here as a failed event with the matching code — they are not
synchronous errors on from-url (except the synchronous 400 turnstile_failed
and 429 rate_limited cases on the initial submit).SSE Consumer (Node)
A server-side consumer using a streamingfetch reader — no extra dependency.
Relay each parsed event to your own browser clients.
Node / TypeScript
eventsource
package (which supports custom headers, unlike the browser built-in):
Node — eventsource package
curl
curl
Reconnect
Theid: of each frame is the event’s emittedAt timestamp. On reconnect, send
Last-Event-ID: <last id you saw> to resume; the stream replays current state on
every connect, so a fresh connect without the header is also safe.

