Skip to main content
The widget embed code is a snippet of JavaScript that adds a voice button to your website. Visitors can click to talk with your agent directly in their browser.

Location

Agent Editor → Left Sidebar → Widget

Generating the Code

Step 1: Configure Widget

Before generating code, configure your widget appearance and behavior: → See: Widget Configuration

Step 2: Get Embed Code

After configuration:
  1. Navigate to the Widget section
  2. Find the “Get Embed Code” or “Copy Code” button
  3. Click to copy the snippet

Step 3: Code Format

The embed code looks something like:
<script>
  (function() {
    var script = document.createElement('script');
    script.src = 'https://widget.atoms.ai/v1/widget.js';
    script.setAttribute('data-agent-id', 'YOUR_AGENT_ID');
    document.body.appendChild(script);
  })();
</script>
NEEDS PLATFORM INFO: Exact embed code format

Customization Options

The embed code may include configuration options:
OptionDescription
data-agent-idYour agent identifier
data-positionButton position (bottom-right, bottom-left)
data-themeColor theme
data-greetingInitial greeting message

What the Widget Does

When embedded:
  1. Button appears — Usually bottom corner of page
  2. User clicks — Widget opens
  3. Microphone access — Browser prompts for permission
  4. Conversation starts — User talks with your agent
  5. Widget closes — When conversation ends

Browser Requirements

Visitors need:
  • Modern browser (Chrome, Firefox, Safari, Edge)
  • Microphone access permission
  • Speakers or headphones
Mobile browsers are supported.

What’s Next