Building AI for physical infrastructure is messy because the data lives in eight different places, and none of them speak the same language. A new reference architecture published by CodeNinja Atoms tackles this head-on for a container terminal in Saudi Arabia. The goal isn't to replace the existing systems but to join their data streams so operations managers can pinpoint productivity drops within a single shift. By treating the physical world as a queryable graph, this design offers a practical blueprint for developers struggling with fragmented industrial data.
The Data Plumbing Problem
The architecture reads from eight distinct systems of record, including the terminal operating system, vessel scheduling tools, crane controls, and maintenance logs. It uses two adapter families to ingest this data: an integration adapter for API-based systems and a telemetry adapter for hardware data. Crucially, the telemetry adapter uses Lidi over a hardware data diode, ensuring fault logs leave the control zone but nothing can return, preserving safety protocols. To keep the timeline accurate, the system relies on Chrony with linuxptp under an OCP Time Card grandmaster, because joining a fault to the wrong shift is worse than ignoring it.
Modeling the Physical World
Instead of copying data, the design projects it onto a unified object model using Hyper Ontology v0.9. This model defines 16 typed objects and 13 typed links, anchoring each object in exactly one source system. For example, a Berth is anchored in the planning tool, while a Fault comes from the control systems. The real power lies in the links: a single traversal can walk from a productivity measure through vessel moves to crane faults and their associated work orders. This creates a causal chain that answers why rather than just what.
Local-First Model Strategy
The system avoids third-party model services entirely, running everything on-premise in the operator's own machine room. It uses GLM 5.3, a 753-billion-parameter model served at FP8 with vLLM, to handle the drafting agents and ontology maintenance. A lighter GLM-5.3-Flash model reads scanned commissioning drawings on the terminal tier, while BGE-M3 handles retrieval to ensure specific container numbers and fault codes are exact. This local-first approach means no data leaves the border, addressing both latency and sovereignty concerns common in critical infrastructure projects.
Key Takeaways
- Ownership of the compute node costs approximately $570,000 over three years, significantly cheaper than renting equivalent AWS capacity.
- The architecture uses Apache Kafka 4.3.x in KRaft mode with idempotent upserts to handle at-least-once delivery safely.
- Human approval is mandatory for all agent outputs, with latency instrumented from day one to ensure operational trust.
- The entire reference architecture, including the JSON object model, is available under CC BY 4.0 for immediate reuse.
The Bottom Line
This architecture proves that physical AI doesn't need cloud dependencies to be powerful; it just needs strict data plumbing and local compute. The ownership cost of $570,000 over three years makes this a viable, sovereign alternative to renting equivalent capacity from AWS, which would cost significantly more and risk data sovereignty.