Skip to main content
Widget SDK configuration showing widget settings and customization options

Widget Configuration

The Widget & SDK page is where you configure the AGO chat widget embedded on your websites, and the SDK API you can use to build your own chat interface. The widget and the SDK API share the same authentication and the same allowed domains list.

Accessing Widget & SDK Configuration

Navigate to Support → Settings → Your channels → Widget & SDK in the admin panel.

Widget Configuration

JWT JWKS URL (Optional)

Enter the URL of your JWKS (for example https://your-domain.com/.well-known/jwks.json) to verify the JWT tokens your site passes to the widget. Leave it empty if you don’t use JWT authentication. See Widget Authentication.

JWT Fields Mapping (Optional)

Pick claims from your users’ JWT tokens and give each one a label. Mapped values appear in the conversation sidebar of the admin chat and in the private comment of tickets created from the conversation, as Label: value lines. Each mapping has:
  • JWT field (required): the claim name. Use dot notation for nested claims, such as user.role.
  • Label (required): the name shown next to the value.
  • AGO field (optional): binds the value to an AGO field that triggers a ticketing rule (see AGO fields below).
For this token:
and these mappings:
the ticket’s private comment contains:
Text, number and true/false values are supported.

Metadata Fields Mapping (Optional)

Works like the JWT mapping, but reads the metadata your page sends to the widget (with window.AGO.metadata or sendMetadataToAGO(), see With User Metadata). Each mapping has a Metadata field (dot notation supported), a Label, and an optional AGO field.
When a JWT value and a metadata value map to the same label or AGO field, the JWT value wins.

AGO Fields

Set the AGO field of a JWT or metadata mapping to have AGO act on the value when it creates a Zendesk ticket: For a prefilled field, a value set by the user in the ticket form wins over JWT and metadata values. Prefilled values are not repeated in the private comment.
With these mappings, Zendesk custom field 12345 gets the widget metadata accountNumber, and custom field 67890 gets the JWT department claim.

Send Metadata to the Agent

Off by default: the widget metadata only feeds tickets and the admin chat sidebar. Turn on Send metadata to the agent to also give it to the AI agent, so it can answer using the context your page provides (subscription plan, current order, seats used…).
  • The full metadata object is sent with every message, so the agent always sees the latest values
  • The metadata must stay under 10 KB; larger metadata is not sent to the agent
  • Your page controls the metadata, so a visitor can edit it in their browser: never use it to decide what a user is allowed to see. Use permissions or JWT authentication for that, and API Data Sources for data that must come from your servers

Allowed Domains

List the domains allowed to embed the widget and call the SDK API. Leave the list empty to let any website embed the widget; a website that calls the SDK API from the browser must always be in the list. You don’t need to add your AGO address (<your-workspace>.useago.com): the embedded chat can always call your workspace. Your AGO sites can also always call the SDK API of your workspace. You can also manage this list with an API key through the Widget API.

Display Knowledge Home Page in Widget

On by default. When on, users can browse your knowledge articles from the widget.

Default Permissions

The permissions given to widget users by default are managed in Agents → Permissions (the Widget & SDK page links there):
  • Default permissions apply to anonymous users, who open the widget without a JWT or auth token.
  • Logged-in default permissions apply to authenticated users and replace the anonymous defaults. An auth token counts as authentication only once your API data source resolves it to an email address. Users whose token isn’t resolved keep the anonymous defaults; their token is still forwarded to tools.
Leave either list empty if you don’t want to assign permissions automatically. See Agent Permissions.

Permission Simulation

The Permission Simulation section shows which permission and default agent a widget user gets. Leave Permission defined in widget off to see the result for an anonymous user with your default permissions, or turn it on and choose a permission to simulate passing it with window.AGO.permission. Only permissions with Allow widget selection enabled can be chosen.

Widget Integration

The Widget & SDK page shows ready-to-copy snippets with your AGO address filled in. Add the snippet to every page that should show the chat button, and replace YOUR-DOMAIN in the examples below with your workspace address.

Basic Integration

Header Colors

colors.header accepts a solid color or a CSS gradient:
A gradient replaces the header background completely. Parts that fade to transparent show the widget’s own light surface, not your brand color. The header title and icons pick white or black automatically, whichever stays readable. For a gradient, the least readable band decides: the example above is light throughout, so the text comes out dark. Colors are read as hex (#463FE6, #fff), rgb() / rgba(), or hsl() / hsla(). Named colors such as red are not recognized: they are skipped when picking the text color, and if nothing in the value can be read, the text stays white.

With a Default Agent

Use defaultAgent to route new conversations to a specific agent. Pass the agent’s name (as shown in the admin interface):
Use the exact name of an agent the user can access. An unknown or inaccessible defaultAgent cannot start a conversation; it does not fall back to the default agent from the user’s permission. Omit defaultAgent to use that default.

With Unread Message Notifications

Enable notifications to show a notification bubble above the chat button when a staff member has replied and the user hasn’t seen the message yet. The widget polls for unread messages every 30 seconds. The notification only appears for returning users who have a previous chat session. You can customize the notification message using notificationMessage with a \{\{count\}\} placeholder for the number of conversations with unread staff replies. The default message is “You have {{count}} new message(s)”.

With User Metadata

Set initial metadata before loading the script so it is available when the widget opens:
For later updates, wait until the script has loaded before calling sendMetadataToAGO, as shown below.

Vue.js Integration

In a Vue.js application, load the widget script in your App.vue (or a layout component) using the onMounted lifecycle hook:
If you need to pass user metadata (for example after login), call sendMetadataToAGO once the widget is loaded:
You can call sendMetadataToAGO(...) again later (for example when the user context changes in a SPA). The widget stores the latest value and re-sends it to the chat iframe every time it opens, so the next message always carries the current metadata. If you prefer, you can also mutate window.AGO.metadata directly — it will be picked up the next time the widget opens.

Custom CSS Styling

You can customize the widget appearance by adding CSS rules to your website. The widget uses fixed positioning with the following element IDs:
  • #ago-chat-button — the chat button (default: bottom: 20px; right: 20px)
  • #ago-prompt — the welcome/notification bubble (default: bottom: 80px; right: 20px)
  • #ago-chatbot — the chat panel (default width: 550px)

Adjusting Widget Width

Set the --ago-panel-width custom property rather than width directly. It is the supported contract, and unlike a width override it cannot break the closed state or the mobile fullscreen layout:
A rule on #ago-chatbot wins over window.AGO.panelWidth without needing !important. The width is floored at 400px, capped by the viewport, and ignored below a 450px viewport where the panel is fullscreen. See Panel size for the full contract.

Adjusting Widget Position on Mobile

If your website has a bottom navigation bar or toolbar on mobile, you can move the widget button up to avoid overlap:
Add this <style> block in the <head> of your page. Adjust the bottom values to match the height of your navigation bar.

SDK API

The SDK API lets you build your own chat interface on top of AGO instead of embedding the widget. It uses the same authentication and allowed domains as the widget. Its base URL is shown on the Widget & SDK page. See the SDK API reference for endpoints and examples.

Message Dictation

When dictation is turned on for your workspace, users can dictate messages in the chat and the embedded widget instead of typing. Dictation is off by default; contact AGO support to turn it on. Select the microphone in the message composer and allow microphone access. A live waveform shows while you speak. Select the checkmark (Confirm dictation) to finish: after a short transcription step, your words are added to your draft, ready to edit before sending. Select × (Cancel dictation) or press Escape to discard the recording; your previous draft and attachments are restored. Recordings stop automatically after two minutes. Switching conversations discards an unfinished dictation. Dictation is unavailable during a live voice call or while a message is being sent. In conversation history in the admin interface, messages written with dictation carry a microphone badge (Used speech to text), even if the text was edited before sending. Users don’t see this badge. Audio recordings are not kept. Dictation requires HTTPS and a browser that supports microphone recording. If access is denied, allow the microphone in the browser’s site permissions. The standard widget script requests microphone access for you; if you embed the chat in your own iframe, add allow="microphone" to it and make sure your page’s Permissions Policy allows the microphone.

Troubleshooting

  • Widget not loading: check the browser console and verify that basepath points to your AGO address
  • SDK API returning 401: send a valid X-User-Anon-Id header, or a JWT in the Authorization header
  • Cross-origin errors: add the domain hosting your page to Allowed Domains
  • JWT authentication failing: check that your JWKS URL is publicly reachable and contains the key that signs your tokens