---
title: Chat pages for websites
description: Put a published agent on a website as a link, a QR code or a chat button, within limits you set.
updated: 2026-11-08
---

> All VIABLE docs, for people and their agents: https://developers.viablelab.org/llms.txt

# Chat pages for websites

A chat page puts a published agent on any website as a link, a QR code and a chat button. Visitors need no account, so it suits a library's help desk.

It always runs the published version. To know who learners are, use a course instead. Librarians can start from **Overview → Open learning on a website**.

::: figure stage-publish

## Turn it on

::: steps
1. **Open the tab.** Publish the agent, open **Connect → Chat page**, and click **Set up chat page**.
2. **Choose the key.** Under **Key & limits**, pick the key it **Runs on**. Every message is a run on this key.
3. **Turn it on.** Set limits and websites (below), then click **Turn on chat page**.
:::

## Share it or add it to a site

**Share** gives the link and QR code. **Add it to a site** asks **Where will people chat?** and gives the steps for each place. On any website, paste the script before `</body>`. Copy yours from the tab:

```html
<script src="https://page.viablelearning.org/embed.js" data-agent="your-agent-slug" async></script>
```

In LibGuides, add a Media / Widget asset to one guide, or use Admin → Look & Feel → Custom JS/CSS for every guide. Canvas removes scripts, so it gets a frame.

Your page can open the chat with a question already asked, for example from its own search box when nothing matches:

```js
window.__viableChat?.['your-agent-slug']?.open({ ask: 'How do I cite a web page?' })
```

The question is sent once the chat has loaded, as if the visitor picked it. This site's docs search does the same with its **Ask the docs assistant** row.

Under **Chat button**, **Open links to your site in the same tab** makes a link to the website the chat is on, such as a page it cites, open there instead of in a new tab. A single-page site can route to it itself, so the chat stays open:

```js
window.addEventListener('viable-chat:navigate', (event) => {
  event.preventDefault()
  router.push(new URL(event.detail.url).pathname)
})
```

**Tell the agent which page the visitor is on** sends, with each message, the address of the page the chat is open on and its title. Anything after `?` or `#` is left out, and the address must be on the site the script is on. The run's context carries them as `page`, so the agent can start from the page the visitor is reading: an Agent or LLM step sees it with **Reference data** on, and an instruction can use `{{context.page.title}}`. When the site moves between its pages without reloading, the chat hears about the change within a second. It is off until you turn it on, since a site's addresses can say something about the visitor, and it is kept with each run's trace, like the rest of the context.

## Limits and allowed sites

- **All visitors, per day**: 10–5,000 messages, default 300. **Daily cap** sets what it may spend a day.
- **Each visitor, per minute**: 1–30, default 8. **Each visitor, per day**: 0 for no limit.
- **Longest message**: 200–4,000 characters.

Daily counts reset at midnight UTC. A school behind one address can send 400 messages a minute, and each visitor keeps their own limit. For 30 learners, 300 a day is ten messages each. **Only these websites** (up to 20) limits where the button and frame appear, not the link.

## Recordings and attachments

- **What it records**: each device is an anonymous visitor with a visitor code (V-…), listed in [Teach → Learners](/dashboard/learners). **Keep recordings** saves spoken messages privately.
- **Voice**: with a Transcribe step, **Visitors can speak** appears. With a Speech step, so does **Play answers aloud**.
- **Photos & files**: up to 4 files of 8 MiB each, when every step that reads the message can read them.

## What it makes public

> [!WARNING]
> Anyone with the link, or on an allowed site, can chat with your agent on your key.

- The profile is public. Replies show their sources, but uploaded files show only their names unless the knowledge base allows opening them.
- The page hides your workflow, but a model can repeat its instructions. Write nothing there you wouldn't show a visitor.
- Visitors can't see each other's conversations. People sharing one computer and browser are one visitor.

**Pause** takes the link and embeds offline. **Turn off chat page** also clears the settings.

## The agent profile

The profile is how the agent presents itself, on its chat page and in courses. In **Connect → Profile → Edit profile**, set the **Greeting**, up to four **Suggested questions** and the **Notice** saying what the AI is. Changes show without publishing.

## Take it to your own server

On **Agents**, open the agent's **⋯** menu, choose **Export…**, then **With its knowledge (.zip)**. No course is needed. Owners and editors can download it.

- **It holds** the published version, its knowledge bases with their files, the text of their website pages as VIABLE last read them, its profile and chat page settings, and the agents it calls.
- **It leaves out** the page's key, conversations, logs and the headers of Fetch URL steps. Anything else it had to leave out is listed in its `notes`. It can be at most 25 MB.
- **It runs** on your own server with the VIABLE Engine, with the same page, limits and allowed sites. You bring the model.

To use it in another project, press **Import** on **Agents** there and choose the file. That makes the agents and knowledge bases, with no course. The profile and chat page aren't made: set them up on the agent.

::: cards
- [Knowledge bases](/docs/build/knowledge): choose whether readers can open cited files.
- [Keys and costs](/docs/project/keys-and-costs): give the page its own key and budget.
:::
