ai-assistant / laravel
The AI assistant's widget and answer block for Laravel: a Blade component, a directive and .env config.
Requires
- php: ^8.2
- illuminate/support: ^11.0|^12.0|^13.0
- illuminate/view: ^11.0|^12.0|^13.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-15 17:43:07 UTC
README
The AI assistant's widget and answer block for any Laravel site.
composer require ai-assistant/laravel
.env:
AI_ASSISTANT_AGENT_ID=your-agent-id
AI_ASSISTANT_HOST=https://your-dashboard-host
In your layout, before </body>: @aiAssistantScript. Where the answer
block should go (a product page): <x-ai-answer /> — optional title,
placeholder, layout (answer, card, bar) and context.
Signed-in customers
Put the identity secret from the dashboard (Settings › Widget › Identify
signed-in customers) in .env as AI_ASSISTANT_IDENTITY_SECRET, and add
@aiAssistantUser to the layout right before @aiAssistantScript. It
prints the signed-in user's id signed with the secret, the e-mail address
and the name, so the AI employee recognises the customer on every device.
Nothing is printed for a guest or without the secret. @aiAssistantUser($user)
takes another user or an array with id, email and name.