Prostir

Practical guide

How to add an AI agent widget to your website

Step-by-step article: how to add an AI agent widget to your website. You create and publish the Prostir agent, open Channels, choose Web widget, add the exact HTTPS allowed origin for your site, style the chat widget, press Save, copy the embed script, paste it into your website, and test the website chatbot from the live page.

01

What you need before you start

  • A published Prostir agent with an explicit channel runtime model, the agent-level Channels switch turned on, and either positive Model Usage Credits for a Prostir-hosted model or a saved BYOK provider key.
  • The exact public site origin where the widget will run, for example https://example.com. Use HTTPS, include the right subdomain, and do not paste a path like /pricing.
  • Access to your website builder, CMS, tag manager, or HTML template where you can paste a small script before </body> or into a site-wide custom-code field.
02

How to add the AI agent widget

The pattern is simple: publish the agent, create the Web widget channel, Save, copy the script, paste it into the site, then test from the allowed origin.

  1. 01
    Create the AI agent in Prostir.

    Write what the website agent should do, add the pages, FAQs, docs, pricing notes, support rules, and tools it can use. Choose the model before exposing it to visitors.

  2. 02
    Publish the agent.

    The website widget uses the published agent runtime. If the agent is still draft-only, the embed script cannot serve a reliable public website chatbot.

  3. 03
    Open Channels and choose Web widget.

    In the agent, turn on the agent-level Channels switch and choose Web widget. No third-party token is needed, but the channel stays disabled until its runtime checks pass.

  4. 04
    Add allowed origins.

    Add each exact HTTPS origin where the widget may run, such as https://example.com and https://www.example.com. Prostir blocks unlisted external origins so another site cannot reuse your widget script.

  5. 05
    Design the chat widget.

    Set position, width, height, colors, greeting text, intro text, input placeholder, launcher label, and quick actions. Keep the first suggested actions close to what visitors actually ask: pricing, booking, support, order status, or product fit.

  6. 06
    Press Save.

    Save stores the Web widget settings and enables the channel only when publication, the explicit runtime model, the agent-level Channels switch, allowed origins, configuration, and hosted-credit or BYOK checks pass. Otherwise it stays disabled with a visible error.

  7. 07
    Copy the embed script.

    Copy the returned widgetEmbedUrl. It always uses the published slug and exact channel id: https://{slug}.ai.prostir.build/widget/embed.js?channelId={id}.

  8. 08
    Paste the script on your website.

    For a hand-coded site, paste it before </body>. In Webflow, WordPress, Shopify, Wix, Squarespace, Framer, or another builder, use the site-wide custom code, embed code, or custom HTML area.

  9. 09
    Test from the live site.

    Open the actual allowed domain, not a random preview URL. Ask a real question, check the answer, and confirm the conversation appears in Channels.

03

What to prepare before Save

A good website AI agent needs more than a launcher bubble.

docagent instructionsWhat the widget should answer, what it should refuse, and when it should ask for a human.
docwebsite knowledgePricing, services, FAQs, docs, policies, booking details, support rules, and source pages.
codeembed scriptThe one-line script copied from Prostir: <script src="https://{slug}.ai.prostir.build/widget/embed.js?channelId={id}" async></script>.
04

Final Prostir step: Web widget, Save, script

Channels, Web widget, allowed origins, Save.

Prostir Studio

I published my support agent and want it on my website as an AI chatbot widget.

Open the agent in Prostir, go to Channels, choose Web widget, and add the exact HTTPS origin for your site.

The widget should appear bottom-right and start with pricing, booking, and support questions.

Set position, launcher label, greeting text, quick actions, and colors. Press Save, then copy the embed script.

Prostir

Web widget saved. Channel enabled only after every runtime check passed; otherwise it remains disabled with a visible error.

Live

Website chatbot connected · embed script copied · conversations visible in Channels

05

Test the widget on the website

  • Use the real domain listed in allowed origins. If you test from a different preview origin, the widget can fail closed by design.
  • Ask the same questions a lead would ask: price, availability, next step, fit, support, refund, or implementation time.
  • If the answer is weak, update the agent instructions or knowledge in Prostir, publish again, and the embedded widget picks up the improved agent without rebuilding your website.

What gets published

By the end, your site loads a Prostir AI agent through the widget embed script. Visitors open the chat widget, ask questions, and the same published agent answers from its instructions, knowledge, tools, model, and channel settings.

Solutions

AI sales chatbot for website visitors who need the next step

Embed one published Agent, pass bounded page context safely, stream useful answers, and pause for approval when a configured tool requires a human decision.

Solutions

Turn unanswered website questions into a clear path

Send the pages, common buyer questions, and desired next step. We will help scope the Agent, knowledge, widget, and safe action boundary.