Ember Addon
Add the Asyntai AI chat assistant to your Ember app
Overview
Ember.js is a framework for ambitious web applications. The Asyntai addon is an npm package. Install it, add your widget ID to the app configuration, build the app, and the chat bubble is on every page.
The assistant answers your visitors from your own content, in more than 80 languages, day and night.
Requirements
- Ember 4 or later, with the classic Ember CLI build or the Vite build of new Ember apps
- Node 18 or later
- An Asyntai account. The Free plan is enough to try the widget
Installation
Follow these steps to add Asyntai to your Ember app:
Get Your Widget ID
Sign in to Asyntai and open the Install page. The widget ID is the value of data-asyntai-id in the snippet shown there. It starts with asyntai_.
Install the Addon
Run this command in your project folder:
ember install ember-ai-chatbot
On an app without Ember CLI, npm install --save-dev ember-ai-chatbot does the same.
Set the Widget ID
Open config/environment.js and add an asyntai block with your widget ID:
module.exports = function (environment) {
const ENV = {
// ...
asyntai: {
widgetId: 'asyntai_1a2b3c4d5e6f',
},
};
// ...
return ENV;
};
Build the App
Run your build and publish. Open your app and the chat bubble is in the corner of every page.
Options
All options go in the asyntai block of config/environment.js.
| Option | Type | Default | What it does |
|---|---|---|---|
widgetId | string | required | Your Asyntai widget ID |
enableInDevelopment | boolean | true | Set it to false to keep the widget off the app in the development environment |
scriptUrl | string | the Asyntai CDN | Advanced. Load the widget from another URL |
A missing or malformed widgetId stops the build with a message that says how to fix it. The widget is never added in the test environment, so your test suite runs as before.
How It Works
The addon adds the Asyntai loader to the {{content-for "body-footer"}} slot of your index.html. The loader waits for the page's load event, so your own app always renders first.
The widget sits outside the Ember application. When a visitor moves to another route, the same chat stays on the screen.
Answering From Your Content
Asyntai reads your published pages. Add your site URL in the dashboard, and the assistant answers from them. You can also add documents, and question and answer pairs.
Tip: Change the colours, the welcome message and the AI instructions in the Asyntai dashboard. The change shows in your app at once, with no rebuild.
Removing It
Run npm uninstall ember-ai-chatbot, delete the asyntai block and build again. The chat bubble is gone.
Plans & Pricing
The addon is free. View pricing.
Need Help?
If you have any questions or run into issues, contact us at [email protected].