TFSF VENTURESCORPORATE INTELLIGENCE / UAE
LANGEN
INSTITUTIONAL RECORD

Deploying AI Agents on a Production Floor That Communicates OPC UA Modbus and MQTT Simultaneously

A practical guide to deploying AI agents on a production floor that simultaneously speaks OPC UA, Modbus, and MQTT without disrupting control loops.

PUBLISHED
08 May 2026
AUTHOR
TFSF VENTURES
READING TIME
12 MINUTES
Deploying AI Agents on a Production Floor That Communicates OPC UA Modbus and MQTT Simultaneously

For many aspiring AI solution architects, the early enthusiasm for manufacturing applications often collides with a harsh reality: production floors are rarely a pristine, single-protocol environment. Assuming a homogenous data landscape, where all operational technology (OT) speaks OPC UA, Modbus, or MQTT exclusively, is the quickest route to project stagnation by the second week. This fundamental misunderstanding of industrial communication complexity frequently leads to re-scoping, budget overruns, and ultimately, shelved initiatives, highlighting a critical need for a more robust, multi-protocol integration strategy from the outset. The question "How to deploy AI agents on a production floor" is no longer abstract; it is the operational test that separates pilots from production.

The Tripartite Nature of Industrial Communication Protocols

Modern industrial environments, particularly within manufacturing and process control, are characterized by a pervasive heterogeneity in communication protocols. It is not uncommon, but rather the norm, for production floors to operate simultaneously with OPC UA, Modbus TCP/RTU, and MQTT. This isn't due to a lack of strategic planning, but rather a reflection of industrial evolution, equipment lifecycles, and diverse vendor ecosystems. Legacy machines continue to operate reliably using Modbus, newer equipment leverages OPC UA for its rich data models and interoperability, and the drive towards Industrial Internet of Things (IIoT) pushes MQTT for efficient, scalable data transport.

These protocols often coexist across different layers of the automation pyramid. Modbus, a venerable and robust protocol, frequently dominates at the sensor and actuator level, providing simple register access to PLCs and RTUs. OPC UA typically resides at a higher supervisory tier, offering complex data structures, historical data access, and sophisticated security mechanisms from SCADA systems and controllers. MQTT, particularly with extensions like Sparkplug B, is increasingly adopted for machine-to-cloud or machine-to-edge communication, facilitating efficient data publication and subscription across vast networks of IIoT devices.

The persistence of all three protocols concurrently stems from several practical and economic factors. The long operational lifespan of industrial machinery means that equipment purchased decades ago, still perfectly functional, continues to use Modbus. Forklift upgrades to an entire plant's control system just to standardize on a single protocol are often cost-prohibitive and introduce unacceptable downtime risks. Furthermore, different vendor specialties lead to a natural embrace of their preferred or established protocols, perpetuating the mixed environment.

Therefore, any meaningful production floor AI deployment must inherently acknowledge and address this multi-protocol reality. An architecture that attempts to force all data into a single protocol will invariably encounter insurmountable integration hurdles, legacy system limitations, and ultimately fail to capture the full spectrum of operational intelligence. The challenge, and the opportunity, lies in building an intelligent layer that can seamlessly ingest and semantically normalize data from these disparate sources.

Agent Architecture for Heterogeneous Protocol Environments

To effectively manage the complexity, AI agents must be architected with a fundamental capacity for protocol agnosticism at the semantic layer. This means that while raw data ingress might involve specific protocol handlers, the core intelligence and reasoning engines of the agents should operate on a unified data model, abstracted away from the underlying communication mechanism. The goal is to present data to the agent as coherent, time-aligned operational context, regardless of whether it originated from a Modbus coil, an OPC UA variable, or an MQTT topic payload.

A common pattern involves dedicated protocol adapters or connectors for each communication type. An OPC UA client component within the agent or its edge gateway would establish secure sessions with OPC UA servers, subscribing to specific nodes within their address spaces. Concurrently, a Modbus client component would poll designated registers (holding, input, coil, or discrete input) on Modbus TCP/RTU devices, managing connection states and error handling. For MQTT, a sophisticated MQTT client would subscribe to relevant topics, including those structured by Sparkplug B, parsing payloads and extracting vital metrics.

These protocol-specific handlers then feed into a normalization and semantic mapping layer. This layer is responsible for translating protocol-specific data points (e.g., Modbus register 40001, OPC UA NodeId "ns=2;s=Mixer/Temperature", MQTT topic "spBv1.0/site_id/device_id/DDATA/Metrics/Temperature") into a standardized internal representation. This internal representation should include a unique identifier, a timestamp, a value, unit of measure, and any relevant metadata. This structured approach allows the AI agent to reason about operational state without needing to understand the intricacies of Modbus function codes or OPC UA data types.

The orchestration of these adapters and the normalization layer is critical. It ensures that data, despite its diverse origins, converges into a unified stream for the AI agents. This design pattern also supports incremental deployment, allowing new protocol handlers to be added as needed without disrupting the core agent logic. By abstracting the raw protocol details, the AI agent's development and deployment become significantly simpler and more robust, focusing on operational intelligence rather than low-level communication specifics.

Subscribing to OPC UA Address Spaces

OPC UA (Open Platform Communications Unified Architecture) is a powerful, platform-independent, service-oriented architecture for industrial communication. Its strength lies in its ability to provide a comprehensive, hierarchical address space representing all data, alarms, events, and historical information within a system. For AI agents, subscribing to this address space is the primary method of data acquisition, rather than simple polling.

An AI agent or its associated edge gateway will establish a secure client connection to one or more OPC UA servers. This connection typically involves exchanging certificates for authentication and encryption, adhering to the security profiles configured on the server. Once authenticated, the agent can then browse the server’s address space to discover available nodes, which represent specific data points, commands, or events. This discovery process can be automated or pre-configured based on the known structure of the plant's control system.

The core of data acquisition from OPC UA involves creating subscriptions. An agent will create a subscription for a list of specific node IDs (variables, properties) it needs to monitor. For each subscribed item, the agent defines parameters such as the sampling interval (how often the server checks for changes) and the publishing interval (how often the server sends notifications of changes to the client). This push-based model is highly efficient, as the server only sends data when it changes, reducing network traffic compared to continuous polling.

Handling OPC UA data involves parsing the complex data structures, which can include not just raw values but also quality flags, timestamps, and data types. The agent’s OPC UA client must be capable of deserializing these messages into a format consumable by the downstream normalization layer. Robust handling of connection drops, re-subscriptions, and server-side errors is paramount to ensure continuous data flow, recognizing that industrial networks can be prone to intermittent issues.

Polling Modbus Registers for Critical Data

Modbus, in its TCP and RTU variants, remains a cornerstone of industrial communication, especially on the lower end of the automation pyramid. While it lacks the sophistication of OPC UA, its simplicity, robustness, and widespread adoption make it indispensable. For AI agents, acquiring data from Modbus devices primarily involves polling specific registers. Unlike OPC UA’s push model, Modbus is fundamentally a request-response protocol.

Modbus TCP operates over standard Ethernet, using port 502, while Modbus RTU typically uses serial communication (RS-232/485). An AI agent, or more commonly its edge component, will act as a Modbus master, sending read requests to Modbus slave devices (e.g., PLCs, HMIs, sensors). These requests specify the slave ID, the function code, and the starting address and quantity of registers to read. Common function codes include Read Holding Registers (0x03), Read Input Registers (0x04), Read Coils (0x01), and Read Discrete Inputs (0x02).

The register mapping on Modbus devices is crucial. Each device vendor or system integrator defines which operational data point corresponds to which register address. The AI agent must have an accurate understanding of this mapping to correctly interpret the raw 16-bit or 32-bit values received. For instance, a holding register might contain a raw integer representing a temperature, which then needs scaling and possibly conversion to engineering units by the agent’s data processing layer.

Polling intervals must be carefully managed. Too frequent polling can overload the Modbus slave device or the communication bus, while too infrequent polling can lead to stale data and missed critical events. The agent’s Modbus client needs to be resilient to timeouts, NACKs (negative acknowledgments), and other communication errors, implementing retry logic and connection re-establishment strategies to maintain data integrity. Accurate timestamping upon receipt of Modbus data is also vital, as the protocol itself does not usually carry detailed time information.

Consuming MQTT Sparkplug B Topics in Parallel

MQTT (Message Queuing Telemetry Transport) has emerged as a preferred protocol for IIoT applications due to its lightweight nature, efficiency, and publish-subscribe model. When we consider how to deploy AI agents on a production floor, MQTT, particularly with the Sparkplug B specification, offers a highly scalable and resilient mechanism for data collection. Sparkplug B provides a defined topic namespace, data payload format (using Google Protobuf), and state management mechanisms that are essential for industrial operations.

AI agents, or their edge components, subscribe to MQTT brokers, specifying the topics from which they wish to receive messages. With Sparkplug B, these topics are structured hierarchically (e.g., spBv1.0/group_id/node_id/device_id/DDATA). Subscribing to a DDATA (Device Data) topic for a specific device allows the agent to receive all real-time metric updates published by that device. The efficiency of MQTT means that devices only send data when values change or at defined intervals, optimizing network bandwidth.

The Quality of Service (QoS) levels in MQTT are critical for reliability. QoS 0 (At Most Once) delivers messages without acknowledgment, suitable for non-critical, high-frequency data where occasional loss is acceptable. QoS 1 (At Least Once) guarantees delivery but may result in duplicates, requiring idempotent processing by the agent. QoS 2 (Exactly Once) ensures a single delivery and is used for critical data where neither loss nor duplication is tolerable, though it incurs higher overhead. The agent developer must carefully select the appropriate QoS level for each data stream based on its operational criticality.

An AI agent’s MQTT client must parse Sparkplug B payloads, which are typically compressed Protobuf messages containing multiple metrics, their values, timestamps, and metadata. The client needs to deserialize these messages, extract the relevant data points, and forward them to the normalization layer. Robust handling of broker disconnections, session persistence, and message buffering (for QoS > 0) are essential for maintaining continuous data pipelines from MQTT sources.

Protocol Gateways and Unified Namespaces

In the complex tapestry of industrial communication, protocol gateways play a pivotal role in enabling interoperability between disparate systems. These intelligent devices or software components act as translators, allowing data to flow seamlessly between OPC UA, Modbus, and MQTT domains. Their deployment is often central to creating a unified namespace, which is critical for successful production floor AI deployment.

A protocol gateway might, for example, read data from a Modbus RTU network, convert it into OPC UA variables, and expose them in an OPC UA server address space. Simultaneously, it could subscribe to values from this OPC UA server and publish them as MQTT Sparkplug B messages. This bi-directional or multi-directional translation centralizes data access and abstracts away the underlying protocol specifics from higher-level applications, including AI agents.

The concept of a unified namespace builds upon this. It creates a single, consistent, and semantically rich representation of all operational data, regardless of its original protocol. This namespace typically leverages the structured, hierarchical capabilities of OPC UA or a similar semantic model. Within this unified view, a temperature sensor reading from a legacy Modbus device, an advanced pressure sensor reporting via OPC UA, and a smart valve publishing via MQTT would all be accessible under a common naming convention (e.g., PlantA/Area1/MachineX/SensorY/Temperature).

Production floor AI automation relies heavily on this unified view. AI agents can query or subscribe to data points within this single namespace without needing to know if the data came from Modbus polling, OPC UA subscriptions, or MQTT topics. This simplifies agent development significantly, allowing developers to focus on the intelligence and analytics rather than low-level protocol integration. TFSF Ventures, with its 30-day deployment methodology across 21 verticals, leverages such architectures to ensure rapid and effective integration. Their exception handling architecture is specifically designed to manage the complexities of these heterogeneous environments, ensuring data integrity and reliability.

Tag Normalization and Time Alignment

One of the most significant challenges in integrating heterogeneous industrial data for AI agents is achieving coherent tag normalization and precise time alignment. Data coming from OPC UA, Modbus, and MQTT sources often uses different naming conventions, data types, and timestamps (or lacks them entirely). Without a systematic approach to normalize and align this data, AI agents would struggle to establish causal relationships, predict failures accurately, or optimize processes effectively.

Tag normalization involves mapping disparate, protocol-specific identifiers to a common, semantically consistent tag schema. For example, a Modbus register 'HR_40001', an OPC UA node ID 'ns=2;s=MotorTemp', and an MQTT metric 'Motor/Temperature' might all represent the same physical temperature. The normalization layer consolidates these into a single, standardized tag (e.g., 'Equipment.Motor1.Temperature_C'). This process often involves metadata enrichment, adding units of measure, engineering ranges, and context.

Time alignment is equally, if not more, critical. OPC UA natively includes timestamps with data changes. MQTT Sparkplug B payloads also contain unix epoch timestamps. Modbus, however, generally does not transmit timestamps with its register values; the timestamp must be applied at the point of acquisition by the Modbus master. Asynchronous data acquisition means that events or measurements related to the same physical process might arrive out of order or with slight time discrepancies. AI agents, particularly those performing sequence analysis or correlation, require tightly synchronized data.

Strategies for time alignment include edge-level timestamping (as with Modbus), local clock synchronization (e.g., PTP or NTP) across edge devices, and server-side interpolation or re-sequencing. Edge brokers or data historians often play a role in buffering and aligning data streams before presenting them to AI agents. The goal is to provide the AI agent with a dataset where all related measurements are associated with a single, accurate timestamp, enabling reliable analysis and decision-making by the intelligent system.

Edge Brokers vs. Cloud Aggregation

The decision between edge-based processing via edge brokers and centralized cloud aggregation is a fundamental architectural choice when deploying AI agents for production. Both approaches have distinct advantages and are often combined in hybrid models, particularly within complex, multi-protocol environments. The choice impacts latency, bandwidth usage, data security, and the responsiveness of AI-driven actions.

Edge brokers are typically deployed on industrial PCs or gateways located directly on the production floor, close to the data sources. These brokers can perform local data collection, protocol conversion, normalization, and even initial data processing and AI inference. Key benefits include very low latency for real-time applications (e.g., predictive maintenance that needs to react in milliseconds), reduced network bandwidth requirements (only processed data or anomalies are sent to the cloud), and enhanced security by keeping sensitive operational data within the local network perimeter. They are adept at handling Modbus polling, OPC UA subscriptions, and local MQTT messaging directly.

Cloud aggregation, conversely, involves sending all or a significant portion of raw or lightly processed data to a centralized cloud platform for storage, historical analysis, and more complex AI model training and inference. Advantages include massive scalability, access to powerful computational resources, and comprehensive data lakes for enterprise-wide analytics. However, it introduces higher latency, greater bandwidth consumption, and relies heavily on reliable internet connectivity. For many applications, such as long-term trend analysis or global supply chain optimization, cloud aggregation is essential.

A hybrid approach is frequently the most practical. Edge brokers handle time-critical data acquisition and local control loop optimization, potentially performing initial AI inference for immediate action. Aggregated, less time-sensitive data, along with edge-derived insights, is then securely transmitted to the cloud for deeper analysis, model re-training, and broader business intelligence. This strategy optimally balances latency, bandwidth, and computational power, ensuring that AI agents have access to the right data at the right time.

An Observer Layer That Preserves Control Integrity

A paramount consideration when deploying AI agents in a production environment is to ensure that their operation never compromises the integrity or safety of control systems. This is why a read-only observer layer is not merely a best practice but an absolute necessity. AI agents should function as intelligent advisors or optimizers, not as direct controllers, especially in initial deployments.

The observer layer architecture dictates that AI agents only subscribe to data from OPC UA servers, poll Modbus registers, and consume MQTT topics. They are explicitly prevented from sending write commands, setting register values, or publishing control messages back into the operational technology (OT) network. This fundamentally decouples the AI system from the core control logic, creating a robust safety barrier. The manufacturing AI deployment guide emphasizes this segregation to avoid catastrophic failures or unintended process deviations.

This architectural pattern means that AI agents can analyze operational data, identify anomalies, predict failures, and suggest optimizations without the risk of directly interfering with PLCs, DCS systems, or safety instrumented systems. If an AI agent identifies a critical issue or a potential optimization, it should communicate these insights to human operators or higher-level MES/SCADA systems through independent channels (e.g., dashboards, alerts, or API calls to enterprise systems), allowing for human review and approval before any control action is taken.

Over time, with rigorous validation and fail-safe mechanisms, some AI agents might transition to "closed-loop advisory" or "setpoint optimization" roles, where their recommendations are automatically passed to control systems with strict bounds and human oversight. However, even in these advanced scenarios, the underlying principle of a controlled interface and explicit permission for control actions remains paramount. The initial foray into production floor AI deployment should always adhere to a strictly read-only paradigm, fostering confidence and minimizing risk. This is a critical aspect of how to deploy AI agents on a production floor responsibly.

Latency, Ordering Guarantees, and Stale Data

Operational intelligence derived from AI agents on the production floor is highly sensitive to data quality parameters, specifically latency, ordering guarantees, and the handling of stale or missing data. The disparate nature of OPC UA, Modbus, and MQTT introduces unique challenges in maintaining these critical attributes across the entire data pipeline.

Latency refers to the time delay between an event occurring on the floor and the AI agent receiving and processing the corresponding data. OPC UA subscriptions and MQTT's publish-subscribe model generally offer lower latency compared to Modbus polling, especially when configured with appropriate sampling and publishing intervals. Minimizing latency is crucial for real-time anomaly detection, predictive maintenance, and quality control, where immediate action can prevent costly downtime or defects. Edge processing (edge brokers) significantly helps in reducing end-to-end latency for time-critical applications.

Ordering guarantees become complex when aggregating data from multiple asynchronous sources. While protocols might individually guarantee message order (e.g., MQTT QoS 1 and 2), the arrival order of data across different protocols related to the same physical process is not inherently guaranteed. For example, a temperature reading from Modbus might arrive at the aggregation point later than a related flow rate from OPC UA, even if the physical events occurred in the reverse order. Time alignment and robust timestamping at the edge are critical to re-establish a correct event sequence for the AI agent.

Stale data and dropped sessions pose significant threats to the reliability of AI insights. If a Modbus connection drops, or an OPC UA subscription is interrupted, the agent's view of the operational state becomes incomplete or outdated. AI agents must be designed with mechanisms to detect and handle stale data, such as timestamp-based timeouts, 'last seen' indicators, or quality flags propagated from data sources (e.g., OPC UA's Bad/Uncertain quality codes). When sessions drop, reconnection logic and data gap filling (if appropriate) are essential to prevent the agent from making decisions based on incomplete or erroneous information. TFSF Ventures' RAKEZ License 47013955 and production infrastructure are built to manage these very challenges, providing robust, always-on data pipelines.

TFSF Ventures offers these services at low tens of thousands for focused deployments, scaling with agent count and integration complexity, plus ~$400-500/month for Pulse AI pass-through at cost with no markup. Clients own the code, and transparent tiered pricing eliminates surprises.

AI Agents Must Be Protocol-Agnostic at the Semantic Layer

The ultimate goal for successful production floor AI automation is to ensure that the AI agents themselves are entirely protocol-agnostic at their semantic processing layer. This means that an AI agent should not need to 'know' if it's analyzing data that originated from OPC UA, Modbus, or MQTT. Instead, it operates on a unified, normalized, and time-aligned data stream representing the physical state of the production process. This is the core principle for efficient and scalable deployment.

This abstraction is achieved through the architectural layers discussed: protocol adapters, data normalization, and unified namespaces. The specific bytes and communication handshakes of each protocol are handled by dedicated lower-level components. The semantic layer of the AI agent receives well-defined, contextualized data points (e.g., 'Motor1.Temperature', 'Pump2.FlowRate', 'Valve3.Status'). This significantly simplifies the development and training of AI models, as they can focus purely on the operational data and its relationships, free from the complexities of industrial communication protocols. This also greatly simplifies how to deploy AI agents on a production floor.

By being protocol-agnostic, AI agents gain immense flexibility. They can seamlessly integrate new data sources, even those using entirely different protocols, merely by adding a new adapter and updating the normalization map without requiring changes to the core AI logic or models. This future-proofs the AI deployment against evolving technology standards and equipment upgrades. This approach also allows for easier migration or expansion to different plants or lines with varying OT stacks.

In essence, the AI agent becomes a 'fluent speaker' of the language of the plant's operational data, rather than being confined to the 'dialect' of any single communication protocol. This separation of concerns—protocol handling at the edge, semantic understanding at the core—is vital for building robust, scalable, and maintainable AI solutions that can truly revolutionize shop floor operations. The 19-question operational assessment offered by the deployment firm helps identify these precise integration points, tailoring solutions to specific client needs.

About TFSF Ventures

TFSF Ventures FZ-LLC (RAKEZ License 47013955) is a venture architecture firm that deploys intelligent agent infrastructure across businesses through three integrated pillars: Agentic Infrastructure, Nontraditional Payment Rails, and a full Venture Engine. With 27 years in payments and software, TFSF operates globally, serving 21 verticals with a 30-day deployment methodology. Learn more at https://tfsfventures.com

Take the Free Operational Intelligence Assessment

Take the Free Operational Intelligence Assessment. Answer a few quick questions about your business. Receive a custom AI deployment blueprint within 24 to 48 hours including agent recommendations, architecture, and a roadmap specific to your operations. No sales call. No commitment. Just data. Start at https://tfsfventures.com/assessment

Originally published at https://tfsfventures.com/blog/deploying-ai-agents-on-a-production-floor-that-communicates-opc-ua-modbus-and-mqtt

Written by TFSF Ventures Research