Edge agents
An edge agent runs inside the plant or hangar network, reads systems that should never be exposed to the internet and ships what it read to the platform over outbound-only HTTPS. It needs no inbound firewall rule, no VPN and no domain trust, and when the link drops it keeps reading into an outbox on local disk. The agent and its service side are built; the signed single binary, enrolment with certificates and self-update are delivered on request
- Administrator role to register, rotate and disable agents; groups listed in
edge.viewGroupsmay see agents and their batches - No access labels to install an agent. Raw tables it writes take the access labels set on them, and you must hold those to read them
- A host on the plant network with outbound HTTPS to the platform service and no inbound rules, and Python with the agent's packages or the agent's container image
- Read-only credentials for each source, and the agent's own secret, in environment variables on the host
In the platform today
The agent is a Python package, also available as a container image, run with a configuration file such as edge.yaml
- Commands.
checkvalidates a configuration,statusprints the last report andrequeuesends quarantined records again.requeuerefuses while an agent runs on the same buffer folder;--forceruns it anyway - Refused content. A batch the service refuses for its content (400, 413 or 422, or 403 for a table the agent may not write) is split until the refused record is alone. That record is kept in the agent's quarantine table, the service counts the skipped sequences as quarantined, and the stream continues
- Wrong credentials. A 401, a 404 or any other 403 is treated as wrong credentials: the batch is kept, the agent backs off, its state is
unauthorizedand/healthzanswers 503
agent:
id: yhz-hangar-01 # as registered on the service
secretEnv: EDGE_AGENT_SECRET # the environment variable holding the agent's secret
uplink:
url: https://ontology.example.com # the agent only ever connects outward
tls: { ca: ca.pem, cert: agent.pem, key: agent.key } # optional, for mutual TLS
batchRecords: 500
compression: gzip
buffer:
path: /var/lib/ms-edge # outbox.sqlite and status.json
maxRecords: 2000000
maxSize: 1GiB
maxAge: 72h
heartbeat: { every: 15s }
sources:
- { id: hangar2-opcua, type: opcua, endpoint: opc.tcp://10.20.1.15:4840,
nodes: [{ nodeId: "ns=2;s=Hangar2.Humidity", tag: hangar2.humidity_pct }] }
- { id: torque-mqtt, type: mqtt, broker: mqtt://10.20.3.9:1883,
topics: ["markham/yhz/torque/+"], qos: 1 }
- id: compressor-plc
type: modbus
host: 10.20.2.40
pollInterval: 5s
shape: row # one row per poll in its own table
table: raw.hangar_compressor
registers:
- { name: tank_psi, function: holding, address: 0, type: float32, byteOrder: ABCD }
- { id: calibration-drops, type: folder, path: /mnt/calibration-export,
table: raw.tool_calibrations }
| Source | Reads | Options |
|---|---|---|
opcua | A subscription with one monitored item per node id | Publishing interval, a security policy and mode with a client certificate, user name and password; quality from the status code and the source timestamp |
mqtt | Topics on a broker, MQTT 3.1.1 | QoS 0 or 1, TLS with mqtts:// and client certificates, JSON, number or text payloads |
modbus | Registers polled over Modbus TCP | Holding, input, coil and discrete; int16 to float64 and bool; four byte orders; scale and offset |
folder | CSV, JSON lines and JSON files in a watched folder | Each file queued once by path and SHA-256; keep, archive or delete after loading; fixed column types |
By default each value lands as a row in raw.edge_readings with its source, tag, value, quality, source time and receive time. With shape: row, each poll, message or publishing interval is one row in a table of its own, with a column per tag
- Outbox. Every record is committed to
outbox.sqlitewith the next sequence number before anything is sent. The uplink sends the oldest records, one batch at a time, and deletes them only up to the sequence the service acknowledges. A failed send backs off from 1 to 60 seconds with jitter while sources keep reading. PastmaxRecords,maxSizeormaxAgethe oldest records are dropped and counted; a folder source pauses instead, because its files can be read later - Exactly once. The service keeps the highest sequence it has stored for each agent and outbox, skips anything at or below it and lands the rest. The marks survive a restart of the service, so a crash between landing and acknowledging does not land a batch twice. Each row carries
_agent,_stream,_seqand_landed_at, and a value that does not fit its column is kept in_rescued - Signed requests. Each agent has its own secret, shown once, and every batch and heartbeat is signed with replay protection. Rotating the secret can keep the previous one valid for a grace period, and disabling an agent refuses every request. An agent can write only the raw tables listed for it,
raw.edge_*by default - Mutual TLS. The agent can present a client certificate, checked against the one registered for it, and mutual TLS can be required on every request
- Fleet. Agents send a heartbeat every 15 seconds with the outbox depth, the last send and each source's state. The service shows each agent as waiting, healthy, degraded, draining, disconnected or disabled on the Ingestion screen. With
health.listenset, the agent serves/healthzand/metricslocally
| Endpoint | Does |
|---|---|
POST /api/v2/edge/{agent}/batches, /heartbeat | Signed requests from an agent |
GET /api/v2/edge/status, /edge/agents, /edge/agents/{id}, /{id}/batches | The fleet, each agent and its recent batches |
POST /api/v2/edge/agents; /edge/agents/{id}:rotate, :disable, :enable | Registers an agent and shows its secret once; rotates, disables or enables it |
Delivered on request: the signed single binary and its installers, enrolment tokens and per-agent certificates from a tenant authority, an encrypted outbox, configuration pushed from the console, self-update, ODBC and JDBC sources with change data capture on the agent, Sparkplug B and MQTT 5, and writeback through the agent. The rest of this page is delivered on request
How an edge agent works
Plant systems are usually the least reachable data in an operation. The historian sits on a control network, the PLCs speak Modbus on a flat subnet and the lab exports CSV files to a share that only three people know about. Opening those networks to a cloud service is rarely acceptable, and it should not be. An edge agent turns the problem around: it sits next to the sources, reads them with local protocols and makes a single outbound connection to the connector host for your tenant
On request, the connector host terminates the session, writes each batch into the raw dataset for its source as an append to an open table and acknowledges only after the commit is durable. From there the data follows the normal path through pipelines and the sync service into objects. The agent never talks to the object store, the action service or any other internal service, and it holds no credentials that would let it read anything back
Signed binary and certificates
On request, a signed single binary with per-agent certificates from your tenant's authority, keys sealed to the host, an encrypted buffer and self-update. An agent has no permission to read from the platform: it can push data into the raw tables listed for it, and nothing else
Host requirements
Size the host for the busiest source and the full outbox, not the average day
| Requirement | Minimum | Recommended |
|---|---|---|
| Runtime | Python with the agent's packages, or any OCI runtime for the container image | A dedicated VM or industrial PC on the plant DMZ |
| Disk for the outbox | A local volume with room for buffer.maxSize | SSD |
| Outbound network | HTTPS to the platform service | A stable path, and an HTTP CONNECT proxy if you require one |
| Clock | Within 5 minutes of the service, which refuses signed requests outside that window | NTP or the Windows time service |
| Inbound network | None | None |
On request, at a site with no outbound path the agent sends to a local deployment on the same network, with the same configuration
Install and enrol
Today the agent runs from its Python package or container image with a configuration file, registered on the service by an administrator, as described under in the platform today. On request, installers for Linux, Windows and containers, checked against our release key and enrolled with a one-time token
Two agents configured with the same source deliver duplicate batches under different agent identities, and the service cannot merge them. For redundancy, run a standby agent with its sources disabled
Configuration
The built agent reads one YAML file on its host, shown under in the platform today, with secrets taken from environment variables. On request, configuration managed from the console, database sources with change data capture, Sparkplug B and MQTT 5, bandwidth caps and upgrade windows
Supported protocols
Each source type maps the native shape of the protocol onto rows in a raw dataset. Readers are deliberately thin: they do not rename, aggregate or filter beyond what the protocol requires, so that the raw dataset is a faithful record and every transformation is visible in a pipeline
The source types and their options are listed under in the platform today
Readers record a source timestamp and an agent receive timestamp on every row. Pipelines should key time series on the source timestamp and use the receive timestamp only to measure latency, because a replayed backlog arrives with old source times and new receive times
Store-and-forward
The outbox is what lets a plant keep producing data through a fibre cut, a firewall change or a weekend with no one on site. Every reader writes to the outbox first, always, whether or not the uplink is connected. The uplink deletes records only up to the sequence the service acknowledges, so a batch that was sent but not acknowledged is sent again
Duplicates from a resend never reach a dataset twice. The service skips any sequence at or below the highest it has stored for the agent, which gives exactly-once delivery from the outbox to the raw dataset, and the sync service then extends it to objects
When the link is down
- Disconnect. The uplink retries with backoff from 1 to 60 seconds, plus jitter, while sources keep reading. The service shows the agent as disconnected once its heartbeats stop
- Accumulate. Readers keep writing to the outbox. The heartbeat and the local metrics endpoint report its depth
- Reconnect. The uplink resumes from the oldest unacknowledged record and sends the backlog one batch at a time, oldest first, while the service shows the agent as draining
When the outbox fills
The outbox is bounded by maxRecords, maxSize and maxAge, whichever is reached first. What happens next depends on whether the source can be read again later
| Source | Behaviour |
|---|---|
| Watched folders | The reader stops picking up new files. Nothing is lost, because the files are still in the folder and are read when space frees up |
| OPC UA, Modbus TCP, MQTT | The oldest records are dropped to make room, and the drop is counted and logged |
Sizing the outbox
Outbox use is driven by value count, not by tag count. Set maxSize and maxAge for the longest outage you want to ride through at the busiest rate
Health and upgrades
Each agent's heartbeat, outbox depth and source states show on the Ingestion screen, and with health.listen set the agent serves /healthz and /metrics locally, so plant monitoring can watch it without internet access. On request, self-update by release channel inside a weekly window, with version pinning
Limitations
- An outage that outlasts the outbox's bounds loses polled and subscribed data, oldest first
- An agent only pushes data into its own raw datasets. It cannot read from the platform, receive writebacks or run actions on plant systems
- The built agent reads its sources from the YAML file on its host; changing them means editing that file and restarting the agent
- Two agents with the same source deliver duplicates that the service cannot merge. High availability is a standby agent with its sources disabled
- Exactly-once delivery holds from the buffer to the raw dataset. A source that resends the same value, such as an MQTT publisher at QoS 1, can still produce duplicate rows that a pipeline has to remove