PHPackages                             sontus/laravel-support-chatbot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sontus/laravel-support-chatbot

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sontus/laravel-support-chatbot
==============================

AI-powered support chatbot package for Laravel with direct Gemini and OpenAI integration.

00PHP

Since May 5Pushed 2mo agoCompare

[ Source](https://github.com/sontus/support-chatbot)[ Packagist](https://packagist.org/packages/sontus/laravel-support-chatbot)[ RSS](/packages/sontus-laravel-support-chatbot/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Support Chatbot
=======================

[](#laravel-support-chatbot)

A production-ready, AI-powered support chatbot package for Laravel applications. This package seamlessly integrates an intelligent, context-aware chatbot into your application. It uses direct HTTP integrations without heavy dependencies.

Features
--------

[](#features)

- **AI Integration**: Directly supports OpenAI and Gemini models without requiring PHP 8.4 dependencies.
- **Knowledge Base (RAG)**: Admin panel to add FAQs and documentation, searchable via AI embeddings.
- **Context Awareness**: The chatbot automatically understands the logged-in user, their orders, and tickets.
- **Frontend Widget**: A sleek, customizable, floating Vanilla JS widget for real-time chat. Drop it into any site!
- **Queue System**: Messages are processed asynchronously to maintain high performance.
- **Multi-channel API**: Interact via frontend widget or via exposed REST APIs.
- **Multi-Tenancy Ready**: Configurable database connection for tenant-specific deployments.

Installation
------------

[](#installation)

1. **Install via Composer:**

```
composer require sontus/laravel-support-chatbot
```

2. **Run the installation command:**

```
php artisan chatbot:install
```

3. **Run Migrations:**

```
php artisan migrate
```

4. **Configure Environment:**Add the following to your `.env` file:

```
CHATBOT_AI_API_KEY="your_api_key_here"

# For Gemini (Default)
CHATBOT_AI_PROVIDER=gemini
CHATBOT_AI_MODEL=gemini-2.0-flash

# For OpenAI
# CHATBOT_AI_PROVIDER=openai
# CHATBOT_AI_MODEL=gpt-4o-mini
```

5. **Start the Queue Worker:**Because the chatbot processes AI requests asynchronously to ensure high performance and avoid blocking your app, you need to run a queue worker:

```
php artisan queue:work
```

Usage
-----

[](#usage)

### 1. Frontend Chat Widget

[](#1-frontend-chat-widget)

The frontend widget is pure Vanilla JavaScript and includes its own styling. It works on **any** Laravel site without needing a Node/Vue compilation step.

Simply add the script tag before the closing `` tag in your layout (e.g. `resources/views/layouts/app.blade.php`):

```

```

Add a meta tag for CSRF and optionally User ID if authenticated (in your ``):

```

@auth

@endauth
```

### 2. Admin Panel

[](#2-admin-panel)

To train the chatbot and view conversations, visit the admin dashboard: **URL:** `/admin/chatbot`Ensure your admin users pass the configured middleware (`web`, `auth`).

### 3. Customizing Context

[](#3-customizing-context)

You can bind your own `ContextResolver` in your application's `AppServiceProvider` if you want to provide custom data (like specific tenant data) to the AI:

```
use Sontus\SupportChatbot\Services\ContextResolver;

$this->app->bind(ContextResolver::class, function ($app) {
    return new class extends ContextResolver {
        public function resolveForUser($user = null): array
        {
            // Return any array of data you want the AI to know about this user
            return [
                'name' => $user->name,
                'subscription_plan' => $user->plan->name,
            ];
        }
    };
});
```

### 4. API Endpoints

[](#4-api-endpoints)

- `POST /api/chatbot/message` (Requires `message`, and `session_id` or `user_id`)
- `GET /api/chatbot/history` (Requires `session_id` or `user_id`)

License
-------

[](#license)

MIT

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance56

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31382847?v=4)[Sontus Chandra Anik](/maintainers/sontus)[@sontus](https://github.com/sontus)

---

Top Contributors

[![sontus](https://avatars.githubusercontent.com/u/31382847?v=4)](https://github.com/sontus "sontus (4 commits)")

### Embed Badge

![Health badge](/badges/sontus-laravel-support-chatbot/health.svg)

```
[![Health](https://phpackages.com/badges/sontus-laravel-support-chatbot/health.svg)](https://phpackages.com/packages/sontus-laravel-support-chatbot)
```

###  Alternatives

[verbb/cloner

Easily clone sections, entry types, groups and more.

25182.7k](/packages/verbb-cloner)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
