examples/web-page-bot/README.md
English | 中文
A single self-contained HTML page that demos the LangBot Page Bot
(web_page_bot) embeddable chat widget — the one you drop onto any website with
a single <script> tag.
Full guide: docs.langbot.app — Page Bot.
| File | What it is |
|---|---|
index.html | Browser demo — open it, point it at a running LangBot instance + a Page Bot you created, and it loads the live embed widget so you can chat with the bot exactly as a site visitor would. Zero deps, no build step. |
页面机器人)
adapter and bind it to a working pipeline. Copy its bot UUID from the
generated embed code.index.html in a browser. Any of these work:
python3 -m http.server 8930 then open
http://localhost:8930/examples/web-page-bot/.http://localhost:5300, or your public address).data-title attribute.The page also renders the exact <script> snippet you'd paste into your own
site (before </body>), and updates it live as you edit the fields.
<script data-title="…" src="<base>/api/v1/embed/<uuid>/widget.js"></script>.widget.js is served by LangBot pre-configured for that bot UUID — title,
bubble icon, language and optional Cloudflare Turnstile protection all come
from the bot's config, no page changes needed.The widget loads
widget.jsfrom your LangBot instance, so the base URL must be reachable from the browser you open this page in. If LangBot runs on a server, use its public address instead oflocalhost.