B Blengi docs

Laravel

Laravel package

On a Laravel site the widget and the answer block come from one Composer package: a Blade directive for the script and a Blade component for the block, configured in .env.

Install

composer require ai-assistant/laravel

Add to .env:

AI_ASSISTANT_AGENT_ID=your-agent-id
AI_ASSISTANT_HOST=https://blengi.com

The agent id is on the AI employee's Website page. Put @aiAssistantScript in your layout, just before </body>: every page then loads the widget.

The answer block

Where the block should go — a product page, for example — add <x-ai-answer />. Optional attributes: title, placeholder, layout (answer, the default, card or bar) and context (see Inline embed). An agency can change the component prefix with AI_ASSISTANT_COMPONENT_PREFIX; the page never shows a brand name.