> For the complete documentation index, see [llms.txt](https://replai-1.gitbook.io/replai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://replai-1.gitbook.io/replai-docs/features-by-tier/the-widget.md).

# The widget

## The widget

The widget is the fastest way to ship Replai.

Replai gives you one async script tag to paste into your site or app.

### What should you enable first?

Enable the widget on the assistant first.

Then make sure the assistant is active and scoped to the right domains.

If you leave allowed domains blank, the widget can run anywhere.

Replai warns before you do this.

### What does the widget include for visitors?

The widget can show:

* Up to 4 suggested questions
* Citation chips
* Thumbs feedback
* Optional end-of-chat star review
* Lead capture
* Action confirmation on supported tiers
* Queue position and live presence on **Live**

### What can you brand?

Use assistant settings to control:

* Display name
* Welcome message
* Accent color
* Launcher side
* Suggested questions

Hide branding is available on **Agent** and **Live**.

### What does the widget not expose?

The widget does not expose:

* A proactive auto-open toggle
* Custom CSS
* Theme switching
* Avatar or logo upload

{% hint style="info" %}
Conversation state stays in the browser.

The chat persists across reloads until the visitor starts a new conversation.
{% endhint %}

### How do browser controls work?

Use these methods when you want to control the launcher from your page:

{% code title="Browser controls" %}

```javascript
window.Replai.open()
window.Replai.close()
```

{% endcode %}

### Related links

* [5-minute setup](/replai-docs/getting-started/5-minute-setup.md)
* [Plans comparison](/replai-docs/features-by-tier/plans-comparison.md)
* [Handoff & lead capture](/replai-docs/answers-and-grounding/handoff-and-lead-capture.md)
* [Assistant settings](/replai-docs/getting-started/assistant-settings.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://replai-1.gitbook.io/replai-docs/features-by-tier/the-widget.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
