Skip to main content

Set up your public chatbot

The public chatbot is an embeddable chat widget that you can integrate into your website. This guide walks you through the complete setup process.

Step 1: Enable public access

Before embedding your chatbot, configure your agent’s public settings.
1

Open agent settings

Navigate to your agent and access the Settings section.
Agent settings panel
2

Enable public access

In the settings panel, locate and toggle on the Public Access option to make your agent available for embedding.
Public access toggle
3

Add your domain

Enter the domain where you’ll be embedding the chatbot. This should be your website’s URL (for example, docs.yourcompany.com). This ensures the chatbot only loads on authorized domains. You can use http://localhost:port for testing purposes.
Domain allowlist configuration
4

Save and copy your Agent Key

Press Save URL to confirm your settings. You’ll see your Agent Key displayed, copy this key — you’ll need it in the next step to embed the chatbot on your website.

Step 2: Embed the widget

Add the Atthene chatbot to your website using the following code.

Add the container element

Add this container to your HTML
<div id="atthene-chatbot-root"></div>

Load and initialize the script

Add this script after the container element:
<script>
  document.addEventListener('DOMContentLoaded', function() {
    const scriptElement = document.createElement('script');
    scriptElement.src = 'https://static.arttacsolutions.com/js/atthene.js/1.2.0-amas/atthene.umd.js';
    scriptElement.async = true;

    scriptElement.onload = function() {
      setTimeout(function() {
        try {
          if (window.atthene && typeof window.atthene.initialize === 'function') {
            window.atthene.initialize({
              agentKey: 'YOUR_AGENT_KEY',
              elementId: 'atthene-chatbot-root',
              type: 'floatingButton',
              placeholder: 'Write a message...',
              welcomeMessage: 'Hi! How can I help you?'
            });
          }
        } catch (error) {
          console.error('Failed to initialize Atthene chatbot:', error);
        }
      }, 200);
    };

    scriptElement.onerror = function(error) {
      console.error('Failed to load Atthene chatbot script:', error);
    };

    document.head.appendChild(scriptElement);
  });
</script>
Replace YOUR_AGENT_KEY with the Agent Key you copied from the agent settings.
When the page loads, you see the chatbot launcher button and you can open a conversation.

Widget types

Atthene supports two display modes:

Floating Button

A collapsible chat widget that appears as a button in the bottom corner of your page (position configurable). Users click to expand the chat interface.
Floating button widget collapsed in bottom left corner

In-Place

The chat interface is rendered directly in the page, always visible and expanded. Ideal for dedicated support pages or embedded chat sections.
In-place widget rendered opened in the center
Set the display mode using the type property in your configuration (see Technical configuration below).

Step 3: Configure your chatbot (optional)

You can customize the chatbot’s appearance and behavior by passing additional parameters to window.atthene.initialize().

Configuration reference

The initialize function accepts an AttheneOptions object organized into the following categories:

Technical

Core technical configuration for the chatbot widget:
PropertyTypeDescription
agentKeystringYour agent identifier (required)
connectionKeystringDeprecated connection key for non-AMAS agents
elementIdstringID of the container element (default: atthene-chatbot-root)
type'floatingButton' | 'inPlace' | 'modal'Chat widget display type - see Widget types for visual examples (default: floatingButton)
userTokenstringToken for user identification and session management

Content

Content and messaging configuration:
PropertyTypeDescription
placeholderstringCustom placeholder text for the message input field
welcomeMessagestringCustom message displayed when chat opens
disclaimerstringLegal disclaimer displayed at the start of the chat
persistentDisclaimerstringDisclaimer that remains visible throughout the chat
hintQuestionsstring[]Array of suggested questions to help users get started
feedbackInputPlaceholderstringPlaceholder for feedback input field
feedbackInputCaptionTextstringCaption text for feedback section
Images
The images object allows you to customize branding:
PropertyTypeDescription
images.assistantstringURL to custom assistant avatar image
images.assistantNoBackgroundbooleanWhether the assistant image has no background (default: false)

Styling / Theming

Visual appearance and styling configuration:
PropertyTypeDescription
launcherTooltipstringTooltip text shown when hovering over the launcher button
launcherRightbooleanPosition launcher on the right side (default: false)
launcherExtraShadowbooleanAdd extra shadow effect to the launcher button (default: false)
fontstringCustom font family for the chat widget
Theme
The theme object allows you to customize colors and appearance:
PropertyTypeDescription
theme.darkbooleanEnable dark mode (default: false)
theme.accentColorstringPrimary accent color (hex format)
theme.assistantMessage.bgstringBackground color for assistant messages
theme.assistantMessage.textstringText color for assistant messages
theme.userMessage.bgstringBackground color for user messages
theme.userMessage.textstringText color for user messages

Audio

Audio features are only available if you have subscribed to the appropriate tier and saved an ElevenLabs API key in the platform settings.
Audio input/output configuration:
PropertyTypeDescription
enableAudiobooleanEnable audio input/output capability (default: false)
playAudioByDefaultbooleanAuto-play audio responses when audio is enabled (default: true)
Voice configuration
The voiceConfig object configures audio output voice settings (requires enableAudio: true):
PropertyTypeDescription
voiceConfig.model_idstringVoice model to use (e.g., eleven_turbo_v2_5)
voiceConfig.voice_idstringSpecific voice identifier
voiceConfig.speednumberSpeech speed (0.5 to 2.0)
voiceConfig.stabilitynumberVoice consistency (0.0 to 1.0)
voiceConfig.similarity_boostnumberVoice similarity level (0.0 to 1.0)
voiceConfig.use_speaker_boostbooleanEnhance speaker clarity
voiceConfig.style_exaggerationnumberEmotional expression level (0.0 to 1.0)

Configuration examples

Minimal setup

Just the essentials:
window.atthene.initialize({
  agentKey: 'YOUR_AGENT_KEY',
  elementId: 'atthene-chatbot-root',
  welcomeMessage: 'Welcome to our support chatbot!'
});

Customer support bot

With hint questions and feedback:
window.atthene.initialize({
  agentKey: 'YOUR_AGENT_KEY',
  elementId: 'atthene-chatbot-root',
  type: 'floatingButton',
  launcherTooltip: 'Need help? Chat with us!',
  welcomeMessage: 'Hi! How can I assist you today?',
  hintQuestions: [
    'How do I reset my password?',
    'What are your business hours?',
    'How do I contact support?'
  ],
  feedbackInputPlaceholder: 'Tell us how we did...',
  placeholder: 'Type your question here...'
});

Fully customized with theming

Complete customization with branding and theme:
<script>
  document.addEventListener('DOMContentLoaded', function() {
    const scriptElement = document.createElement('script');
    scriptElement.src = 'https://static.arttacsolutions.com/js/atthene.js/1.2.0-amas/atthene.umd.js';
    scriptElement.async = true;

    scriptElement.onload = function() {
      setTimeout(function() {
        if (!window.atthene || typeof window.atthene.initialize !== 'function') return;

        window.atthene.initialize({
          agentKey: 'YOUR_AGENT_KEY',
          elementId: 'atthene-chatbot-root',
          type: 'floatingButton',
          placeholder: 'Write a message...',
          welcomeMessage: 'Hello! How can I help you?',
          launcherRight: false,
          launcherExtraShadow: true,
          hintQuestions: [
            'What products do you offer?',
            'How do I get started?',
            'Where can I find documentation?'
          ],
          theme: {
            dark: false,
            accentColor: '#4e8cff',
            assistantMessage: {
              bg: '#f5f5f5',
              text: '#333333'
            },
            userMessage: {
              bg: '#4e8cff',
              text: '#ffffff'
            }
          },
          images: {
            assistant: 'https://static.arttacsolutions.com/img/icon_atthene_interaction.svg',
            assistantNoBackground: false
          }
        });
      }, 200);
    };

    document.head.appendChild(scriptElement);
  });
</script>

With audio capabilities

Enable voice interaction:
window.atthene.initialize({
  agentKey: 'YOUR_AGENT_KEY',
  elementId: 'atthene-chatbot-root',
  enableAudio: true,
  playAudioByDefault: true,
  voiceConfig: {
    model_id: 'eleven_turbo_v2_5',
    voice_id: 'JBFqnCBsd6RMkjVDRZzb',
    speed: 1.0,
    stability: 0.5,
    similarity_boost: 0.8,
    use_speaker_boost: false,
    style_exaggeration: 0.0
  }
});

Troubleshooting

  • Launcher does not appear: Confirm you added the container element and that elementId matches the container id.
  • Loads locally but not in production: Verify your production domain is allowlisted in agent settings.
  • Console shows a script error: Confirm the scriptElement.src URL is reachable from your site.
  • Agent Key error: Ensure you copied the full Agent Key without extra spaces or characters.

Next steps

  • Monitor performance: Review agent analytics to see how visitors use the chatbot.
  • Test thoroughly: Verify the widget works across devices and browsers.
  • Iterate on configuration: Tune welcome text, theme, and launcher placement based on user feedback.
  • Collect user feedback: Use the feedback feature to continuously improve responses.
Want to connect via WebSocket to build your own frontend? Drop us a message at [email protected].