Coreflux Templates

Agent on a Leash: AI Plant Copilot

An LLM suggests setpoint changes but never gets write access; a named human approves every proposal.

Dataflow

How it flows

Actions, models, routes and the topics that link them. Click a node to trace its flow.

How it works

This Coreflux LoT template lets a language model suggest setpoint changes for a curing oven without ever giving it write access. When the reject rate climbs, the broker sends the model the oven's numbers over a REST_API route. The answer is checked against a setpoint band and a largest allowed step, then waits on an approval queue topic until the named approver approves or rejects it. Only an approved proposal becomes a write to cmd/setpoint. It runs on the free Community licence.

Key features

  • Works with any OpenAI-compatible chat completions API, including a local Ollama. The API key stays in the broker's secret store and is never in a topic.
  • A mock model answers in the same format, so the whole flow runs with no key and no internet.
  • Proposals outside the band, or with too big a step, are blocked and logged without reaching anyone.
  • Decisions are accepted only from the MQTT user you name, and only for the proposal that is waiting.
  • Every question, proposal, decision, connect and subscribe is written to audit/copilot/line-2/.
  • It uses 12 of the 24 LoT artifacts and 1 of the 3 routes the Community licence allows.

Prerequisites

The notebook

What’s inside

Browse the markdown and code cells before you download.

LoT Notebook:ai-plant-copilot.lotnb
Related use cases

Similar templates

Templates chosen for overlap in routes, tags, and category.

View all in Manufacturing

Get this template

1 file