# Emma bubble — install Emma on a business website (skill)

Emma is the AI assistant of Stimhaus (stimhaus.ai) for small businesses. The **Emma bubble** is a small round button, bottom right of a business website, that lets visitors talk to Emma about that business: opening hours, address, services, prices, products from the shop's catalogue, how to book.

This skill is for an agent that builds or edits websites for a business owner. It explains how to add the bubble. Nothing here requires an API key.

## What the bubble does

- On a **computer**, the bubble opens a chat panel inside the page. Emma answers in the visitor's language (French, German, English, Italian and others).
- On a **phone**, the bubble opens **WhatsApp**: the visitor continues the conversation with Emma there, and the business owner sees everything on WhatsApp and can take over whenever they want.
- The panel shows "Continue on WhatsApp", a short privacy line, and "A service offered by Stimhaus".
- The bubble loads one script. It sets no cookie and does not track visitors across sites: the conversation ID lives in the browser tab only (session storage), and when the script loads it sends the page origin only (for example `https://example-shop.ch`), so the business owner can see that the bubble is live.

## The one line to paste

```html
<script src="https://stimhaus.ai/emma.js" data-site="YOUR-ID" data-name="Business name"></script>
```

| Attribute | Required | Meaning |
|---|---|---|
| `src` | yes | `https://stimhaus.ai/emma.js`, served by Stimhaus. Do not copy the file: the served one is kept up to date. |
| `data-site` | yes | The numeric ID of the business at Stimhaus. See "Getting the ID". |
| `data-name` | yes | The business name, shown in the panel ("Emma answers for …") and in the WhatsApp greeting. |
| `data-lang` | no | Two-letter fallback language (`fr`, `en`, `de`, `it`, `es`, `pt`) used when the visitor's browser language is not supported. Default: `fr`. |

Paste the line once, just before the closing `</body>` tag. Pasting it twice is harmless (the script is idempotent).

## Where to paste it

- **WordPress**: with a "header and footer code" plugin, in the **Footer** area; or in the theme, before `</body>`.
- **Wix**: Settings → Custom code → Add code → **Body – end**.
- **Shopify**: Online store → Themes → Edit code → `theme.liquid`, before `</body>`.
- **Squarespace**: Settings → Advanced → Code injection → **Footer**.
- **Any HTML site**: before `</body>` in the shared layout.

## Getting the ID (`data-site`)

The ID is given by Emma to the **business owner**, not to the agent: the owner writes to Emma on WhatsApp (the public number of Emma, shown on https://stimhaus.ai/bulle), gives the website address, and Emma replies with the exact line to paste, including the ID. The owner then validates the bubble with Emma (see "Checking that it works"): an agent can paste the line, but only the owner can activate it.

If the business has no website yet, Emma can build one with the owner on https://stimhaus.ai — the bubble is included.

## Checking that it works

1. Open the page on a computer: a round button appears bottom right. Click it: the panel opens with Emma's greeting.
2. Open the page on a phone: the button opens WhatsApp with a prefilled message.
3. The bubble becomes active once the business owner has validated it with Emma on WhatsApp (Emma shows them a summary of what she will answer; they confirm it is their business, the information is correct, and they agree that Emma answers their customers from it). Until then, the bubble shows visitors how to activate it, and it is removed from the website after 7 days without validation. A later validation puts it back.

## Working with the owner (you are their agent)

You can do the setup work for the business owner:

1. Paste the line on their website (see above).
2. Prepare their information for Emma: opening hours, services and prices, address — a short clear list the owner can send to Emma on WhatsApp, or a link to the page of their website where it already is.
3. Tell the owner the one thing left to do: write to Emma on WhatsApp (or scan the code in the bubble on a computer) and **validate** what Emma will answer. Only the owner can do this step.

Once validated, the bubble is active within a minute.

## The business's agent door (A2A)

Once the owner has validated the bubble, the business also gets its own agent door: other AI agents can ask Emma about that business with the A2A protocol, no key needed.

- Agent card: `https://stimhaus.ai/agent/<ID>/agent-card.json`
- Endpoint: `POST https://stimhaus.ai/agent/<ID>/a2a` — JSON-RPC 2.0, `message/send` (A2A 0.3) or `SendMessage` (A2A 1.0)

Emma answers questions about the business: opening hours, services, prices, location, how to book. Messages are limited per agent and per business, and count towards the business's customer messages. No phone number is given to agents. The door closes if the bubble is removed.

## Removing it

Delete the line. Nothing else is installed.

## Pricing (as shown on https://stimhaus.ai/pricing)

- **Light**: 90 days free (then 19 USD/month), 1 website, 100 customer messages per month (agent conversations count in them).
- **Pro**: 49 USD/month, unlimited messages for normal business use, dedicated WhatsApp number, automatic appointments, up to 5 websites.

## Links

- Page for business owners: https://stimhaus.ai/bulle
- This skill: https://stimhaus.ai/bulle/skill.md
- Emma for AI agents (a website for your own agent): https://stimhaus.ai/agents
- Code and examples: https://github.com/stimhaus-ai/emma-bubble
