Remote and embeddable chatbots
Embedding an Aimogen Pro chatbot on other websites with an iframe, restricting which domains may do so, and letting users create their own instances billed against credits.
The chatbot can run on sites other than the one hosting Aimogen Pro, embedded as an iframe.
AI Chatbot › Remote Chatbot
This tutorial was recorded before Aiomatic was renamed to Aimogen Pro. Some labels or interface elements may differ slightly from the current version.
This tutorial was recorded before Aiomatic was renamed to Aimogen Pro. Some labels or interface elements may differ slightly from the current version.
Enabling#
| Setting | What it does |
|---|---|
Enable Chatbot Embedding On Remote Sites | Master switch |
Domain List Allowed To Embed Chatbots | Which domains may embed. Set this |
Enable Users To Create Remote Chatbot Instances | Lets logged-in users create their own |
The realtime chatbot has its own equivalents: remote_chat_realtime and
allow_chatbot_site_realtime.
Embedding#
Once enabled, the settings screen gives you the embed code for the remote site:
<iframe src="https://example.com/?aiomatic_chat=1&id=..."
width="400" height="600" frameborder="0"></iframe>The exact URL is generated by the plugin — copy it from the settings screen rather than constructing it.
The chatbot runs on your WordPress installation, so it uses your API keys, your settings, your knowledge base and your usage limits. The remote site only provides the frame.
User-created instances#
Enable Users To Create Remote Chatbot Instances lets logged-in users create their own chatbots, which
they can embed elsewhere. Usage is billed against their credit allowance rather than the site pool.
This is the building block for a chatbot-as-a-service business on WordPress: users subscribe through a membership plugin, receive credits, create a bot and embed it on their own site.
The front-end shortcode:
[aimogen_user_remote_chatbot max_instances="3" required_user_capability=""
allow_delete="yes" allow_regenerate="yes"
show_embed="yes" allow_domains="no"]| Attribute | Default | Meaning |
|---|---|---|
max_instances | 3 | How many bots one user may create |
required_user_capability | empty | A capability the user must hold |
allow_delete | yes | Users may delete their instances |
allow_regenerate | yes | Users may regenerate the embed key |
show_embed | yes | Show the embed code to the user |
allow_domains | no | Users may set their own domain allowlist |
There is also an Aimogen User Remote Chatbot Gutenberg block.
Instances are stored as aiomatic_remote_chat posts.
Credits#
Remote chatbot usage draws on the user credit allowance from usage limits, integrated with the supported membership plugins so that a subscription plan can grant credits.
Two shortcodes show a user their balance:
[aimogen-user-remaining-credits-text]
[aimogen-user-remaining-credits-bar]See Front-end AI tools.
Operational considerations#
Every remote message is your API cost. Set limits before enabling this. A single misconfigured allowlist can produce a large bill.
Cross-origin. Embedding in an iframe means third-party cookie and storage restrictions apply. Persistent chat for guests may not work reliably in every browser.
Your privacy policy covers it. Visitors on someone else site are conversing with your infrastructure, and their messages reach your AI provider. Both sites need that reflected in their privacy notices.
Performance. Remote chatbot requests hit your server. A busy embed on a high-traffic site is meaningful load.
Common problems#
The iframe is blank. The embedding domain is not in the allowlist, or the feature is off.
Blocked by the browser. Check your X-Frame-Options and Content-Security-Policy headers — a
security plugin or your host may be sending SAMEORIGIN.
Users cannot create instances. Enable Users To Create Remote Chatbot Instances is off, they are not
logged in, or they lack required_user_capability.
Credits are not deducted. Usage limits are not enabled. See Usage limits and credits.
Related#
Still stuck? Open a support ticket and include the diagnostics from Aimogen Pro › System & Logs › System Info.