> 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/getting-started/how-it-works.md).

# How it works

## How it works

Replai follows a simple flow.

Connect content. Shape the assistant. Embed the widget. Then let the assistant answer, act, or hand off.

### How does Replai work end to end?

{% stepper %}
{% step %}

### Connect content

Add a source at the workspace level.

Replai supports **GitBook**, **Website crawler**, and **Q\&A snippets** today.

Sources are shared.

You connect a source once, then attach it to any assistant.
{% endstep %}

{% step %}

### Shape the assistant

Choose the assistant tier.

Pick the sources that assistant should use.

Then set the name, greeting, tone, and allowed domains.
{% endstep %}

{% step %}

### Embed the widget

Enable the widget on the assistant.

Then install the async script tag on your site or app.

The assistant must stay active before the widget can answer.
{% endstep %}

{% step %}

### Let Replai respond

Replai searches connected content first.

Then Replai answers with citations, runs approved actions on supported tiers, or hands the conversation to a human on **Live**.
{% endstep %}
{% endstepper %}

### What changes by tier?

All tiers answer from connected content.

Higher tiers add more capability.

| Tier       | What it adds                                      |
| ---------- | ------------------------------------------------- |
| **Answer** | Grounded answers with citations                   |
| **Agent**  | Custom HTTP actions, MCP servers, and white-label |
| **Live**   | Human handoff, queueing, presence, and seats      |

{% hint style="info" %}
White-label is available on **Agent** and **Live**.
{% endhint %}

### What does the visitor see?

The visitor sees one widget.

That widget can show suggested questions, citation chips, feedback, lead capture, action approvals, or live chat.

The exact experience depends on the assistant tier and settings.

### Related links

* [What is Replai?](/replai-docs/getting-started/what-is-replai.md)
* [5-minute setup](/replai-docs/getting-started/5-minute-setup.md)
* [Sources overview](/replai-docs/connectors-sources/sources-overview.md)
* [Plans comparison](/replai-docs/features-by-tier/plans-comparison.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/getting-started/how-it-works.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.
