PHPackages                             orchestratexr/botman-chat-sdk - 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. orchestratexr/botman-chat-sdk

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

orchestratexr/botman-chat-sdk
=============================

Drop-in chat-widget UI and multi-channel adapter framework on top of the Laravel AI SDK.

0.1.0(2mo ago)07MITPHPPHP ^8.3CI failing

Since Aug 5Pushed 1mo agoCompare

[ Source](https://github.com/AccessVR/SuperBotMan)[ Packagist](https://packagist.org/packages/orchestratexr/botman-chat-sdk)[ Docs](https://github.com/AccessVR/SuperBotMan)[ RSS](/packages/orchestratexr-botman-chat-sdk/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (18)Versions (19)Used By (0)

SuperBotMan
===========

[](#superbotman)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fa962fc617669ed1bf275d0ac06731562291e96d9afe07d764e540cea39f5e72/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7263686573747261746578722f73757065722d626f746d616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/orchestratexr/super-botman)[![License](https://camo.githubusercontent.com/ce018199592bf132af458510008a9e9eb291aee13c266000618a35646e343070/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f41636365737356522f5375706572426f744d616e)](https://github.com/AccessVR/SuperBotMan/blob/main/LICENSE.md)

A Laravel package that gives any host app a drop-in chat-widget UI plus a thin multi-channel adapter framework on top of the [Laravel AI SDK](https://github.com/laravel/ai).

SuperBotMan is the evolution of the prior `orchestratexr/botman-chat-sdk` package. The widget UI carried over; the LLM back-end (previously a hand-rolled BotMan + LLPhant integration) has been replaced by `laravel/ai`. See [`CHANGELOG.md`](CHANGELOG.md) for the full break-down — anything BotMan- or LLPhant-related is gone.

What you get
------------

[](#what-you-get)

- A bundled **Vue chat widget** (beacon + popup/docked iframe) that drops onto any Laravel page with one Blade directive.
- A **`Channel`** abstraction so the same agent code can serve the Web widget today, and Slack / Discord / your-transport-of-choice tomorrow, without the agents needing to know.
- An **`AgentRegistry`** so registering an agent and getting auto-mounted routes (POST endpoint, conversation list/show/delete) is three lines in your `AppServiceProvider`.
- A **CLI** (`php artisan super-botman:chat {slug}`) for testing a registered agent end-to-end without a browser, complete with `--continue` / `--conversation-id` / `--system` flags.

What it isn't
-------------

[](#what-it-isnt)

- **Not an LLM framework.** Agents, tools, providers, structured output, streaming — all of that is `laravel/ai`'s job. SuperBotMan is the integration shell around it.
- **Not opinionated about persistence.** Conversation history lives in `laravel/ai`'s `agent_conversations` / `agent_conversation_messages` tables. SuperBotMan just exposes them through HTTP endpoints the widget understands.
- **Not a multi-tenant agent marketplace.** It's a tool for the host app's own developers to wire up agents. There's no UI for end-users to register their own.

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

[](#installation)

```
composer require orchestratexr/super-botman laravel/ai
```

Publish the package's config, views, and built JS/CSS assets, then run migrations:

```
php artisan vendor:publish --tag=super-botman-config
php artisan vendor:publish --tag=super-botman-views
php artisan vendor:publish --tag=super-botman-assets
php artisan vendor:publish --provider="Laravel\Ai\AiServiceProvider"
php artisan migrate
```

Add an Anthropic (or other Lab provider) key to your `.env`:

```
ANTHROPIC_API_KEY=sk-ant-...
```

The 3-line host-app integration
-------------------------------

[](#the-3-line-host-app-integration)

Drop these in `AppServiceProvider::boot()`:

```
use OrchestrateXR\SuperBotMan\Facades\SuperBotMan;
use OrchestrateXR\SuperBotMan\Channels\WebChannel;

SuperBotMan::registerAgent('chat', \App\Agents\ChatAgent::class)
    ->channel(WebChannel::class);
```

That auto-registers:

MethodURLPurpose`POST``{mount}/chat`Agent endpoint (the widget posts here)`GET``{mount}/chat/conversations`List the current user's conversations`GET``{mount}/chat/conversations/{id}`Fetch a conversation's messages (for resume)`DELETE``{mount}/chat/conversations/{id}`Delete a conversation`{mount}` defaults to `/chat` and is configurable in `config/super-botman.php`.

Drop the widget onto any Blade page:

```
@superbotman
```

Define your agent as a normal `laravel/ai` Agent class:

```
namespace App\Agents;

use Laravel\Ai\Attributes\Provider;
use Laravel\Ai\Attributes\Model;
use Laravel\Ai\Concerns\RemembersConversations;
use Laravel\Ai\Contracts\Agent;
use Laravel\Ai\Contracts\Conversational;
use Laravel\Ai\Enums\Lab;
use Laravel\Ai\Promptable;

#[Provider(Lab::Anthropic)]
#[Model('claude-sonnet-4-5')]
class ChatAgent implements Agent, Conversational
{
    use Promptable, RemembersConversations;

    public function instructions(): string
    {
        return 'You are a helpful assistant.';
    }
}
```

Customizing user identity
-------------------------

[](#customizing-user-identity)

Most apps will want to override how SuperBotMan identifies the visitor — for naming the echo channel, for scoping conversation history, and for telling `laravel/ai` which user owns the conversation. Extend the default configurator and bind your subclass:

```
namespace App\Services;

use OrchestrateXR\SuperBotMan\SuperBotManConfigurator;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Support\Facades\Auth;

class MyChat extends SuperBotManConfigurator
{
    public function agentUser(): Authenticatable
    {
        return Auth::user() ?? parent::agentUser();
    }

    public function isAnonymous(Authenticatable $user): bool
    {
        // E.g. for an app that authenticates everyone as a real user
        // and uses an `is_anonymous` flag for the shared visitor account:
        return $user->is_anonymous ?? parent::isAnonymous($user);
    }
}
```

```
// AppServiceProvider::register()
$this->app->singleton(
    \OrchestrateXR\SuperBotMan\Contracts\SuperBotManConfigurator::class,
    fn ($app) => new \App\Services\MyChat($app),
);
```

If your User model uses a non-standard primary key column, that's already handled — SuperBotMan wraps the user in a `ConversationParticipant` adapter before handing it to the SDK.

Anonymous visitors
------------------

[](#anonymous-visitors)

Two patterns are supported out of the box:

1. **Your app already authenticates every visitor as a real `User` row** (e.g. an "Anonymous User" account that unauthenticated sessions get). Override `agentUser()` to return `Auth::user()` and you're done. SuperBotMan never touches its own anonymous table.
2. **Your app has no anonymous-user concept.** The default configurator will get-or-create a row in `super_botman_anonymous_users` keyed by a session UUID and return that. When the visitor signs in, your app can run a "claim" step to reassign their `agent_conversations.user_id` from the anonymous row to the real user (helper to follow).

The Laravel AI SDK requires `agent_conversations.user_id` to be non-null and reference a real Authenticatable; this design is the workaround.

Multi-channel
-------------

[](#multi-channel)

The package ships only `WebChannel` today. To add Slack / Discord / etc., implement `OrchestrateXR\SuperBotMan\Contracts\Channel`:

```
interface Channel
{
    public function inbound(Request $request): InboundMessage;
    public function outbound(AgentRunResult $result, ClientActionBag $actions, InboundMessage $inbound): Response;
    public function middleware(): array;            // ['web'], ['api', 'slack.signature'], ...
    public function endpoints(): array;             // [['POST', '/']], or multi-endpoint
    public function supportsConversationHistory(): bool;
}
```

Then register an agent with that channel:

```
SuperBotMan::registerAgent('support', \App\Agents\SupportAgent::class)
    ->channel(\App\Channels\SlackChannel::class)
    ->middleware(['slack.signature']);
```

The same agent code runs over either transport.

Configuration
-------------

[](#configuration)

`config/super-botman.php` (after publishing) covers the widget's appearance + the route mount prefix. The agent registry — *which agents exist, what URL they live at, what channel serves them* — is populated by your code calling `SuperBotMan::registerAgent(...)`, not by config.

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

See [CONTRIBUTING](CONTRIBUTING.md).

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Aaron Collegeman](https://github.com/collegeman)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE.md).

About OrchestrateXR
-------------------

[](#about-orchestratexr)

[OrchestrateXR](https://orchestratexr.com) is the easiest way to create and deploy XR content. Use your web browser to create for mobile, tablets, PCs and XR devices.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.9% 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.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~68 days

Total

10

Last Release

61d ago

PHP version history (2 changes)0.0.12PHP ^8.2

0.1.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79271047?v=4)[Aaron Collegeman](/maintainers/aaronaccessvr)[@aaronaccessvr](https://github.com/aaronaccessvr)

---

Top Contributors

[![aaronaccessvr](https://avatars.githubusercontent.com/u/79271047?v=4)](https://github.com/aaronaccessvr "aaronaccessvr (34 commits)")[![collegeman](https://avatars.githubusercontent.com/u/120316?v=4)](https://github.com/collegeman "collegeman (7 commits)")

---

Tags

laravelaiAgentwidgetchatvue

### Embed Badge

![Health badge](/badges/orchestratexr-botman-chat-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/orchestratexr-botman-chat-sdk/health.svg)](https://phpackages.com/packages/orchestratexr-botman-chat-sdk)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M146](/packages/laravel-cashier)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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