Skip to main content
Animated sequence: opening the AI Assistant from the dock, typing a prompt, and the assistant responding and applying changes in Coreflux HUB

Ask the AI Assistant to build something — it opens, drafts, and deploys in the same panel

Your Broker, Now With a Teammate

The AI Assistant lives inside the same Coreflux MQTT broker that already carries your sensor, PLC, and cloud traffic. You describe what you want in everyday language—ask for insights from the data already flowing through your broker, build Dashboards with live widgets and KPIs, or develop LoT (Language of Things) Actions that run on the broker—and the assistant uses the broker’s own tools to answer, draft, refine, and deploy. It is not a separate chat app pasted on top; it works with your live system.
Like a colleague who already sits at your control desk — they can read the same screens you see, suggest the next step, and (when you allow it) wire up the change for you.

When to Use the AI Assistant

  • Ship integrations faster — Describe connections or logic you need; the assistant drafts and deploys Connectors, Actions, and panels where your permissions allow.
  • Explore without guesswork — Ask what topics exist, which Connectors are healthy, or how a KPI is calculated before you change anything.
  • Hand off safely — Use read-only mode for operators or auditors who should see answers but not apply changes.
The picker beside the composer has two kinds of target: A broker agent is a LoT agent with WITH HUB_VISIBLE "true" and an interaction topic. The HUB does not list a legacy TYPE AGENT connector as a target.

Run Models On-Premise or in the Cloud

Where inference runs is an architecture and compliance choice. The AI Assistant supports edge (on-premise) models and cloud providers so you can keep prompts and payloads on your network when you need to, or use hosted APIs when policy allows.
AI Setup provider list grouped into Cloud (OpenAI selected, Anthropic) and Local/Private (Ollama with NO API KEY tag)

Provider picker in the AI Setup wizard — cloud providers (OpenAI, Anthropic, OpenAI-compatible) and a local/private option (Ollama)

  • On-premise (edge) — Run models on hardware you control, for example Ollama on the same host or LAN as the broker, so data does not leave your site.
  • Cloud providers — Connect to hosted models such as OpenAI or Anthropic, or any OpenAI-compatible endpoint, when your organization allows traffic to leave the network.
Local AI prerequisite: Install Ollama and have it running on the broker host (or a machine your broker can reach) before you pick Local / Private in the setup wizard. Pull your model in Ollama first (e.g. ollama pull llama3.2) — the name you enter in step 2 must match a model already available in Ollama. The model must support tool calling (function calling); the Assistant relies on tools to act on your broker, so models without tool-calling support will not work. Check the model’s capabilities on the Ollama model library before pulling it. Coreflux connects to your Ollama endpoint; it does not install Ollama or download models for you. Lightweight models may work for a quick test, but often are not capable enough for reliable agent work or good answer quality.If the broker runs in Docker, localhost inside the container is not the host. With Docker Compose, point at the Ollama service (e.g. http://ollama:11434). If Ollama runs on the host, use http://host.docker.internal:11434 (Docker Desktop) or the host’s LAN IP. On the broker path the wizard writes that URL onto a TYPE LLM connector. See Picking a provider.

Ollama requirements

Ollama is supported with requirements: the model must call tools, and its context must hold the HUB assistant’s prompt.
HUB 2.12 sets Ollama’s context (num_ctx) for each run, so the Ollama setting no longer matters. It uses at least HUB_OLLAMA_MIN_CTX (default 16384) and up to HUB_OLLAMA_MAX_CTX (default 32768), never above the model’s own maximum. A prompt too large for the model ends the run with a clear error instead of being truncated. On low-memory or CPU-only hosts, lower HUB_OLLAMA_MAX_CTX.The same release ends a run when the model sends nothing for HUB_AGENT_FIRST_OUTPUT_TIMEOUT_MS, or goes silent mid-answer for HUB_AGENT_IDLE_TIMEOUT_MS. Both default to 120000 (120 s), and time spent inside broker tools doesn’t count. Raise them on slow hardware, where the first answer can take minutes. These are HUB server environment variables.
On a HUB older than 2.12, raise Ollama’s Settings > Context length yourself. The prompt is about 4.5k tokens in Insight mode and 9k to 15k tokens in Agent mode, and those versions silently cut the start of it when the context is too small. 16k is the minimum; 128k is a safe choice.
The same Assistant panel and modes work whether you point at an edge endpoint or a cloud API—you are not choosing a different product, only where the model runs.

Set up the AI Assistant

The first time you open the AI Assistant, a short wizard asks whether it should run in the HUB or on the broker, then walks through provider, model, and API key. When the broker path is not signed in as a local broker user, it also asks which broker user the agent’s DEFAULT_USER should be. You only do this once per broker; after that, clicking the Coreflux icon opens the assistant directly.
The screenshots below were taken on the previous wizard, which installed an agent connector and said “Install the Agent route”. The current wizard starts with In the HUB (the default) or On the broker. The provider, model, and key steps are unchanged.
1

Open the AI Setup wizard

Click the Coreflux icon in the bottom dock. On a fresh broker, the AI Setup wizard slides in on the right and asks you to pick where the model will run—a Cloud provider (OpenAI, Anthropic, or an OpenAI-compatible endpoint) or Local / Private (Ollama). Pick one and click Continue.
Coreflux HUB with the AI Setup wizard open on the right, titled Set up AI Assistant with the note Install the Agent route on your broker to enable the AI assistant, a step indicator, Cloud providers OpenAI (selected) and Anthropic, Local / Private Ollama tagged No API key, and a Continue buttonCoreflux HUB with the AI Setup wizard open on the right, titled Set up AI Assistant with the note Install the Agent route on your broker to enable the AI assistant, a step indicator, Cloud providers OpenAI (selected) and Anthropic, Local / Private Ollama tagged No API key, and a Continue button

AI Setup wizard, step 1: pick a cloud provider (OpenAI, Anthropic, OpenAI-compatible) or a local Ollama model, then Continue

2

Pick a model

Choose a model from the suggested list, or type the exact model name your provider supports (for example gpt-5.4-mini) into the custom field. Click Continue when you are ready.
AI Setup wizard model step listing suggested models such as gpt-5.5, gpt-5.4-mini, and a custom model field with gpt-5.4-mini typed in

AI Setup wizard step 2 — choose a suggested model or type a custom one

3

Add your API key

Paste the API key from your chosen provider. The key is stored as an encrypted secret on the broker and is never sent back to your browser. The wizard also shows a quick summary of what it is about to install so you know what to expect.
If you picked Ollama in the earlier step, the wizard skips this screen entirely—your local Ollama endpoint does not need a key.
AI Setup wizard API key step with an OpenAI API key input, a note that the key is stored as an encrypted secret on the broker, and an install summary card

AI Setup wizard step 3 — paste your provider API key; the broker stores it as an encrypted secret

Sign in to the provider you picked in the previous step and follow their docs to create a key:If you picked Ollama, no key is required—the broker talks to your local Ollama endpoint directly.
4

Install and you're ready

Finish the wizard. In the HUB stores the provider and an MCP token for this connection, then the assistant calls the broker as that token’s user. On the broker deploys a TYPE LLM connector named BrokerAgentLlm and a DEFINE AGENT named BrokerAgent on the interaction topic hub/assistant, visible in the picker. A key you paste is stored with -setSecret and referenced from the connector. Ollama needs no key. An OpenAI-compatible endpoint gets a key only when you supply one, and the connector is pinned to Chat Completions.
AI Setup wizard showing a Setting up AI Assistant progress indicator with Setting API key secret status

AI Setup finishing — the broker provisions the assistant in the background

Once the wizard closes, the AI Assistant is live on this broker. From now on, clicking the Coreflux icon opens the assistant directly—no more setup.
On the broker, the wizard also adds subscribe rules so your user can read $SYS/Coreflux/Agents/# and the hub/assistant/# replies. DEFAULT_USER is your local MQTT login. A Coreflux account session is not a broker user — the wizard asks for a Broker user and will not install until you choose one. A tool call succeeds only when both you and that user are allowed to make it. The installed agent is granted read_mqtt, read_lot, write_mqtt, and create_lot for actions, models, connectors, and panels. Writing grants are deployed with WITH LEVEL "write". Re-running setup sends -addConnector and -addAgent again. Both update in place, so the agent keeps its conversations. The broker refuses to remove an LLM connector an agent still uses. Agents are their own LoT entity. Connectors Manager lists BrokerAgentLlm and leaves BrokerAgent out. The LoT Editor deploys an agent cell with -addAgent and removes it with -removeAgent.

Manage broker agents

The Agents app on the dock lists every DEFINE AGENT on the broker as a card, next to an Activity tab. Each card has Configure, Disable / Enable, Open in LoT Editor, Show activity, and Remove. A card with no status shows offline. DEFINE AGENT is a preview feature in broker 2.22.

Disable an agent

The power icon on a card redeploys the agent with DISABLE true, or without it. A disabled agent stays defined but takes no tasks. Its card is dimmed, with a Disabled pill and a grey status dot. On a broker without DISABLE support, the HUB changes nothing and says so. In a cluster, the change applies on the node you’re connected to.
Coreflux HUB Agents window, Agents tab, 2 agents: the FlightsTrackerAgent card is dimmed with a Disabled pill and a grey status dot and shows LocalOllama and read_mqtt (1 topic); the GateOpsAgent card has a green status dot and shows LocalOllama, ollama, llama3.2 and read_mqtt (1 topic), write_mqtt (1 topic). Each card has Configure, power, LoT, activity, and remove iconsCoreflux HUB Agents window, Agents tab, 2 agents: the FlightsTrackerAgent card is dimmed with a Disabled pill and a grey status dot and shows LocalOllama and read_mqtt (1 topic); the GateOpsAgent card has a green status dot and shows LocalOllama, ollama, llama3.2 and read_mqtt (1 topic), write_mqtt (1 topic). Each card has Configure, power, LoT, activity, and remove icons

Agents app with FlightsTrackerAgent disabled and GateOpsAgent running

Configure an agent

Configure and Add agent open a form with three tabs:
Coreflux HUB Configure GateOpsAgent dialog with Configuration, Tools 2, and LoT tabs; the Agent section shows Name GateOpsAgent, LLM connector LocalOllama, Description Suggests gate changes when departures run late, Default user flights-ops, and the Enabled switch on, with Cancel and SaveCoreflux HUB Configure GateOpsAgent dialog with Configuration, Tools 2, and LoT tabs; the Agent section shows Name GateOpsAgent, LLM connector LocalOllama, Description Suggests gate changes when departures run late, Default user flights-ops, and the Enabled switch on, with Cancel and Save

Configure GateOpsAgent: the Configuration tab

The LoT stays the source of truth. The form rewrites only the clauses you change and keeps everything else as written, including comments, GET SECRET and GET ENV values, and clauses the form has no field for, which it lists under Kept as written. Save deploys with -addAgent. Running tasks and session memory are kept unless you rename the agent. See Agent syntax.

Coming from a TYPE AGENT assistant

A TYPE AGENT connector from an earlier release is skipped when the broker loads, and the HUB does not list it, install it, or migrate it. There is no in-panel update that rewrites it. Rewrite it as a TYPE LLM connector plus DEFINE AGENT, using the table in Coming from TYPE AGENT, or run the wizard again and let it install BrokerAgentLlm and BrokerAgent. Your previous provider, model, and key are not copied for you.
The setup wizard is how you install the assistant. It is not a settings screen for an assistant that is already there. Once the HUB target is configured, the menu offers Change Hub provider…, which updates the provider, key, and model and keeps the same MCP token.

Open the AI Assistant

Use the Coreflux icon in the bottom app dock—the first icon on the left. You can peek at the assistant without opening the full side panel, then click when you want the full workspace.
1

Hover to preview

Hover the Coreflux icon. A compact Coreflux AI bubble appears above the dock with an Ask anything… field and Insight / Agent mode pills so you can send a quick prompt or pick a mode before you commit to the full panel.
Coreflux HUB dock with the Coreflux icon highlighted and a compact Coreflux AI popover showing Ask anything placeholder and Insight and Agent toggles

Hover the dock Coreflux icon to open the compact Coreflux AI bubble with Ask anything and mode pills

2

Click to open the full panel

Click the Coreflux icon to pin the AI Assistant on the right. You get suggested prompts (for example Create a dashboard or Calculate a new KPI), a Sources area for dragging in panels such as the LoT Editor, and the full conversation thread with edit and close controls in the header.
Coreflux HUB with the full AI Assistant panel open showing suggested actions, Sources with LoT Editor, and Ask me anything input

Full AI Assistant panel — suggested prompts, Sources, and the main chat input

Agent vs Insight mode

Pick the mode that matches how much change you want the assistant to make. You can switch at the bottom of the panel at any time. The mode pills sit below the main input so you always know which behavior you have selected before you send a message.

What you can do

These are typical starting points—phrase them in your own words; the assistant will ask follow-ups if something is missing.

Build a dashboard

Ask for live gauges, KPI tiles, or layouts bound to your MQTT topics; the assistant drafts and wires widgets you can refine in the panel. See Build Your First Dashboard.

Develop an Action in LoT

Describe triggers, conditions, and outputs in plain language; the assistant proposes LoT you review and deploy without leaving the conversation.

Calculate a new KPI

Describe the metric or inputs you care about; the assistant drafts logic, confirms details with you, and deploys an Action in Agent mode.

Explain your broker state

Ask what Connectors or topics exist, why something errored, or how signals relate—natural in Insight mode when you want answers before any changes.

Example: Build a KPI with Agent mode

Below is one real flow: you ask for a KPI, the assistant requests the missing pieces, then deploys an Action and offers a shortcut to the LoT Editor. Stay in Agent mode for this path.
1

Ask

Type a goal such as Calculate a new KPI. The assistant loads context and may offer quick actions that match what you said.
AI Assistant showing Agent mode selected and suggested prompts including Calculate a new KPI

AI Assistant in Agent mode with suggested prompts including Calculate a new KPI

2

Clarify

When the assistant needs a formula, source topic, or rule, it pauses and asks you directly—you reply in the thread instead of guessing what to type up front.
AI Assistant conversation where the assistant asks the user to provide KPI formula or source data with a Type your answer field

Assistant asking for KPI formula or source data before continuing

3

Deploy

After you supply enough detail, the assistant can draft LoT, deploy an Action, and show a status card. Use Open in LoT Editor when you want to inspect or tweak the definition yourself.
AI Assistant showing deployed CalculateKPI Action with Running status and Open in LoT Editor link

Deployed Action with Running status and Open in LoT Editor link

When you see Running (or equivalent success state) on the deployment card, the new Action is live on the broker—confirm in the LoT Editor if you want to read the exact definition.

Example: Explore safely with Insight mode

Switch to Insight before you send if you only want answers—not changes. You can still get structured output such as tables and follow-up suggestions.
AI Assistant in Insight mode responding to 'Please create a list of connectors I have on broker' with a table showing Name, Type, Status, Description, and Events columns for Terminal, BrokerAgent, and MyS7Route

Insight mode — list of Connectors returned as a table after a natural-language question

Try questions like Create me a list of Connectors or Which Connectors are in a warning state? The assistant reads broker state and renders the response in the panel without using write tools.

Built-in safeguards

  • The HUB target runs as the MCP token’s user — Every call passes the broker’s own permission check. Writes pause until you approve them. A request that names no mode is treated as Insight.
  • A broker agent runs as the person who asked, capped by DEFAULT_USER — Both must be allowed. A refusal names the user who lacked the right.
  • Insight mode is read-only — No deploy, publish, or execute path while Insight is selected.
  • Stop at any time — Long runs can be cancelled from the UI so you are never stuck waiting on a runaway answer.
  • Same deployment path as humans — Anything the assistant deploys still goes through the broker’s normal validation and permission checks.
  • A shared web HUB does not call arbitrary hosts: see Allowed hosts in a browser HUB.

Allowed hosts in a browser HUB

The HUB assistant connects from the HUB server to the broker’s MCP endpoint and, for Ollama or an OpenAI-compatible provider, to the model’s base URL. On a browser or Docker HUB that other people can reach, the assistant stays off until both of these are true:
  1. Coreflux sign-in is configured on the HUB server, and the user is signed in.
  2. HUB_AGENT_ALLOWED_HOSTS lists the hosts the assistant may reach.
  • Unset or empty: the assistant is off and reports HUB_AGENT_ALLOWED_HOSTS names no broker it may reach.
  • Sign-in not configured: the assistant is off and tells you to use a broker agent or the desktop app.
  • Not signed in: Sign in with your Coreflux account to use the Hub assistant.
  • Host not listed: This Hub may not reach <host>. Add it to HUB_AGENT_ALLOWED_HOSTS.
OpenAI and Anthropic use their fixed API addresses and need no entry. The desktop app listens only on loopback and ignores this variable. Broker agents run on the broker and are not affected.

Broker agents in the HUB

LoT → Agents (also the dock and the status-bar Agents widget) is where you manage broker agents and watch them work. Add and configure from that window. Saving an existing agent sends -addAgent again, which updates it in place and keeps its conversations. Removing an agent cancels its running tasks and forgets its session memory. The activity view is read-only: it follows the task stream, and a question started by CALL AGENT shows up as a short preview. Connectors Manager lists connectors only. An LLM connector can show how many agents use it. The broker refuses to remove that connector while an agent still names it.

Best practices

Use Insight to map topics, Connectors, and health first. Switch to Agent only when you are ready for the assistant to create or update broker objects.
Open new Actions or Connectors in the LoT Editor or Connectors app to read names, triggers, and bindings before you rely on them in production.

Next steps

LoT Editor

Open and refine Actions, Models, and Rules the assistant creates—same editor, full control.

Connectors overview

Add or monitor Connectors the assistant can read and help you configure next.
Last modified on October 25, 2026