Skip to content

Website Chat Widget

Overview

The chat widget puts one of your agents on any website as a chat bubble in the corner of the page. Visitors chat with the agent directly - they don’t need a Rival account, and they never see your workspace.

The whole integration is one <script> tag. The agent does not need to be published: a private agent can run on your site and stay off the marketplace.

Where to find it

Open the agent, open its Settings drawer, and pick the Integrate tab. Switch the toggle at the top from API (A2A) to Chat widget. It has two tabs:

  • Setup - turn it on, set allowed origins, copy the snippet, choose what visitors can reach.
  • Appearance - name, icon, opening message, colour, position, and theme.

Only an org Owner or Admin can change the chat widget. Other members can see the settings, with the note “Only an organization owner or admin can change the chat widget.”

The Integrate tab is available on adopted agents too.

Setting it up

  1. Turn on the chat widget. Switch it on; the status chip changes from Off to Live.

    Turning the widget on also switches on Integrate over A2A for the agent - the widget runs over that connection.

  2. Add your Allowed Origins. Type your domain (for example acme.com) and click Add. One domain per entry, exact match only - subdomains are separate, so add www.acme.com too if you use it. If you leave out the scheme, https:// is assumed.

  3. Copy your snippet. It looks like this:

    <script src="https://cdn.rival.io/chatbot/embed.js" data-key="rvw_..." data-api="https://cortexone-api.rival.io" async></script>

    The rvw_ key inside it is meant to be public - see Keys and security.

  4. Paste it into your website, just before the closing </body> tag on every page that should show the bubble. The Setup tab has short instructions for WordPress, Webflow, Squarespace, and Shopify.

  5. Choose what visitors can reach (both off by default), then click Save:

    • Use tools - lets the agent call its tools and connected accounts for a visitor.
    • Read knowledge base - lets the agent answer from the selected knowledge base.

Keys and security

The rvw_ key in the snippet is public by design - anyone can read it from your page source. What protects you is the Allowed Origins list: a browser on any site not on the list is refused, so nobody can paste your snippet into their own site and run up your bill.

Allowed Origins stops other websites, not determined attackers - it is not authentication. Keep that in mind when choosing what visitors can reach:

  • Use tools lets a stranger’s question reach the accounts this agent is connected to - your CRM, your mailbox - using your credentials, with nobody reviewing it.
  • Read knowledge base makes anything in the selected base answerable to anyone on the internet. Only turn it on for documents you would publish.

Rotating the key. Click Issue a new key to get a fresh snippet. Your old snippet keeps working for 7 days so you have time to update your site; a banner shows the date it stops.

What visitors can do. Visitors are anonymous. They can send messages and read the agent’s replies - nothing else. They can’t choose the model or reach any other part of Rival.

Pages opened straight from disk (file://) are always refused. Test from a real web server.

Appearance

The Appearance tab has a live preview. Changes apply when you save.

SettingWhat it doesDefault
NameShown in the chat header (up to 60 characters)The agent’s name
IconPNG, JPG, WebP or SVG, up to 2 MBThe agent’s icon
Opening messageThe first thing a visitor reads (up to 300 characters). Leave empty for noneEmpty
Accent colourThe bubble, the visitor’s messages, and the send button#1a73e8
PositionBottom left or Bottom rightBottom right
ThemeMatch visitor (follows their device’s light or dark setting), Light, or DarkMatch visitor

Per-site overrides

To override Appearance on one site only, add these attributes to that site’s <script> tag:

AttributeValues
data-themelight, dark, or auto
data-accentA hex colour, for example #e11d48
data-positionleft or right

Conversations

A conversation lasts as long as the visitor’s browser tab. Closing the tab and coming back starts a new conversation.

Cost and limits

Visitors don’t pay. Answers run on your organization’s account and cost what a normal chat turn costs. Your organization needs a positive Run Balance, or the widget stops answering.

To protect your balance, the widget is rate limited:

  • 500 messages a day per agent, across every site the snippet is on. After that, visitors see “This chat has reached its message limit for today.”
  • Per-visitor and per-key rate limits. A visitor who sends too fast sees “Too many messages right now. Try again in a moment.”

Troubleshooting

What you seeWhy
No bubble appearsThe widget is switched off, or the snippet isn’t on the page. Check the Live chip on the Setup tab
”This website chat key is not enabled for …”The site isn’t in Allowed Origins. Add it exactly as it appears in the browser address bar, including www. if present
”This agent’s organization cannot currently fund requests.”Your Run Balance is empty. Top Up
”This website chat is not available. It may have been switched off.”The widget was switched off, or the key was replaced more than 7 days ago. Copy the current snippet
”This chat has reached its message limit for today.”The 500-message daily limit was reached. It resets the next day

Next steps