Prostir

Article

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 instructions, knowledge, tools, and a selected model.
  • 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, open Channels, pick Web widget, and keep the channel enabled. No third-party token is needed for the website widget.

  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 creates or updates the Web widget channel. Prostir keeps the allowed origins, design, channel model settings, and conversation routing together.

  7. 07
    Copy the embed script.

    Copy the widget embed script from Prostir. It points at the published agent's typed public surface and may include a channel id when you have more than one widget.

  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.

doc agent instructions What the widget should answer, what it should refuse, and when it should ask for a human.
doc website knowledge Pricing, services, FAQs, docs, policies, booking details, support rules, and source pages.
code embed script The one-line script copied from Prostir, for example <script src="https://your-agent.ai.prostir.build/widget/embed.js" data-prostir-agent="your-agent" 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. widgetEmbedUrl and widgetTestUrl generated. Channel enabled.

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.

Ready to launch?

One afternoon from idea to live link.

Upload what only you have. Write the rules in plain language. Open the link in ChatGPT, Claude, or your site. Ship the agent only you could ship.

Need custom scale, white-label, or dedicated setup? Talk to sales.