AM.CO.ZA · Live chat
Chat the AM.CO.ZA public knowledge base (optional photo). For Southern African (SADC) visitors. Outside SADC, use AI Connect or AI Builder.
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.
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({…}).
<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.
<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>
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;
}
POST JSON to the ask URL from endpoint.js (widget resolves it): { message, history, images?, session_id? }{ answer }{ rate_limited, retry_after, error } — wait and retry{ geo_blocked, ai_connect, ai_builder, error } — show those linksimages[{mime,data}]history in the browser across turns; clear on “New conversation”type values live_start / live_message / live_poll / OTP / internal live_reply. Management escalate: poppy@am.co.za.am-kb-chat-activate.js (floating) or hotlink JS/CSS from 8i.co.za/guide/amcoza/ask-ai/ so fixes apply everywhereendpoint.js)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.