Back to Dashboard

Documentation

Learn how to use Asyntai

Filament Plugin

Add the Asyntai AI chat assistant to your Filament panels and Laravel pages

Create Account

Overview

Filament is the popular Laravel framework for admin panels, customer portals and SaaS dashboards. The Asyntai plugin adds the chat assistant to every page of a Filament panel. Register it on your panel, add your widget ID, and the chat bubble is there for every user.

The assistant answers from your own content, such as your help center, docs and FAQs, in more than 80 languages, day and night. It can also know who is signed in, so its answers fit each user.

Requirements

  • Filament 3, 4 or 5
  • PHP 8.1 or later, and Laravel 10 or later
  • An Asyntai account. The Free plan is enough to try the widget

Installation

Follow these steps to add Asyntai to your Filament panel:

1

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_.

2

Install the Package

Run this command in your Laravel project:

composer require asyntai/filament-ai-chatbot
3

Add Your Widget ID

Add this line to your .env file:

ASYNTAI_WIDGET_ID=asyntai_1a2b3c4d5e6f
4

Register the Plugin

Add the plugin to your panel provider, for example app/Providers/Filament/AdminPanelProvider.php:

use Asyntai\FilamentAiChatbot\AiChatbotPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(AiChatbotPlugin::make());
}

Open your panel and the chat bubble is in the corner of every page, including the sign-in page.

Options

Each option is a method on the plugin. Every option also accepts a closure.

OptionWhat it does
->widgetId('asyntai_...')A widget ID for this panel. It wins over ASYNTAI_WIDGET_ID, so each panel can have its own assistant
->userContext(fn ($user) => [...])Data about the signed-in user that the assistant can use in its answers
->visible(fn () => ...)Show the widget only when the closure returns true, for example for some roles
->scriptUrl('...')Advanced. Load the widget from another URL

To change the defaults in a config file, run php artisan vendor:publish --tag=ai-chatbot-config.

Personal Answers With User Context

In a customer portal or a SaaS dashboard, the assistant can know who is asking. Pass the details you want it to use:

AiChatbotPlugin::make()
    ->userContext(fn ($user) => [
        'name' => $user->name,
        'plan' => $user->plan,
        'company' => $user->company?->name,
    ])

The assistant can then greet users by name and answer questions about their own account. Guests on the sign-in page get the widget without any user data. User context is part of the Standard and Pro plans.

Your Public Laravel Site

The package also puts the same assistant on any Blade page outside the panel, for example your marketing site. Add this component before </body> in your layout:

<x-ai-chatbot::widget />

How It Works

The plugin adds one small script to the end of every panel page. The script loads the widget after your page has finished loading, so your panel always renders first.

The plugin works with Filament's SPA mode. When users move between pages, the chat stays open and the conversation continues. Panels without the plugin stay as they are.

Answering From Your Content

Asyntai reads your published pages. Add your help center or website URL in the dashboard, and the assistant answers from those pages. You can also add documents, and question and answer pairs.

Tip: Give your customer panel and your staff panel different widget IDs with ->widgetId(). Each assistant then answers from its own knowledge base.

Removing It

Remove the ->plugin(AiChatbotPlugin::make()) line and run composer remove asyntai/filament-ai-chatbot. The chat bubble is gone.

Plans & Pricing

The plugin is free. View pricing.

Need Help?

If you have any questions or run into issues, contact us at [email protected].