Read Load -> Classify DG -> Check Matrix -> Flag Conflicts -> Advise Split

Dangerous-Goods Mixed-Load Segregation Checker

The agent reads every dangerous-goods line planned on one truck or container, with its hazard class and UN number, and checks each pair against the road and sea segregation tables. It returns an allowed or not-allowed verdict for every pair, with the rule reference behind it. Where two items may not travel together, it says which lines to split onto a separate load.

The Problem

The SDS tool cleared every item. It never asked if they could share a truck.

Dispatch builds a full container of small drums to save a run, and the paperwork tool prints a clean transport document for each consignment because each one, on its own, is fine. What nobody checks is that an oxidizer and a flammable liquid are three pallets apart on the same deck. The driver signs, the container ships, and the segregation breach only surfaces if there is an inspection or an incident. The planner is not carrying the IMDG and ADR tables in their head, and the deadline is in twenty minutes.

What Changes

Ask the question the SDS tool skips: can these items ride together?

The agent takes the planned load lines from the dispatch system, reads the hazard class and UN number for each, and runs every pair through the encoded road and sea segregation matrix. It returns allowed or not-allowed for each pair with the exact rule cell it used, and where a pair fails it names the lines to pull off onto a separate load. The planner sees the conflicts before the truck is loaded, not after.

Humans stay in control: the agent shows every pair verdict with its rule reference, and the dispatch supervisor decides how to split and load.

HOW THE AGENT WORKS

TRIGGERLLMAPIDECISIONACTIONWAIT
TRIGGERLoad Plan SubmittedFires when a planner marks a truck or container load ready for a segregation check.
APIRead Load LinesPulls every line on the load with its material code and quantity from the dispatch system.
APIResolve DG Class And UNLooks up the hazard class, division and UN number for each material from the dangerous-goods master built off the SDS library.
LLMPair Up And Query MatrixForms every item pair, reads the road and sea segregation cell for each, and labels it allowed or not-allowed with the rule reference.
DECISIONAny Pair Not Allowed
LLMDraft Split RecommendationFor failing pairs, suggests which lines to move to a second load so the remainder is compliant.
ACTIONSend Segregation ReportPosts the pair-by-pair verdict and the split recommendation to the dispatch channel for the supervisor to act on.
The agent does not release the load or sign the transport document. Your dispatch supervisor does. The agent takes away the memory work of holding the segregation tables in your head under a deadline.

HOW TO BUILD IT

Three levels of depth. Pick the one that matches where you are.

For the ops person who needs to understand what's involved and brief their team.

Load PlannerPlanned mixed load
The AgentWorkflow engine + LLM
Dispatch SupervisorApproves or splits load

WHAT YOUR TEAM PROVIDES ONCE

  • Load lines - the items planned on one truck or container
  • Hazard class - the dangerous-goods class and division per item
  • UN number - the identity that ties an item to its rules
  • Segregation table - the road and sea rules for what may travel together
  • Notification channel - where the conflict report lands
What happens day-to-day: a planner finishes a mixed load and submits it, the agent pairs up every dangerous-goods item, checks each pair against the segregation matrix, and returns a report showing which pairs are fine and which are not, with what to split out. The supervisor reads it and decides how to load. Clean loads come back with a short all-clear.

For the IT person or technical lead who needs to scope the integration.

INQUIRY SOURCES

Dispatch or load-planning system, one record per planned load with its line items.
Dangerous-goods master derived from the safety data sheets, mapping material code to hazard class, division and UN number.
Encoded segregation matrix for road (ADR) and sea (IMDG) as a lookup table of class-pair outcomes.

WORKFLOW ENGINE (N8N)

Receive the submitted load with its line items.
Read the load lines and material codes from the dispatch system.
Resolve each material to its hazard class, division and UN number.
Form all item pairs and look each up in the segregation matrix, keeping the rule cell.
Branch on whether any pair returns not-allowed.
Compose the pair verdicts and a split recommendation for failing pairs.
Send the report to dispatch and log the check against the load.

CONNECTS TO

Dispatch / load-planning system (Oracle Transportation Management / SAP TM / custom)Read: planned load, line items, quantities. Write: segregation check result against the load.
DG master from SDS (SAP EHS / custom SDS library)Read: hazard class, division, UN number per material. Write: none.
Segregation matrix (encoded ADR / IMDG table)Read: allowed-together outcome and rule reference per class pair. Write: none.
Notification channel (Teams / Slack / Email)Read: none. Write: pair-by-pair segregation report and split advice.
WITHOUT PMS API

Without live access the planner exports the load lines to CSV and the agent reads that against a maintained matrix file. It runs on demand rather than on submit, and the planner uploads the file and copies the result back, so some steps are manual.

WITH PMS API

With live dispatch access the agent runs on submit, reads the exact planned lines, and returns the report before loading starts. The DG master and matrix stay in one place and every check is logged against the load. Best experience.

For the person who wants to build this agent step by step. Each node below maps to an n8n workflow node.

TRIGGERNode 1
Webhook - receive the load
HTTP Webhook node that fires when a planner submits a load for checking, carrying the load id and line items.
Output: { load_id, mode, lines: [ { material_code, qty } ] }
APINode 2
HTTP Request - resolve DG data
For each material_code, call the DG master and attach hazard class, division and UN number.
Output: { lines: [ { material_code, un, class, division } ] }
APINode 3
HTTP Request - load segregation matrix
Fetch the ADR and IMDG segregation table rows for the classes present on this load.
Output: { matrix: [ { class_a, class_b, outcome, rule_ref } ] }
LLMNode 4
LLM - pair check and split
Pass the resolved lines, the transport mode and the matrix rows, ask for a verdict per pair and a split plan.
Output: { pairs, any_not_allowed, split_out, split_reason }
You are a dangerous-goods segregation checker for a chemical plant's dispatch team. You are given the items on one load, each with a UN number and hazard class, the transport mode, and the segregation matrix rows.

Transport mode: {mode}
Lines: {lines_json}
Segregation matrix: {matrix_json}

Form every unordered pair of lines. For each pair, find the matching matrix row by class pair and report the outcome as ALLOWED or NOT_ALLOWED with the rule_ref. If any pair is NOT_ALLOWED, propose the smallest set of lines to move to a second load so the remaining load has no NOT_ALLOWED pair.

Respond ONLY with valid JSON. No explanation.
INPUT
Mode sea. Lines: UN1791 class 8, UN1428 class 4.3, UN1789 class 8. Matrix: class 8 with 4.3 outcome NOT_ALLOWED rule IMDG 7.2.4 segregation group, class 8 with 8 outcome ALLOWED.
OUTPUT
{"pairs": [{"a": "UN1791", "b": "UN1428", "verdict": "NOT_ALLOWED", "rule_ref": "IMDG 7.2.4"}, {"a": "UN1791", "b": "UN1789", "verdict": "ALLOWED", "rule_ref": "IMDG 7.2.4"}, {"a": "UN1428", "b": "UN1789", "verdict": "NOT_ALLOWED", "rule_ref": "IMDG 7.2.4"}], "any_not_allowed": true, "split_out": ["UN1428"], "split_reason": "Moving the class 4.3 item off this load clears both class 8 conflicts."}
DECISIONNode 5
IF - any pair not allowed
Route to the report branch when any_not_allowed is true, otherwise send a short all-clear.
Output: true to conflict report, false to all-clear
ACTIONNode 6
Notify - send segregation report
Post the pair verdicts, rule references and split_out list to the dispatch channel and log against load_id.
Output: { report_sent: true, load_id, channel }
MVP vs Advanced — Where To Start
MVP — START HERE
  • One transport mode to start, road
  • Matrix as a maintained lookup sheet
  • Resolve class and UN from a table
  • Check all pairs on a load
  • Return verdicts with rule references
  • Post one report to dispatch
ADVANCED — ADD LATER
  • =+ Add sea IMDG alongside road ADR
  • =+ Handle segregation groups, not just classes
  • =+ Compute a real split plan across loads
  • =+ Factor quantity and packing thresholds
  • =+ Run on submit from the planner
  • =+ Keep an audit log per load

Full Video Walkthrough Coming Soon

Watch the agent catch an oxidizer next to a flammable on a planned container.

Register to be notified

Everything on this page is free to learn.

When you're ready to build — do it yourself or bring us in.

OTHER AGENTS IN LEASING & MARKETING

Checks hazard class, UN number, packaging, and papers agree before the truck loads

Frequently asked questions

Dangerous-Goods Mixed-Load Segregation Checker is an AI agent that checks if a mixed dangerous-goods load is legal to travel together.
The SDS tool cleared every item. It never asked if they could share a truck. The Dangerous-Goods Mixed-Load Segregation Checker addresses this: checks if a mixed dangerous-goods load is legal to travel together.
No. Your team stays in control. The agent does not release the load or sign the transport document. Your dispatch supervisor does. The agent takes away the memory work of holding the segregation tables in your head under a deadline.