Skip to content
Stand with Ukraine flag

AI Widget Summary

AI Widget Summary turns live ThingsBoard telemetry into an instant, human-readable analysis. A button in the widget header collects the telemetry and attributes you specify, fills a chosen prompt, and sends the request to the connected LLM. The response appears directly in the widget — a status digest, anomaly explanation, recommended next steps, or any other insight the prompt defines.

There are two ways to use AI summaries:

  • ThingsBoard widgets — add a summary button to any existing widget via a custom action (v3.9+)
  • Trendz widgets — the button is built in; enable it and optionally pick a prompt

Step 1: Upload the Trendz AI Summary Module

Section titled “Step 1: Upload the Trendz AI Summary Module”
  1. Open the Settings page in the Trendz app.

  2. Click Upload Module.

  3. Confirm that the module appears in the list after upload.

  1. Open the dashboard containing your widget and switch to Edit mode.

  2. Click Edit Widget on the widget you want to add the summary action to.

  3. Go to the Actions tab and click Add action.

  4. Configure the action:

    FieldValue
    Action sourceWidget header button
    NameAny (e.g. AI Summary)
    Button iconAny (default: )
    ActionCustom action
Section titled “Step 3: Link the JS Module and Add the Call”
  1. In the custom action editor, click ModulesAdd module.

  2. Set:

    • Alias: trendz
    • JS module resource: Trendz AI Summary Module (name may differ in whitelabeled versions)
  3. Click Apply.

  4. In the custom action code field, add:

    trendz.getAnalytics(widgetContext, true);
  5. Click Add, then Apply, then Save.

The getAnalytics() call accepts an optional third argument to control which prompt is used:

ModeCallDescription
Default prompttrendz.getAnalytics(widgetContext, true)Uses the Trendz system default prompt
Inline prompttrendz.getAnalytics(widgetContext, false, 'Your custom instruction here.')Sends a plain-text prompt you write inline
Saved prompt by IDtrendz.getAnalytics(widgetContext, false, 'ef348780-a034-4ea9-9225-8b6ad112c451')References a prompt saved in Trendz by its ID

AI summary is built into all Trendz widget types. Click the AI summary button in the upper corner of a widget to generate and display a summary above the visualization. The summary reflects the time range currently applied to the widget. The result is plain text and can be copied directly from the widget.

For views created before Trendz 1.13.1, the AI summary button is hidden by default on dashboards. To show or hide it:

  1. Open the desired view and go to View Settings.

  2. Navigate to the View Mode Fields section.

  3. Enable or disable the AI Summary toggle.

  4. Save the changes.

By default, the system prompt is used. To choose a different prompt for a specific view:

  1. Open the desired view and go to View Settings.

  2. Navigate to the AI Assistant section.

  3. Choose a prompt from the dropdown.

  4. Save the changes.

To create your own prompts, see AI Prompts.