# Embedded widget

> Put a chat with your agent on your own site with an iframe. Available for EasyBits-engine agents.

URL: https://www.ghosty.studio/en/docs/channels/embed

One `<iframe>` and your agent answers on your page.

> **Scope.** Today the widget works with **EasyBits-engine** agents (the ones created in *Agents → EasyBits*). Native Studio agents will reach the embed later; in the meantime they integrate through the [API](/en/docs/api/authentication).

## Embed

In the agent's panel copy the **embed token** and paste:

```html
<iframe
  src="https://www.ghosty.studio/embed/YOUR_EMBED_TOKEN"
  style="width:100%;max-width:420px;height:600px;border:0;border-radius:16px"
  allow="clipboard-write"
></iframe>
```

The token **is** the widget's credential: it identifies the agent and limits what it can do (conversation only). If it leaks, regenerate it from the panel.

## What it does

- History stored in the visitor's browser (`localStorage`), no accounts.
- Streaming replies.
- Light/dark theme following the system.

## What it doesn't do (yet)

- No file uploads.
- No visitor identification: if you need to know who is writing, use the [API](/en/docs/api/reference) from your backend.

## Endpoints behind the widget

In case you prefer your own UI:

| Route | What it does |
|---|---|
| `GET /api/embed/lookup?embedToken=…` | Resolves the token's `agentId`. |
| `POST /api/embed/message/:agentId` | Sends a message; responds over SSE. Header `Authorization: <embedToken>`. |
