← API home

Embed AgentsAI chat on your website

One line of HTML. A floating chat bubble appears bottom-right. Visitors click it, ask questions, get UAE-real-estate-tuned answers from your AgentsAI account.

Minimal embed

Paste this into your site's HTML, anywhere. Done.

<script src="https://agentsai.ae/widget.js"
  data-api-key="ak_live_YOUR_KEY_HERE"
  defer></script>

Customised embed

All options — colour, header title, greeting message, position, language.

<script src="https://agentsai.ae/widget.js"
  data-api-key="ak_live_YOUR_KEY_HERE"
  data-color="#0b4a8a"
  data-title={tr('Ask our property AI')}
  data-greeting="Hi! Looking for a property in Dubai? I can help."
  data-position="right"
  data-language="en"
  defer></script>
AttributeDefaultNotes
data-api-keyRequired. Get one at /account.
data-color#b08d2eAny CSS colour.
data-titleAsk AgentsAIHeader text in the chat panel.
data-greetingUAE real-estate introFirst message the bot sends.
data-positionrightright or left
data-languageenen, ar, or both

Platform recipes

WordPress

<!-- In your WordPress theme's footer.php, before </body>: -->
<script src="https://agentsai.ae/widget.js"
  data-api-key="ak_live_YOUR_KEY_HERE"
  defer></script>

Or use a Header/Footer Scripts plugin (e.g. WPCode) and paste the script there.

Wix / Squarespace

Use the Custom Code / Custom HTML embed. Loads on every page.

<script src="https://agentsai.ae/widget.js"
  data-api-key="ak_live_YOUR_KEY_HERE"
  defer></script>

Google Tag Manager

// Google Tag Manager - Custom HTML tag, fire on All Pages
<script src="https://agentsai.ae/widget.js"
  data-api-key="ak_live_YOUR_KEY_HERE"
  defer></script>

Next.js / React

// app/layout.tsx (Next.js App Router):
<Script src="https://agentsai.ae/widget.js"
  data-api-key="ak_live_YOUR_KEY"
  strategy="afterInteractive" />

Security notes

  • • Your API key is visible in the page source — expected for a browser-embedded widget. It is rate-limited per the tier you chose, so public embedding is safe within those limits.
  • • Each chat call counts against your monthly API quota. Visitor traffic = API calls.
  • • For private/internal embeds, prefer a server-side proxy that keeps the key out of the browser.
  • • The widget never stores conversation server-side — history lives in-memory only, cleared on page reload.

Try the widget

The file is live at https://agentsai.ae/widget.js. Embed it on any page and you're done.

Generate your own key from /account.