Configure the Anam Widget with HTML attributes and Lab settings, then control its appearance, position, persona, and runtime behaviour.
The widget loads its configuration from your published persona settings in Anam Lab. You can override any setting by adding HTML attributes directly to the <anam-agent> element.
The default mode. The widget renders as a fixed-position overlay, anchored to a corner of the viewport. Users click to expand it into a conversation panel.
For precise control, use bracket syntax to set arbitrary CSS position values:
{/* 20px from the top, flush to the right edge */}<anam-agent agent-id="..." position="[top-20,right-0]"></anam-agent>{/* 100px from the bottom, 40px from the left */}<anam-agent agent-id="..." position="[bottom-100,left-40]"></anam-agent>
The format is [property-value,property-value,...] where:
Before a call starts, the widget plays a short, muted loop of the avatar over its still image. To show only the still image, turn off Preview video under Interface in the Embed tab in Anam Lab, then publish the persona. Embedded widgets can take a few minutes to pick up the change. You can also set the attribute on the element:
agent-id is required. All other attributes are optional and will fall back to your Lab configuration.
Attribute
Type
Default
Description
agent-id
string
Persona ID. Required for fetching config and creating sessions.
api-base-url
string
https://api.anam.ai
API URL override. Only needed for non-production environments.
layout
"floating" | "inline"
"floating"
Widget layout mode.
initial-state
"expanded" | "minimized"
"expanded"
Initial state when layout is floating. Ignored for inline.
position
string
"bottom-right"
Corner position or custom bracket syntax. Only applies to floating layout.
ui-mute-button
"true" | "false"
"true"
Show the microphone mute button.
ui-text-input
"true" | "false"
"true"
Show the text input field.
call-to-action
string
"Talk to our assistant"
Custom text for the start button.
avatar-url
string
Override avatar thumbnail image URL.
avatar-video-url
string
Override avatar preview video URL.
ui-preview-video
"true" | "false"
"true"
Play the avatar preview video before a call. "false" shows the still image.
agent-name
string
Override persona name displayed in the default CTA.
You can get avatar preview media from GET /v1/avatars/{id}.
The returned videoUrl expires after 1 hour, so use a freshly fetched URL or
self-host the MP4 before putting it in long-lived widget configuration.
Last modified on October 5, 2026
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.