Skip to article
NEXUSDocs
Documentation/Deployment
Operator reference

Website Widget

Deploy the Nexus chat widget on your website

Before you begin

This reference describes the underlying platform. Use a Nexus school release with its school membership, class policy, and cost controls. Installing a base engine alone does not add those controls.

The Nexus Website Widget allows you to embed AI-powered chat directly on any website.

Features include:

  • Lightweight ~100-150kb gzipped bundle

  • Fully customizable colors and branding

  • Responsive design (desktop popup, mobile fullscreen)

  • Real-time streaming responses via SSE

  • Session persistence across page reloads

Deployment Options#

A hosted Nexus widget distribution has not been confirmed. The code below is a deployment reference for operators who build and configure a widget. Do not paste an administrator API key into a public website.

<!-- Load the widget -->
<script type="module" src="https://cdn.onyx.app/widget/1.1/dist/onyx-widget.js"></script>

<!-- Configure and display -->
<onyx-chat-widget
backend-url="https://school.narb.cc/api"
api-key="your_api_key_here"
mode="launcher"
> </onyx-chat-widget>

Self-Hosted Deployment#

For self-hosted Nexus instances, you'll need to build and host the widget yourself.

Clone the repository#

Clone the Nexus repository from GitHub.

  cd widget/

Install dependencies#

  npm install

Obtain a widget API key#

Navigate to your Onyx admin panel and create a new API key specifically for the widget.

Create a limited-scope API key with only chat permissions. Never use admin or full-access keys since the API key will be visible in client-side code.

Configure environment (optional)#

For builds with baked-in configuration, create a .env file:

  cp .env.example .env

Edit .env and set your backend URL and API key:

  VITE_WIDGET_BACKEND_URL=https://your-backend.com
  VITE_WIDGET_API_KEY=your_api_key

Build the widget#

For cloud-style deployment (config via HTML attributes):

  npm run build:cloud

For self-hosted deployment (config baked into bundle):

  npm run build:self-hosted

Deploy the bundle#

Upload dist/onyx-widget.js to your CDN or web server.

Customer Embed Code#

After deployment, provide customers with the embed code:

Cloud-style (attributes required):

<script type="module" src="https://your-cdn.com/onyx-widget.js"></script>
<onyx-chat-widget
backend-url="https://your-backend.com"
api-key="customer_api_key"
agent-name="Support"
logo="https://path-to-your-logo.com/"
> </onyx-chat-widget>

Self-hosted (config baked in):

<script type="module" src="https://your-cdn.com/onyx-widget.js"></script>
<onyx-chat-widget
agent-name="Support"
logo="https://path-to-your-logo.com/"
> </onyx-chat-widget>

Configuration Reference#

Required Attributes#

AttributeTypeDescription
backend-urlstringYour Onyx backend API URL
api-keystringAPI key for authentication

backend-url#

The URL of your Onyx backend API. This is where the widget sends chat requests.

  • Onyx Cloud: Use https://school.narb.cc or your tenant-specific URL

  • Self-hosted: Use your Onyx instance URL (e.g., https://onyx.yourcompany.com)

<!-- a managed deployment -->
<onyx-chat-widget backend-url="https://school.narb.cc/api" ...></onyx-chat-widget>

<!-- Self-hosted -->
<onyx-chat-widget backend-url="https://onyx.yourcompany.com" ...></onyx-chat-widget>

api-key#

A valid Onyx API key for authenticating widget requests. This key is visible in client-side code, so always use a limited-scope key.

<onyx-chat-widget
backend-url="https://school.narb.cc/api"
api-key="on_abc123xyz789"
...
></onyx-chat-widget>

For self-hosted builds with baked-in config, backend-url and api-key can be set via environment variables during build instead of HTML attributes.

Optional Attributes#

AttributeTypeDefaultDescription
agent-idnumberundefinedSpecific agent/persona to use
agent-namestring"Assistant"Display name in header
logostringOnyx logoURL to custom logo image
primary-colorstring#1c1c1cPrimary brand color (buttons, accents)
background-colorstring#e9e9e9Widget background color
text-colorstring#000000bfText color (75% opacity black)
modestring"launcher"Display mode: "launcher" or "inline"
include-citationsbooleanfalseShow citation badges linking to source documents

include-citations#

When enabled, assistant messages display clickable citation badges below the response text. Each badge shows a sequential number and the source document title, linking directly to the original document.

<onyx-chat-widget
backend-url="https://school.narb.cc/api"
api-key="on_abc123"
include-citations="true"
> </onyx-chat-widget>

Be mindful of document access when enabling citations. The widget will cite any documents accessible to the configured agent or API key. If the agent has access to private or internal documents, citation links may point to resources that end users do not have permission to view.

To avoid exposing private document links, either scope the agent's document access to only public-facing sources, or disable citations for public-facing widget deployments.

API Key Security#

The widget's API key is exposed in client-side code. Always create a dedicated API key with:

  • Limited permissions - Only chat access, no admin features

  • Rate limiting - Prevent abuse from malicious actors

  • Monitoring - Track usage and detect anomalies

Create a widget-specific API key#

In your Nexus admin panel, create a new API key with minimal permissions.

Enable rate limiting#

Configure rate limits appropriate for your expected usage.

Monitor usage#

Regularly review API key usage for unusual patterns.

Browser Support#

  • Chrome/Edge 90+ (Chromium)

  • Firefox 90+

  • Safari 15+

  • Mobile Safari (iOS 15+)

  • Mobile Chrome (Android)

Need help with setup? Contact your Nexus administrator for API key configuration or deployment assistance.

NEXUS

Nexus helps students think, practice, and learn, with teachers guiding AI use.

[ Support ]

[ NARB TECHNOLOGY INC. ]

Nexus is a school AI platform by narb Technology Inc. · 16192 Coastal Hwy, Lewes, DE 19958

© 2026 narb Technology Inc.

Nexus

Nexus helps schools make room for questions, practice, and reflection — with teacher guidance in view.

[ Contact us through e-mail ]

© 2026 narb Technology Inc.

NEXUS

Nexus helps students think, practice, and learn, with teachers guiding AI use.

[ Support ]

[ NARB TECHNOLOGY INC. ]

Nexus is a school AI platform by narb Technology Inc.

© 2026 narb Technology Inc.