8i logo 8i.co.za

AM.CO.ZA · Live chat

Ask AI

Chat the AM.CO.ZA public knowledge base (optional photo). For Southern African (SADC) visitors. Outside SADC, use AI Connect or AI Builder.

Build this on your own frontend

Host pages can sit on any site. The chat API is cross-origin. Prefer the floating activator (one script tag). Style with CSS variables — do not fork the widget unless you need new behaviour.

1. Easiest — floating Ask AI (recommended)

One script tag. Adds a floating Ask AI button; opens a chat window with Maximize / Minimize / Close. The inline chat on this page also has a Maximize header button. Paste, drop, or attach up to 3 images.

<script src="https://8i.co.za/guide/amcoza/ask-ai/am-kb-chat-activate.js" async></script>

Optional options (set before the script):

<script>
  window.AmKbChatActivate = {
    title: 'Ask AI',
    fabLabel: 'Ask AI',
    autoOpen: false,       // true = open window on load
    startMaximized: false  // true = open full-screen
  };
</script>
<script src="https://8i.co.za/guide/amcoza/ask-ai/am-kb-chat-activate.js" async></script>

From your own JS after load: AmKbChat.openFloat(), AmKbChat.closeFloat(), or AmKbChat.activate({…}).

2. Inline mount (fixed panel on the page)

<link rel="stylesheet" href="https://8i.co.za/guide/amcoza/ask-ai/am-kb-chat.css">
<div id="kb"></div>
<script src="https://8i.co.za/guide/amcoza/ask-ai/am-kb-chat.js"></script>
<script>
  AmKbChat.mount('#kb', { title: 'Ask AI' });
</script>

Do not put the ask API host in your page. The widget loads endpoint.js from the same folder as the JS. Change the backend once there — every embed picks it up.

3. Or auto-mount

<div
  data-am-kb-chat
  data-am-kb-title="Ask AI"></div>
<script src="https://8i.co.za/guide/amcoza/ask-ai/am-kb-chat.js"></script>

4. Style with your page theme

Override hooks on .am-kb-chat (this page maps them to the 8i theme):

.am-kb-chat {
  --am-kb-bg: #030312;
  --am-kb-ink: #f7f7ff;
  --am-kb-muted: #aaaadc;
  --am-kb-card: #09094a;
  --am-kb-line: #b7b7fb48;
  --am-kb-accent: #f6cd49;   /* 8i gold */
  --am-kb-user-bg: #0f0fb9;  /* 8i blue */
  --am-kb-user-ink: #f7f7ff;
  --am-kb-bot-bg: #09094a;
  --am-kb-radius: 12px;
  --am-kb-font: 'Baloo Chettan 2', Arial, sans-serif;
}

5. API contract

6. Rules for product frontends

Questions are logged so AM.CO.ZA can improve the KB. Email copy goes to the internal AI log; the database is the source of truth.