<script src="https://ultron-widget.pages.dev/v1.js" data-agent-id="01KRW..." data-token="wt.eyJv...<sig>" data-title="Support" data-position="bottom-right" data-theme="dark" data-accent="#6b8aff" defer></script>
Paste this into any page. The widget renders a floating bubble; click it to open the chat. The token expires (default 30 min) — your backend mints a fresh one per session.
POST https://ultron-agent-runtime.catalin-932.workers.dev/widget/token
Authorization: x-ultron-api-key: $UC_KEY
Content-Type: application/json
{
"agent_id": "01KRW...",
"owner_id": "your-ultron-user-id",
"ttl_seconds": 1800
}
→ { "token": "wt.eyJv...<sig>", "expires_at": 17... }
Your backend holds the master UC_KEY and mints a per-session widget token
scoped to one agent + one owner. The browser only ever sees the short-lived token.
The Ultron agent ID this widget talks to.
A widget token minted by your backend. Expires per the TTL you set.
Override the Worker URL. Defaults to the production agent-runtime.
bottom-right (default) · bottom-left · top-right · top-left
dark (default) · light
Brand color hex, e.g. #6b8aff. Drives bubble + sends + dots.
Header text in the chat panel.
Optional opening assistant message rendered before the user types.
An identifier for the visitor on your site. Stored on each conversation row.
Public JS API: open(), close(), toggle(), isOpen().
The widget below is loaded with a real, short-lived widget token. Click the bubble in the bottom-right to chat with a sample agent.
View sourceagent from-template <slug> <owner>.POST /widget/token per user session.data-token.