@hubtalk-ai/web-sdk — example

This page is the host site: the call lives in the widget in the corner. No build step — the page loads widget.bundle.js directly with a <script> tag. Every press of Call asks example/server.py for a fresh room, so the short-lived LiveKit token is never stale.

The widget is the optional component shipped by the SDK. Restyle it by overriding the tokens on .ht-widget — see “Optional widget” in README.md.

“Call details” inside the widget holds the dynamic variables the agent receives; the list itself is declared once in example/scenarios/ and chosen by the server, next to the agent it belongs to. Call talks, Chat runs the same conversation with no microphone and no audio. The second layout — the call as the whole page — is at /call, and /free is this same widget with nothing configured: the agent and every variable are typed in. /avatar shows avatar mode. /file replaces the microphone with an mp3 or wav file.

The API key and the agent name live in .env on that server — see .env.example. Neither this page nor the SDK ever sees the key, which is the shape a production integration has too: your backend calls POST /v1/calls/web and returns just the session JSON to the browser. The variable values typed into the widget are accepted only for the keys the server declares — the browser names values, never the contract.