> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hibonsai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bonsai Concierge

> Self-serve guide for integrating the Bonsai Concierge chat web component into your website

## Getting Started

Before getting started, ensure that you've had a chance to review the [Quickstart prerequisites](/project/docs/quickstart#prerequisites).

The Concierge is a conversational shopping assistant. It adds a floating launcher button to your storefront; opening it slides in a chat panel where shoppers can ask questions in natural language and get answers grounded in your catalog.

<Callout color="#0A5B3B" icon="circle-alert">
  If you want a search box or a full search results page rather than a conversation,<br />use the [Bonsai Search Bar](/project/docs/bonsai-searchbar/integration) or [Bonsai Search](/project/docs/bonsai-search/integration) instead.
</Callout>

## Quick Installation

Use this minimal 2-step setup to render the Concierge on your website.

<Callout color="#0A5B3B" icon="info">
  **Theming is managed in the Bonsai dashboard.** When the component loads, it fetches your tenant's brand colors using your `api-key` and applies them automatically. You can override any value per-embed with CSS custom properties set inline on the element — see [Advanced Styling](/project/docs/bonsai-concierge/styling).
</Callout>

<Steps>
  <Step title="Install the script">
    Add the Concierge `<script>` tag to your HTML page. Place this in the `<head>` section, or before the closing `</body>` tag.

    ```html theme={null}
    <script
      src="https://assets.hibonsai.com/sdk/bonsai-agent-latest.js"
      defer
    ></script>
    ```

    The `-latest` alias always serves the current release. To pin a specific version instead, replace `latest` with the version number — for example `bonsai-agent-0.22.0.js`.
  </Step>

  <Step title="Add the component">
    Add `<bonsai-chat-bubble>` anywhere in the `<body>`. The launcher positions itself as a fixed overlay, so its position in the DOM does not matter.

    Only `api-key` is required.

    ```html theme={null}
    <bonsai-chat-bubble
      api-key="API-KEY"
      label="Ask us anything"
    ></bonsai-chat-bubble>
    ```
  </Step>

  <Step title="Test the Concierge with a question">
    Click the launcher and ask something a shopper would ask. Not working? Check the [Troubleshooting](/project/docs/troubleshooting) guide for common issues.
  </Step>
</Steps>

## Placement on your site

The Concierge is designed to be present on every page, not just a search page. Add the tag once in your theme layout so shoppers can open it from anywhere.

The launcher is fixed to the bottom-right corner by default. If it collides with an existing element — a cookie banner, a live-chat widget, a sticky add-to-cart bar — move it rather than hiding it:

```html theme={null}
<bonsai-chat-bubble
  api-key="API-KEY"
  bubble-bottom="82px"
  bubble-right="20px"
></bonsai-chat-bubble>
```

## Choosing a launcher style

The launcher has three independent settings: its shape (`launcher-variant`), what it shows (`launcher-content`), and which side it anchors to (`launcher-side`).

```html theme={null}
<!-- Rounded pill with a text label — the default -->
<bonsai-chat-bubble api-key="API-KEY" label="Ask us anything"></bonsai-chat-bubble>

<!-- Tab anchored to the right edge, showing an icon and a label -->
<bonsai-chat-bubble
  api-key="API-KEY"
  label="Ask AI"
  launcher-variant="tab"
  launcher-content="text-icon"
  launcher-side="right"
  launcher-icon="sparkles"
></bonsai-chat-bubble>

<!-- Circular icon-only button -->
<bonsai-chat-bubble
  api-key="API-KEY"
  launcher-content="icon"
  launcher-aria-label="Open chat"
></bonsai-chat-bubble>
```

<Callout color="#0A5B3B" icon="info">
  **Set `launcher-icon-url` if you want your own glyph.** On phones 380px and narrower the launcher hides its text label and shows only its icon. Without `launcher-icon-url`, that icon is the built-in Bonsai mark, so your storefront will show our glyph rather than yours at that width. `header-icon-url` is a different attribute — it supplies the logo inside the opened panel and is **not** reused for the launcher. See [Responsive behavior](/project/docs/bonsai-concierge/styling#responsive-behavior).
</Callout>

## Opening the chat from your own UI

To open the Concierge from an existing button, a nav link, or an empty-search-results state, dispatch a `bonsai:open-chat` event on `window`. It reuses the configuration already on your `<bonsai-chat-bubble>` tag, so you do not repeat your API key:

```html theme={null}
<button
  type="button"
  onclick="window.dispatchEvent(new CustomEvent('bonsai:open-chat'))"
>
  Ask our AI
</button>
```

You can seed the conversation with a question by passing it in the event detail:

```html theme={null}
<script>
  window.dispatchEvent(
    new CustomEvent("bonsai:open-chat", {
      detail: { query: "Which unit fits a 400 sq ft room?" },
    })
  );
</script>
```

This requires a `<bonsai-chat-bubble>` on the page — it is what supplies the configuration. See [Events & API](/project/docs/bonsai-concierge/events) for the full surface.

## Next Steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="sliders-horizontal" href="/project/docs/bonsai-concierge/config">
    Full attribute reference and default values for the Concierge component.
  </Card>

  <Card title="Advanced Styling" icon="palette" href="/project/docs/bonsai-concierge/styling">
    CSS variable reference, launcher tokens, and responsive behavior.
  </Card>

  <Card title="Events & API" icon="webhook" href="/project/docs/bonsai-concierge/events">
    The `window.BonsaiAgent` global and the support handoff event.
  </Card>

  <Card title="Troubleshooting" icon="life-buoy" href="/project/docs/troubleshooting">
    Common integration issues and how to resolve them.
  </Card>
</CardGroup>
