Pulse — embed the conversational gateway
The Pulse is the framework's universal gateway. A floating bubble in the corner of any page; click it, talk or type. The Pulse routes the conversation through your state machine — every reply carries the kernel's actual computed values (operators, R(t), phase, proof_digest) and writes a ZeqProof envelope to your audit entangled state.
This is different from the universal tracker embed (zeq-embed.js).
Tracker = silent analytics-style beacon. Pulse = visible UI surface that talks
back. Both can ship on the same page.
The snippet
<script src="https://YOUR-FRAMEWORK/embed/orb.js"
data-zid="YOUR-SLUG"
defer></script>
Both placeholders are auto-resolved when you copy the snippet from inside the
framework — the live picker on /state/admin/ai/ reads
your origin from location.origin and your machine from your active session
(localStorage.zeq_user.machineSlug), so the copied line is ready to paste
on any third-party page.
Host-portable: the framework runs on multiple origins via the rotator (
zeq.dev,zeqsdk.com,1287hz.com, …). The snippet always uses the origin you're currently signed in to — there's no canonical hostname to hard-code. The Pulse script itself reads its own<script>tag'ssrcto determine where to fetch/pulse.jsfrom, so the same line keeps working if you switch framework instances.
That's it. Paste anywhere inside <body> (just before </body> is cleanest).
The script is deferred so it never blocks rendering. The Pulse mounts in the
bottom-right and starts its conversation pipeline against YOUR-SLUG's chain.
How to use it
- Find your entangled state slug. Sign in at
/portal/— the machine appears at the top of the hub (looks likezeq07XXXXXXXX). If you don't have one, spin up a state machine first. - Replace the placeholder. In the snippet, change
data-zid="…"to your machine. The Pulse will then bind every conversation to that chain. - Paste it into your HTML. Anywhere inside
<body>; right before</body>is cleanest. - That's it. Visitors see the Pulse in the bottom-right. Click → talk or
type. The Pulse routes to your entangled state's
/api/chat/pageendpoint with the machine, and replies stream back with the kernel's computed values.
Attributes
| Attribute | Default | What it does |
|---|---|---|
data-zid (required) | "guest" | Chain slug to bind the Pulse to. Use "guest" for an unauthed conversational Pulse (free Fireworks credential, ~10 chats/day per visitor IP). |
data-theme | "dark" | "dark" or "light" — Pulse colour scheme. |
data-position | "bottom-right" | "bottom-right" or "bottom-left" — where the Pulse anchors. |
data-accent | #00ff88 | CSS colour for the Pulse's glow. |
data-origin | script's own origin | Framework origin to load /pulse.js from. Useful for rotator failover (e.g. https://zeqsdk.com). |
Examples
Authenticated — bind to your entangled state
<script src="https://YOUR-FRAMEWORK/embed/orb.js"
data-zid="YOUR-SLUG"
defer></script>
Drops the Pulse on your blog, landing page, or third-party docs. Visitors talk to your entangled state — every reply carries a ZeqProof and runs against your machine's compute budget.
Guest — unauthed conversational Pulse
<script src="https://YOUR-FRAMEWORK/embed/orb.js"
data-zid="guest"
defer></script>
For demo pages or marketing sites. Uses the framework's seeded Fireworks credential (free tier, ~10 chats/day per visitor IP). The Pulse tells the visitor to register if they want to actually run contracts or build pages.
Customised — light theme, bottom-left, magenta glow
<script src="https://YOUR-FRAMEWORK/embed/orb.js"
data-zid="YOUR-SLUG"
data-theme="light"
data-position="bottom-left"
data-accent="#ff66dd"
defer></script>
What it costs
Embedding the Pulse is free — no per-impression charge. You only pay for what visitors actually compute against your entangled state:
- Guest mode (
data-zid="guest") — uses the framework's free Fireworks credential. No charge to you. - Slug-bound mode — each conversation hits your entangled state's
/api/chat/page. Costs 25 ZEQ per turn against your daily wallet (Free tier = 143 ZEQ/day, Architect tier = 25,000 ZEQ/day).
Top up at /tally/. Full economy details on
/transparency/ and the
Tally + Tokens guide.
Where the snippet lives
The wrapper script is served from /embed/orb.js on every framework
instance (the rotator load-balances across all configured origins). The
wrapper's job is to read your data-* attributes, then dynamically load
/pulse.js from its own origin with the right config — that decoupling
means future Pulse upgrades land automatically without you re-pasting
anything, and the same snippet keeps working if you switch which framework
instance you point it at.
You can see the snippet pre-filled with your own origin and your own
slug on /state/admin/ai/ under
"Pulse · embed on any page" — both values come from the live session,
not from any hard-coded host.
Browser support
Any browser that supports ES2017+ (fetch, async, dataset). Tested in
Chrome, Safari, Firefox, Edge, and Brave. The Pulse degrades to a floating
button with no microphone if the page isn't on HTTPS or the user denies mic
permission — typing still works.
Security
The Pulse's API calls are CORS-open and use cookie auth from the framework origin. No keys are embedded in the snippet — the machine is public (it's your subdomain too). Compute charges are sandboxed to your entangled state's wallet; visitors cannot exceed it. Conversations against your entangled state are written to your audit log with a ZeqProof envelope.
For the threat model around hosting third-party UI surfaces on your entangled state, see Embed + hosting security.
Related
- Universal tracker embed — silent analytics-style beacon (different from the Pulse).
- Embed + hosting security — threat model for both forms.
- Page chat agent API — the
/api/chat/pageendpoint the Pulse calls. - HulyaPulse + Zeqond — what makes the Pulse tick.