Turn Your Broker Into a Teammate — and Your Automations Into Thinkers
Your devices, integrations, and databases already run on Coreflux — whether you monitor a factory, a solar site, a building portfolio, or a mobile fleet. AI agents live in LoT on that same broker: no separate AI platform, no copy-paste into another chat app. Talk with live data and automate with judgment. Teams ask in plain language and get answers from what the broker sees right now. Your Actions already react to MQTT and timers; with agents they can also reason on a schedule or when an event fires — a status digest, a plain-language take on an alarm, a handover brief — all throughCALL AGENT in LoT.
You define two things: a
TYPE LLM connector (the model, the key, the price) and a DEFINE AGENT that uses it. The agent can do nothing until ADD TOOL grants a tool. Full options — grants, delegation, topics — are in AI Connectors and Agents.
Ready-to-Use Use Cases (Copy & Deploy)
The full
DEFINE AGENT reference lives in the LoT AGENT section: Agents Overview, Agent Syntax, and Agent Examples.
Some examples of use-cases for your industry:
Before you start
- A running broker — Installation and Getting Started if you are new
- A Growth or Enterprise license. Community refuses
-addAgent. See Licensing - A model provider — OpenAI, Anthropic, an OpenAI-compatible gateway, or local Ollama on the broker host. Every recipe below uses OpenAI. Swap
PROVIDER,MODEL, and the secret name for another provider (see Picking a provider) - A broker user named in
DEFAULT_USER. Each recipe usesoperator. Create that user first (-addUser operator …). Tasks started by an Action run as this user, and the user must be allowed to do what the grants allow
-addConnector and the agent with -addAgent (LoT Editor, a LoT Notebook, or $SYS/Coreflux/Command). The agent does not show up under Connectors.
The HUB AI Assistant (Coreflux icon in the dock) is a separate helper. It can run inside the HUB, or as a broker agent the wizard installs. This guide is about your agents — the ones you write in LoT.
- Talk with your data
- Automatic report
- Alert triage
- Shift handover
Outcome: Anyone who can publish to the interaction topic can ask a question. The agent reads live MQTT under
telemetry/# and can list what is loaded.1
Deploy and confirm
Add SiteModel as a connector and SiteGuide as an agent.
-listAgents should show SiteGuide as online. Read $SYS/Coreflux/Agents/SiteGuide/status if it stays in error — usually the connector has not started, or operator does not exist.2
Ask a real question
In MQTT Explorer or HUB Data Viewer, publish to Rename
agents/site/s1/ask and subscribe to agents/site/s1/response. s1 is the session. A later question on s1 continues that conversation for the same user.telemetry/ in the grant to production/, solar/, buildings/, or your own tree. A wildcard read shortens payloads over 1,024 characters. Reading the exact topic returns the whole payload.3
Read the answer on response
agents/site/s1/response carries the agent’s answer. Tool calls for that session appear on $SYS/Coreflux/Agents/SiteGuide/task/s1/stream when your user may subscribe to $SYS.You just talked with your data. No extra AI server — the agent runs where your MQTT already lives.
When You’re Ready to Grow
You already have the building blocks: chat ({INTERACTION_TOPIC}/<session>/ask), schedules (ON EVERY), and event-driven (ON TOPIC) automations with CALL AGENT. Next is a writing grant (ADD TOOL "write_mqtt" with WITH LEVEL "write"), peers the agent may call (WITH AGENTS), and MCP Connectors called from Actions.
For several agents on one broker, see Multi-agent deployments.
If you still have a TYPE AGENT connector from an earlier release, rewrite it before you upgrade. The broker skips those connectors at load. See Coming from TYPE AGENT.
Stay Safe While You Experiment
Try read-only first
Try read-only first
Grant only
read_mqtt and read_lot until you trust the prompt. For one question, publish JSON { "text": "…", "mode": "insight" } on the ask topic. Insight mode refuses every writing tool, including in agents this one calls. A default of insight mode on the agent itself is not available yet.Keep API keys off the clipboard in LoT files
Keep API keys off the clipboard in LoT files
Always use
GET SECRET "OPENAI_API_KEY" on the TYPE LLM connector — never paste keys into definitions that get saved or shared.Match the agent to the audience
Match the agent to the audience
An interaction topic is for people. Timed Actions are for machines. Leave
INTERACTION_TOPIC off agents that should only run in the background.Say who the agent is
Say who the agent is
DEFAULT_USER is required. Pick a user that can do the job, and grant ADD TOOL only the topics that job needs. A writing tool also needs WITH LEVEL "write".What to Explore Next
AI Connectors and Agents
Providers, tool grants, delegation, topics, and the move off TYPE AGENT.
Using AI with Coreflux
Use MCP in your editor to write LoT faster — separate from agents running on the broker.

