External Connections
External connection tools allow the agent to communicate with systems outside Rela AI: other systems' APIs, IoT devices via MQTT, and industrial machinery via OPC UA.
External Connections
The data the agent needs is not always stored in Rela AI collections. Sometimes it lives in the company's ERP, in a process history server, in the MQTT broker of field sensors, or directly in the compressor's PLC. External connection tools are the channel that allows the agent to query and act on those systems without intermediaries.
What is it for?
In an industrial plant, data is distributed across multiple systems: SCADA holds real-time readings, the ERP holds purchase orders and inventory, the OPC UA server holds PLC states. External connections allow the agent to access all those systems from a single conversation — without the technician having to jump from screen to screen searching for information.
External connections allow the agent to:
- Query data from external systems in real time during a conversation
- Read values directly from PLCs and industrial machinery via OPC UA
- Publish commands to IoT devices via MQTT
- Integrate with ERP systems, external CMMS platforms, or supplier APIs
- Receive data from industrial gateways such as HMS Anybus, Siemens IOT2050, Moxa, or Advantech
How does it work?
There are three connection types available depending on the protocol of the external system:
| Type | Protocol | For which systems |
|---|---|---|
| HTTP | REST API (GET, POST, PUT, DELETE) | ERPs, external CMMS, supplier APIs, web servers |
| MQTT | IoT messaging | Sensor brokers, IoT devices, industrial gateways |
| OPC UA | Standard industrial protocol | PLCs, SCADA, DCS, machinery with an OPC UA server |
The agent calls the tool when needed, the system makes the connection in real time, and returns the result to the agent to incorporate into its response.
How to use it?
Create an HTTP connection (REST API)
To connect to any system that has a web API:
- Go to Tools and create a new tool of type External connection.
- Select HTTP protocol.
- Configure:
| Field | Description | Example |
|---|---|---|
| Endpoint URL | The address of the external service | https://erp.company.com/api/inventory |
| Method | Type of operation | GET to query, POST to create |
| Headers | Authorization headers | Authorization: Bearer your-api-key |
| Timeout | Maximum wait time | 30 seconds |
- Add parameters the agent will collect from the user (part code, equipment name, etc.).
- Save and assign to the agent.
Create an MQTT connection
To send commands to or retrieve data from IoT devices:
- Create a tool of type External connection, protocol MQTT.
- Configure:
| Field | Description | Example |
|---|---|---|
| Broker URL | Address of the MQTT broker | mqtt://192.168.1.100:1883 |
| Topic | The topic to publish to or subscribe from | plant/compressors/C-01/control |
| QoS | Quality of service (0=no guarantee, 1=at least once, 2=exactly once) | 1 for important commands |
| Username / Password | Broker credentials (if required) | — |
Create an OPC UA connection
To read or write values directly to PLCs and industrial machinery:
- Create a tool of type External connection, protocol OPC UA.
- Configure:
| Field | Description | Example |
|---|---|---|
| Server URL | Address of the OPC UA server | opc.tcp://192.168.1.10:4840 |
| Node ID | Identifier of the data to read/write | ns=2;s=Temperature_Compressor_C01 |
| Operation | Read value, Write value, or Call method | Read value |
The three available OPC UA operations:
| Operation | When to use it |
|---|---|
| Read value | Check the current state of a sensor or PLC variable |
| Write value | Change an equipment parameter (setpoint, speed, etc.) |
| Call method | Execute a server function (start, stop, reset) |
Write and call method operations in OPC UA modify machinery behavior. Use them only with agents whose prompt includes appropriate safety restrictions and requires explicit operator confirmation before executing.
Compatible industrial gateways
Gateways that convert legacy industrial protocols (Modbus, Profibus, EtherNet/IP) to protocols natively supported by Rela AI:
| Gateway | Exposed protocol | How to connect |
|---|---|---|
| HMS Anybus (Modbus→HTTP) | HTTP POST | Configure the gateway URL as the HTTP endpoint |
| Siemens IOT2050 | MQTT | Connect to the gateway's MQTT broker |
| Moxa ioLogik | HTTP GET | Use the device's REST API |
| Advantech WISE | HTTP REST | Use the gateway's REST API endpoints |
Test the connection before assigning to the agent
Before assigning the tool to the agent, verify it works:
- In the tool configuration screen, click Test connection.
- Enter the parameter values for the test.
- The system runs the actual connection and shows: whether it succeeded, the response time, and the data received.
- If there is an error, it displays the external system's message for diagnosis.
Testing before activating prevents the agent from returning confusing error messages when technicians use it in production.
Key benefits
- The agent accesses real-time data from any plant system
- Three protocols that cover virtually all existing industrial infrastructure
- Direct OPC UA reads from the PLC without manually exporting data
- Integration with industrial gateways already installed in the plant
- Built-in connection test in the configuration to validate before going live
- The agent can combine data from multiple external connections in a single response
Common use cases
Scenario 1: Agent querying the ERP for parts The technician asks the agent: "How many units of the Baldwin B7144 filter are in the warehouse?" The agent calls the HTTP tool pointing to the ERP API with the part code. The ERP responds: 8 units in the central warehouse, 2 in the north plant warehouse. The agent replies directly to the technician with those quantities and locations, without the technician having to log into the ERP.
Scenario 2: Agent reading real-time temperature from the PLC The supervisor asks the agent: "What is the current temperature of compressor C-01?" The agent calls the OPC UA tool configured with the compressor's temperature node. It reads the value directly from the PLC: 68.4°C. It compares against the asset's baseline and responds: "Current temperature of C-01: 68.4°C. It is within the normal range (baseline 65°C ± 5°C)."
Scenario 3: Agent publishing a restart command via MQTT The operator tells the agent: "I need to restart dosing pump B-09." The agent recognizes that this action requires explicit confirmation (per its security prompt) and asks: "Do you confirm you want to restart pump B-09? This action will stop dosing for approximately 30 seconds." The operator confirms. The agent publishes the command to the corresponding MQTT topic. The pump receives the command, executes the restart, and the agent confirms: "Restart command sent to B-09. The equipment should be operational within 30 seconds."
Built-in Query Tools
Predefined actions your AI agents can use to query platform data without any additional configuration.
SLA Management
SLAs (Service Level Agreements) define how long the team has to respond to and resolve each task according to its priority. The system automatically monitors compliance and alerts before deadlines expire.