The widget requires an Anam avatar configured on the Digital Twin (avatar, voice, intro message). Set that up first — see Anam Avatar.
How it works
- The browser only ever holds a public embed key and a short-lived session token kept in memory — nothing is written to cookies or local storage, and no server API keys or Pria app credentials are involved.
- Sessions are anonymous — no per-user memory or conversation history is created.
- The avatar’s answers come from your Digital Twin’s configured conversation model and knowledge, restricted to read-only tools (e.g. searching the Twin’s documents). The widget cannot trigger actions like sending email.
Create an embed (admin)
Open Avatar Embeds
In the Admin dashboard, open your Digital Twin instance and go to the Avatar Embeds section. It confirms your Anam avatar/voice binding — if it warns that no avatar is configured, finish the Anam setup first.
Create a new embed
Click New embed and fill in:
- Name — for your own reference.
- Allowed origins (required) — exact
scheme://host[:port]values, one per line (e.g.https://example.com,http://localhost:3000). No wildcards, no paths. Only pages served from these origins can use the widget. - Display — title, greeting, theme, accent color, launcher label, placeholder image.
- Limits — sessions per day, turns per session, session duration, concurrent sessions, and a daily credit ceiling.
Install the widget
Script tag (any site)
window.PriaAvatar global and one scoped stylesheet. Multiple widgets per page are supported when each has its own mount element. You can also mount imperatively:
React component
Lifecycle controls
From the Avatar Embeds admin panel you can manage each embed at any time:| Action | Effect |
|---|---|
| Rotate key | Issues a new embed key (update your site’s snippet) |
| Disable / Enable | Temporarily turns the embed off/on |
| Revoke | Permanently invalidates the key |
| Delete | Removes the embed configuration |
Billing behaviour
Each completed voice turn is billed server-side against the institution’s pooled credits the moment the turn finishes. If a visitor closes the tab mid-conversation, completed turns are already accounted for and abandoned sessions are closed automatically — nothing is double-charged. The per-embed daily credit ceiling caps worst-case spend.Troubleshooting
| Symptom | Fix |
|---|---|
| Widget shows an error immediately | Check the embed key is correct, the embed is enabled, and avatar embedding is enabled for the Digital Twin |
403 Forbidden in the network tab | The page’s origin isn’t in the Allowed origins list — entries must match exactly (scheme, host, port) |
| Avatar never connects | Verify the Anam avatar/voice binding on the Digital Twin and the Anam account status |
| Sessions end abruptly | You may be hitting the per-embed limits (turns per session, session duration, daily credit ceiling) |
Related
- Anam Avatar — Configure the avatar the widget displays
- Embed your Digital Twin (Web SDK) — Full chat UI embed for signed-in or identified users
- Voice & Realtime Providers — Compare avatar and voice options