Read cofounder Muhammad Umar's memo, Compression and Reinflation
CodeNinja AtomsUnited StatesSaudi ArabiaPakistan

Sector · Oil and gas

Physical AI for oil and gas

Wells, terminals and plants hold safety, inventory and process data in systems that were never joined, often on sites where the data may not leave the country. These are the questions engineers ask first, answered from 4 published CodeNinja Atoms reference architectures.

  1. What does a physical AI system for oil and gas look like?
  2. Which AI models can an oil and gas operator run on its own hardware?
  3. How much compute and hardware does AI in oil and gas need?
  4. Is it cheaper to own AI hardware or rent cloud GPUs in oil and gas?
  5. What ontology or object model does an oil and gas AI system need?
  6. Who approves the decisions an AI system makes in oil and gas?

What does a physical AI system for oil and gas look like?

A complete physical AI design for oil and gas names what to sense, which existing systems to join, the object model that joins them, the models and hardware, the three-year cost and the person who approves every action. CodeNinja Atoms has published 4 such reference architectures for oil and gas, each free to reuse under CC BY 4.0.

DesignCountryWhat it does
Sovereign HSE WatchPakistanAn open reference architecture for predicting HSE incidents at an oil and gas operator in Pakistan, on the operator's own hardware, with no data leaving the country and no third-party AI service in the serving path.
Loop Integrity WatchPakistanfield hardware that rebuilds the signal path on three Modbus loops, and a governed inventory ontology that catches a flatlined or swapped radar gauge reading before the central inventory picture misleads anyone.
Corridor GuardPakistana validation-first study that digitises an operator's scanned pipeline records, verifies the corridor in the field, calibrates a direct current interference model in validated software and hands the re-runnable model over on the operator's own hardware, so every safe distance ships with its evidence.
Pipeline Integrity WatchUnited StatesAn open reference architecture for system design in physical AI. A single on-premises model of a natural gas transmission estate in the United States: passive taps watch the OT network at every station and in the gas control centers, open-weight models watch compressor health and leak indicators at the station, and a control room assistant explains each alert and drafts a response for a pipeline controller who decides every action. The security directive evidence generates itself from the monitoring.

Which AI models can an oil and gas operator run on its own hardware?

Each published oil and gas design names its models and why, and every model is open-weight or no model is used at all, so the operator can run it on hardware it owns.

DesignModels
Sovereign HSE Watch6 self-hosted open-weight models, including GLM 5.3 (reasoning), Chronos-2 (forecasting), RF-DETR (vision), BGE-M3 (retrieval in English and Urdu) and PaddleOCR-VL 1.6 (scans)
Loop Integrity WatchNone: every integrity check (stuck value, swap, distortion) is deterministic
Corridor Guard
Pipeline Integrity WatchMistral Large 3 675B (Apache-2.0) for the control room assistant, the compliance agent and the work surface; Chronos-2 (Apache-2.0) for telemetry forecasting with residual anomaly detection; RF-DETR Apache sizes for station camera scene detection; BGE-M3 (MIT) for retrieval
DesignChoiceWhat was pickedWhy
Sovereign HSE WatchFrontier reasoning modelGLM 5.3 open weights at FP8, self-hostedStrongest open agentic model; the bespoke license exempts purely internal use from the model-as-a-service security-review trigger
Sovereign HSE WatchDetectorRF-DETR, Apache-2.0 Nano to Large checkpoints, BF16The practical sovereign answer to the AGPL gate; Plus XL and 2XL excluded from the serving path
Sovereign HSE WatchForecasterChronos-2, Apache-2.0, about 0.48 GB at 32 bitZero-shot multivariate forecasting with no field-of-use restriction; weights may be held, fine tuned and redistributed
Sovereign HSE WatchEmbeddingsBGE-M3, MIT, FP16Dense plus sparse plus multi-vector retrieval in one pass with an 8,192-token window
Sovereign HSE WatchDocument parsingPaddleOCR-VL 1.6, Apache-2.0, about 0.9B parameters, BF16Strong on degraded multilingual scans; no user or revenue threshold; fine tuning permitted
Sovereign HSE WatchTrackingRoboflow trackers, Apache-2.0Stable identity across frames without reintroducing copyleft after an Apache detector
Sovereign HSE WatchFrontier node classOne node of 8 x 141 GB HBM GPUs (H200 class)1,128 GB holds the 904 GB FP8 footprint with KV cache headroom
Sovereign HSE WatchEdge compute classThe operator's NPU/GPU accelerators, sized from measured stream and decode loadSizing is stated as a requirement and verified at the phase-one survey
Sovereign HSE WatchCameras reused subject to ONVIF reuse gatesThe existing Vision AI IP camera estate, stream evidence, with gaps priced as newReuse on measured density, angle and class purchases
Sovereign HSE WatchTime synchronization holdover, driving linuxptp and chronyOCP Time Card GNSS grandmaster with cameras and process tagsOne defensible chronology across detectors,
Sovereign HSE WatchEdge orchestration disconnected installRed Hat OpenShift AI self-managed, model serving, registry, pipelines andDocumented disconnected procedure for workbenches
Sovereign HSE WatchServing runtimes nodeKServe at the edge, vLLM on the centralModel serving matched to each tier's load
Loop Integrity WatchModel registerZero entries; all integrity logic is deterministic thresholds and rulesThe failure modes are physical and protocol-level, so no learned model is needed, no weights are held and no license question arises
Loop Integrity WatchHardware classFlameproof enclosure disciplineThe junction boxes sit in the classified area, so the enclosure class is chosen against the zone at each exact position, not by part number
Loop Integrity WatchHardware classArea classification as the gating documentThe zone, gas group and temperature class are read from the operator's current classification drawing before any hardware is specified, and the position list is countersigned
Loop Integrity WatchHardware classReading an Ex certification markingThe Eex'n' marking is a Zone 2 restricted-breathing class, so a Zone 1 position would force a different, heavier enclosure and must be caught before ordering
Loop Integrity WatchHardware classEquipment protection levels drive the purchaseProtection levels, not catalog convenience, decide the explosion proof junction boxes, 24VDC power supplies, breakers and M20 Exd glands
Loop Integrity WatchSensingradar tank gauges on all 13 tanksThese are the field devices whose readings must arrive continuous, undistorted and unswapped; the design improves their signal path without modifying them
Loop Integrity WatchSensing24VDC field power suppliesThey power the boosters and the loop electronics, and their health is a named failure mode with its own degraded status
Loop Integrity WatchSensing3-core 2.5 sq.mm CU/PVC/SWA/PVC loop cablingThe loop cabling is the medium the distortion travels in, so its schedule is recorded in the as-built against each loop
Loop Integrity WatchSensingModbus RTU loop polling via the boostersThe polling cycle is the pace of truth for every check, and the boosters are what make the three loops readable end to end
Loop Integrity WatchPatternSystem of Context, primaryThe central inventory picture is an ontology projection over the gauging host, never a shadow copy, so there is one place where tank truth lives
Loop Integrity WatchGroundThe operator's own site application server, on-premisesThe two containers run inside the operational technology boundary on the operator's own hardware, consistent with the Pakistani Cloud First posture, so nothing about tank truth depends on a link leaving the site
Corridor GuardModelPaddleOCR-VL 1.6, a vision-language document parser of about 0.9 billion parameters, bf16 precision, Apache-2.0Digitises the scanned package under a license the operator holds outright, running as released with human reconciliation before any value enters the register
Corridor GuardModelCDEGS or COMSOL, industry-recognized validated electromagnetic and grounding software at the site tierThe governing clauses require validated software and score unsupported modelling lower, so the interference physics never leaves mandated tools
Corridor GuardHardware classOne server-class host of the 48 GB PCIe inference GPU class inside the operator's estateHolds the parser weights under 2 GB and leaves the balance of the card for concurrent solver runs and parser sessions
Corridor GuardSizing ruleWeights against usable memory first, solver memory with headroom second; context length never bindsThe parser reads single scanned pages, so the kv cache ceiling is never the constraint the card is sized on
Corridor GuardSensingPipe-to-soil DC potential at corridor test points, in volts against the copper-copper sulfate electrode with the protective criterion at -0.85 V, plus four-pin soil resistivity by corridor sectionThe physical world is sensed by electrical measurement, not imaging: no camera duty exists anywhere in the scope
Corridor GuardPatternA provenance-carrying validation register, marking every attribute measured, inherited, assumed or unknownData errors are the contractor's cost, so every correction has to be traceable and cost-defensible
Corridor GuardPatternA re-runnable model handed over on the operator's own hardware, with no consultant-side copy surviving handoverThe compiled records and software are the procuring agency's absolute property, and a federal public sector corporation sits under the national cloud-first policy
Corridor GuardGroundOne site-tier host on existing power and cooling inside the operator's facilityNo field compute, no new network and no data crossing the boundary, so the stack runs where the data already sits
Pipeline Integrity WatchFrontier work surface modelMistral Large 3 675B (Instruct), FP8, about 682 GB of weightsApache-2.0 with no field-of-use restriction or Entity-List exposure; carries the assistant, the compliance agent and the work surface on one control-center node
Pipeline Integrity WatchTelemetry forecasterChronos-2, about 0.48 GB at 32 bitZero-shot covariate forecasting with residual anomaly detection; small enough to run offline on the station edge boxes
Pipeline Integrity WatchCamera detectorRF-DETR Apache sizes at BF16, about 61 to 68 MB for Nano to Large, about 254 MB for 2XLApache-2.0 checkpoints only with the version pinned; fine-tunable on site footage and exportable to the edge NPU
Pipeline Integrity WatchRetrieval embeddingBGE-M3, MIT, about 1.1 GB at fp16Hybrid dense and sparse retrieval in one pass keeps tag names, error codes and part numbers findable
Pipeline Integrity WatchEdge compute classVolume-production modules in 7W to 60W envelopesChosen by thermal envelope for station cabinets; runs the station models offline and needs no export license for a domestic install
Pipeline Integrity WatchHazardous-area groundEdge Compute Enclosures In Hazardous AreasStation electronics sit inside classified areas, so the enclosure class is a design input, not an afterthought
Pipeline Integrity WatchOne-way egressOne Way Path Out Of An OT Zone and Data Diode One Way TransferTelemetry and evidence leave the OT zone with no return path to misconfigure
Pipeline Integrity WatchPlacement ruleWhen Inference Belongs At The EdgeDetection survives backhaul loss at the station; reasoning stays where the context and the people live
Pipeline Integrity WatchSensingPassive OT network taps at every station and both control centers, fixed methane point sensors at the highest risk stations, vibration sensors on compressor frames and bearing housings, discharge temperature probes, existing line pressure and flow transmitters, PTP grandmaster clocksThe physical coverage every model in this table reads
Pipeline Integrity WatchStanding patternsSystem of Context as the primary architecture, zone-and-conduit boundary, edge-first detection, shadow mode before any controller-facing alertEvery row above was tested against these patterns before it was committed
Pipeline Integrity WatchGround it runs onOperator-owned control-center GPU node and station cabinets, K3s, Triton Inference Server, vLLM, Harbor registryOpen weights held outright on premises, inside the operator's boundary, with updates through an approved change path

How much compute and hardware does AI in oil and gas need?

The compute follows from the models: the published oil and gas designs size it as follows, from no new hardware to a full GPU node.

DesignPartThe design
Sovereign HSE WatchFrontier computeOne node of eight 141 GB HBM-class GPUs holds GLM 5.3 at FP8 (753 GB of weights, 904 GB with headroom)
Sovereign HSE WatchThe hard dependency141 GB-class accelerators need a US export licence for Pakistan (Country Group D:4); the rollout's first gate confirms installed hardware first
Loop Integrity WatchComputeTwo containers on the operator's own site application server, inside its OT boundary
Loop Integrity WatchField scope13 fuel tanks on 3 Modbus RTU loops; 3 booster installations engineered from a measured signal survey inside explosion proof junction boxes
Corridor GuardComputeOne server-class host of the 48 GB PCIe inference GPU class inside the operator's estate; no field compute, no cloud, nothing crosses the boundary
Pipeline Integrity WatchComputeAt each station, volume production edge modules in 7W to 60W envelopes inside hazardous area enclosures, detecting through backhaul loss; centrally, one node of eight 141 GB HBM-class GPUs in the gas control center

Is it cheaper to own AI hardware or rent cloud GPUs in oil and gas?

Each oil and gas design prices three years of ownership in its Appendix A, with every price cited, against renting the same capacity from a cloud region at its deepest three-year commitment where hardware is bought.

DesignLineThree years
Sovereign HSE WatchThree-year cost, ownedAbout 670,000 US dollars with support and power at Pakistan's industrial tariff
Sovereign HSE WatchThree-year cost, rented1.1 to 2.8 million US dollars for the same GPUs in the nearest cloud region; no hyperscaler runs a region in Pakistan
Loop Integrity WatchThree-year costNo compute to price; the field equipment is priced by OEM quotation against the survey (Appendix A)
Corridor GuardThree-year costAbout 19,500 US dollars to own the host over three years (18,700 to 20,200), about four fifths of the deepest three-year AWS commitment for one L40S card, which could not keep the data in Pakistan in any case (Appendix A)
Pipeline Integrity WatchThree-year costAbout 465,000 US dollars to own the control center node for three years (432,000 to 485,000), about three quarters of the 625,000 the deepest AWS commitment in US East costs and well under the 1.66 million on demand; the station modules, enclosures, cameras, diodes and sensors are priced by quotation (Appendix A)

What ontology or object model does an oil and gas AI system need?

The object model is the part that makes the system an ontology rather than a pipeline: typed objects for the things in the oil and gas operation, with properties, status values and typed links. Every published design ships its object model as hyper-ontology/1 JSON that loads into Hyper Ontology.

DesignSizeObjectsDownload
Sovereign HSE Watch12 objects, 14 linksOperating Facility / Site, HSE Equipment, HSE Incident, Near Miss Report, Corrective Action, Inspection / Audit Record, HSE Document, Sensor Reading, Anomaly Event, Agent Recommendation, HSE Person, HSE Roleobjects.json
Loop Integrity Watch15 objects, 15 linksFuel Tank, Radar Tank Gauge (RTG), RTG Communication Loop, Modbus Booster (Repeater), Explosion Proof Junction Box, Gauge Reading, Data Quality Event, Central Inventory Picture, Loop Wiring As-Built, Service Order, Warranty and Support Record, OEM Authorization Letter, HSE Work Permit, Instrumentation Technician, Location Engineerobjects.json
Corridor Guard15 objects, 9 links8-inch Line, 10-inch Loop Line, Original Anode Bed, TEG Unit, Anode 1 (MP-3.40), Anode 2 (MP-6.97), Insulating Joints PFIJ, Electrode Station, HVDC Transmission System, CP Test Point, Cathodic Protection System, Soil Investigation Report, Detail of Available Data for Assessment, DC Interference Assessment, Mitigation Measureobjects.json
Pipeline Integrity Watch14 objects, 13 linksCompressor Station, Meter Station, Pipeline Segment, Compressor Unit, OT Device, Pipeline Controller, Alarm, Leak or Abnormal Operation Event, Remote Access Session, Work Order, Security Directive Control, Historian, CMMS, Hazardous Area Classificationobjects.json

Who approves the decisions an AI system makes in oil and gas?

In every published oil and gas design a named person makes the decision that changes the physical world; the system prepares it.

DesignHuman control
Sovereign HSE WatchEvery recommendation is approved or rejected by a named person; nothing executes on equipment
Loop Integrity WatchEvery data quality event is acknowledged and resolved by a named person; the location engineer signs acceptance
Corridor GuardA named corrosion control engineer closes every discrepancy and accepts every assessment; no value enters the register without provenance and no safe distance ships without its evidence
Pipeline Integrity WatchThe system never writes to a field device and shutdown stays with the certified control paths; a hardware one-way diode is the only way out of each station OT zone; every decision-influencing model runs in shadow mode before any controller-facing alert, and a named controller confirms or clears every leak event

Every answer on this page is drawn from the papers linked in it: each paper's At a glance table, model register and cost appendix. Full text for agents: llms-full.txt. Designed on Praxis; object models load into Hyper Ontology.

Want one of these designs for your own operation? Talk to us.