Looking to hire Laravel developers? Try LaraJobs

laravel maintained by ai-assistant

Description
The AI assistant's widget and answer block for Laravel: a Blade component, a directive and .env config.
Last update
2026/11/15 00:35 (dev-main)
License
Links
Downloads
0

Comments
comments powered by Disqus

ai-assistant/laravel

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.