// agent deep-dive
The Tariff Classification Agent
Every part you import needs an HS code, the codes are ambiguous by design, and the duty consequences of getting one wrong compound across thousands of shipments. An agent that classifies with its reasoning attached.
2026-08-21 · 8 min read
Harmonised System classification is a deceptively brutal problem. Every product crossing a border needs a code. The code determines the duty rate, the eligibility for trade programs, and the documentation required. The classification rulebook is a hierarchy of thousands of headings written in language that was often drafted decades before the product existed, and the correct answer frequently turns on a distinction — the material composition, the stage of manufacture, the principal function — that is not obvious from the part description in your ERP.
Manufacturers with broad catalogues live with this constantly. New parts get introduced, suppliers change, trade rules move, and every one of those events can invalidate a classification that was correct last quarter.
Why a chatbot fails at this
You can ask a general model for an HS code and it will confidently give you one. That is precisely the danger. Classification is not a recall task; it is a rules-application task with a specific legal method, and a plausible-sounding wrong code is worse than no code because it will be acted on.
Three things break the naive approach.
The input is thin. An ERP part description is often twelve characters of internal shorthand. The information needed to classify — what it is made of, what it does, how it was processed — lives in engineering drawings, supplier declarations, spec sheets and material certificates, not in the part master.
The method is prescribed. Classification follows the General Rules of Interpretation in order. An answer that arrives at the right code by the wrong route is not defensible under audit, and audit is the entire point.
The rules move. Tariff schedules are amended. Trade actions, exclusions and preferential agreements change duty consequences without changing the code. A system that classifies once and forgets is a system that quietly drifts out of compliance.
How we build it
The agent is structured to mirror how a trade compliance specialist actually works.
Assemble the product picture. Before classifying anything, the agent pulls together what is known about the part from every source available — part master, bill of materials, supplier declarations, engineering documents, prior classifications of similar parts, and any existing binding rulings on file. Where material composition or function is missing, that absence is recorded rather than guessed.
Retrieve candidates. The agent searches the tariff schedule, explanatory notes, and the client's own historical classification decisions to produce a candidate set of headings — not a single answer. The client's prior decisions matter enormously here: consistency with your own past classifications is itself a compliance requirement.
Apply the rules. For each candidate, the agent works the General Rules of Interpretation in sequence and records why a heading survives or is eliminated. The output of this step is not a code; it is an argument that terminates in a code.
Assess duty impact. With a code in hand, the agent computes the landed duty consequence under current rates, checks eligibility for preferential programs and free trade agreements, and flags exposure to active trade actions.
Score and route. The agent scores its own confidence based on how much of the product picture was actually known, how cleanly the rules discriminated between candidates, and whether the result agrees with prior decisions on similar parts. High-confidence classifications with a clean audit trail go to the queue for routine confirmation. Anything ambiguous goes straight to a specialist with the candidate set, the reasoning for each, and the specific missing fact that would resolve it.
That last part is the one clients tell us they value most. "I do not know, and here is exactly what I need to know" is far more useful than a confident guess.
Guardrails
Classification carries legal liability. We build to that reality.
The agent proposes; a licensed customs broker or trade compliance specialist disposes. No code the agent produces enters a customs filing without human confirmation. Classifications that conflict with an existing binding ruling are hard-stopped rather than overridden. And the agent never fabricates a citation — every reference to a heading, note, or ruling is retrieved from the actual source, and if it cannot ground a claim it says so.
The reasoning trail is the deliverable as much as the code is. When a customs authority asks why a part was classified as it was, the answer needs to be a documented rules-based argument, not "the system said so."
Change detection is half the value
The build that ends at "classify this part" delivers maybe half the available benefit. The other half is watching.
We wire the agent to re-evaluate when things move: tariff schedule amendments, new trade actions, changes to a part's bill of materials or supplier, and updates to the client's own ruling history. When a change would alter a code or a duty consequence, the affected parts surface as a review queue with the delta explained and the financial exposure quantified.
For a manufacturer with tens of thousands of SKUs, that is the difference between finding out about a duty exposure through an internal review and finding out through a customs penalty.
Where it lives
Practically, this agent has to reach into the ERP for part and BOM data, the PLM system for engineering documents, the supplier portal for declarations, and the trade or customs platform where filings are actually made. In most manufacturing estates those are four different systems with four different data models and at least one spreadsheet.
That integration work is unglamorous and it is where the schedule actually goes. We would rather be honest about that up front than discover it in week six.
What we measure
Agreement rate against specialist-confirmed classifications on a held-out set. Precision of the confidence score — specifically, whether the things the agent called high-confidence were actually right, because a confidence signal you cannot trust is worse than none. Coverage, meaning the share of the catalogue that can be classified at all with the data available. Cycle time per part. And duty exposure identified through change detection, which is the number that tends to justify the build.
What it does not do
It does not file. It does not make the final call on an ambiguous heading. It does not replace your broker. It classifies at a volume and consistency a human team cannot match, shows its work, and escalates honestly when the data will not support a defensible answer.
We build agentic workflows across manufacturing and distribution — production line, pricing, tariff, inventory, dealer and claims. Describe your setup in the console, or run /estimate to scope it.