Customs & Trade-Compliance Agents

10 min read

Y46
Playbook · Domain Playbooks

Customs & trade-compliance agents: the regulated boundary is the sixth digit, not the accuracy.

A tariff code is a legal determination with a penalty schedule attached, and US Customs has already drawn the line your architecture has to respect: in ruling HQ H350722, dated 16 January 2026, CBP treated classification to six digits as shareable, and held that deriving subheadings beyond the six-digit level for goods that will or may be entered is customs business, generally requiring a licensed broker. Build the agent to stop at six digits unless a licensed broker owns the decision logic and the determination — and make its real output a precedent-cited recommendation, because an uncited confident ten-digit code is not an error, it is exposure.

Step 1Know where the licensing line falls, because it is a line in the digits.

Harmonized System codes are international to six digits; the US extends them to ten in the HTSUS, and those last four digits carry the duty rate, the trade-remedy exposure and the statistical reporting. H350722 concerned an unlicensed foreign platform that connected importers to brokers, used OCR to lift entry data off shipping documents, filed CBP Form 5106 for new importers, and offered an AI tool that suggested HTS subheadings. The holding reported across commentary on the ruling is unusually clean for a builder.

  • Six digits: shareable. Classification at the international HS level is treated as permissible to provide, and a general classification database with a meaningful disclaimer can stay on the right side of the line.
  • Beyond six digits, for goods that will be entered: customs business. If the information will or may eventually be used for an entry, deriving the subheading generally requires a customs broker's licence. The trigger is the use, not the confidence.
  • A disclaimer is not a universal cure. CBP accepted one for a general database, in contrast with the earlier HQ H290535; it did not accept disclaimers as a way to hand entry-specific codes to importers without a licence.
  • The ruling is about licensing, not quality. Commentary is emphatic that it should not be read as any endorsement of AI classification accuracy, and that the importer's reasonable-care duty under 19 U.S.C. § 1484 is unchanged by it.

Read it against what teams actually build and the mismatch is obvious: the default product is "upload your catalogue, get ten-digit codes," which is precisely the shape the ruling addresses. The fix is not a better model. It is deciding, before you write the prompt, whether you are building a six-digit research tool for anyone or a ten-digit determination tool that lives inside a licensed broker.

This is US law and it is one ruling. Other jurisdictions draw the line differently — the UK and EU regimes have their own rules about who may classify for entry — so treat the six-digit boundary as the US design constraint and re-derive it per market before you ship there. Rulings are also revocable and fact-specific; read the text of H350722 rather than anyone's summary, including this one.

Step 2A tool is not a "person" — so put a licensed human on the decision logic, not just the output.

The subtler holding is the one that constrains your pipeline rather than your UI. CBP is reported to have stated that an automated tool is not a "person" under the broker regulations, with the consequence that a licensed broker must set the tool's decision logic and make the actual classification decision. That is a stronger requirement than human review of results, and the difference is where most designs quietly fail.

  • Review of outputs is not ownership of logic. A broker clicking approve on a list of 4,000 codes is not setting decision logic; they are rubber-stamping a system whose reasoning they did not specify. Put the broker upstream: they own the classification rules, the General Rules of Interpretation sequence the agent must follow, the product-attribute questions it must resolve, and the thresholds at which it must refuse.
  • Make the logic inspectable and versioned. If the broker owns it, they must be able to read it, change it and point to which version governed a given entry. A prompt that nobody can diff is not a rule set. This is the same discipline as policy enforcement: the policy is an artifact, not a disposition.
  • Name the accountable individual per determination. Entries are signed. The architecture has to carry a person's identity through to the filing, which is the general argument in accountability and roles.
  • Refusal is a feature, not a failure. The agent must be able to return "I cannot classify this at the subheading level" and route to the broker. An agent that always produces a code has no way to express the one thing the regime most wants to hear.

Step 3Build it as retrieval against precedent, not classification by judgement.

This domain has something most agent domains lack: an authoritative, public, searchable body of prior determinations. CBP publishes its rulings in CROSS, and an importer can request a binding ruling under 19 CFR Part 177 and get a determination that actually binds. That changes the right architecture completely. The job is not "decide what this product is." It is "find the determination that already governs a product like this, and show it."

  • Every proposed code cites a ruling, an Explanatory Note, or a GRI path — or it is not a proposal. No citation, no output. This is grounding as an architectural constraint, enforced by a check rather than requested in a prompt, exactly as in KYC onboarding.
  • The retrieval problem is product-attribute matching, not text similarity. Rulings turn on composition percentages, function, state of assembly and intended use. A semantic match on "steel bracket" that ignores a 60% aluminium content has retrieved a ruling that governs a different good — the characteristic failure, and it reads exactly like a correct answer. Make the agent state which attributes matched and which did not, and treat an unmatched material attribute as a stop, not a caveat.
  • "Request a binding ruling" is a first-class output. For a novel or high-value product line, the correct answer is often a ruling request, not a code. An agent that can draft the Part 177 submission — with the attributes, samples and competing headings already assembled — is doing the most valuable thing available to it, and it is work no licence question touches.
  • Pin the tariff version. Schedules change, and a code correct in March can be wrong in July. Record which HTSUS revision and which ruling set were in force when the determination was made, the index freshness problem with a statutory consequence.
# the output contract: a recommendation is a citation plus a gap list
{
  "hs6": "730890",                      # shareable per H350722
  "hts10": null,                          # withheld unless a licensed broker owns the decision
  "basis": ["NY N301234", "GRI 3(b)"],
  "attributes_matched": ["function", "state_of_assembly"],
  "attributes_unresolved": ["alloy_composition_pct"],   # blocks, does not warn
  "htsus_revision": "2026 rev 4",
  "escalation": "request_binding_ruling"
}

The attributes_unresolved field is the one that earns its keep. A classification agent's value is not the codes it produces; it is the specific question it hands a human — "we need the alloy percentages for SKU 4471" — because that question is answerable in minutes and converts an unclassifiable item into a classifiable one. Measure the agent on unresolved-attribute questions answered per week, not on codes emitted.

Step 4Reasonable care is a process standard, so the deliverable is the evidence of care.

Since the Customs Modernization Act the importer carries the burden of exercising reasonable care in classifying and valuing goods. Reasonable care is not a result — a wrong code can be reasonable and a right code can be careless. It is a standard about what you did, which means the thing that protects you is a record of the process, not the answer.

There is a reported holding here that bears directly on how you present an agent's output. In HQ H290535, CBP is quoted as saying that "mere reliance" by an importer on classification advice from a supplier who was not a broker or other qualified expert does not establish reasonable care. Commentary draws the obvious inference for AI tools: using one to narrow the candidates and then having a qualified expert verify supports reasonable care, while filing a machine-generated code with no human check works against it.

  • Retain what was consulted, not just what was concluded. The rulings retrieved, the ones considered and rejected, the GRI sequence applied, the tariff revision, the expert who signed. This is audit-trail work with a defined audience.
  • Snapshot the sources. Rulings are revoked and modified; a link is not evidence of what you read. Keep the retrieved text as it stood at determination time under a retention clock sized to the statute, which commentary generally puts at five years.
  • Record the expert's actual contribution. "Approved" is weak. "Changed the heading from 7308 to 7326 because the article is not a structural part" is a record of care by a named person — and it is also your best training signal.
  • Do not let the agent's fluency substitute for expertise. A well-written classification rationale from an unqualified source is, on the reported reading of H290535, closer to the thing that fails the standard than to the thing that meets it.

Step 5The penalty ladder prices your design choices.

Civil penalties for entry-related violations sit under 19 U.S.C. § 1592, and the tiers are a culpability ladder rather than a flat fine. As commonly summarised: negligence exposes you to the lesser of the domestic value or two times the lost revenue; gross negligence to the lesser of the domestic value or four times the lost revenue; and fraud up to the domestic value of the merchandise. Duties are owed on top in any case.

Notice what the ladder rewards, because it is not what an eval harness usually optimises. The expensive variable is not the error rate, it is the culpability attached to an error, and culpability turns on what you knew and what your process was. Two systems with identical accuracy can sit two tiers apart.

  • A confident uncited code is the worst output shape. It maximises the chance of filing, minimises the chance of review, and leaves no record of care — the exact combination that argues for the higher tier.
  • Calibrated abstention is worth more than marginal accuracy. An agent that classifies 70% of a catalogue with citations and refuses the rest beats one that classifies 95% with no basis, because the 5% in the second case are indefensible and the 30% in the first are simply unfinished. Calibration is the load-bearing capability.
  • Never let the agent tune toward a duty rate. If a workflow or eval metric rewards lower duty outcomes, you have built an incentive to shade classifications, which is how negligence becomes something worse. Keep duty impact out of the agent's objective entirely; it belongs in a human's commercial review, downstream of the determination.
  • Separate classification from valuation and origin. They are different determinations with different evidence and different failure modes, and bundling them into one output means one weak link contaminates the record of all three.

Step 6Re-classifying your history is an election, not an audit.

The most attractive first use case is the one to think hardest about. Pointing the agent at several years of past entries is cheap, fast and will find errors — and the moment it does, you are no longer in the same legal position you were in that morning. Knowledge is an input to the culpability ladder in STEP 5. Continuing to file the way you have been filing, after a system you built told you it was wrong, is a materially worse posture than never having looked.

That is not an argument against looking. Prior disclosure exists precisely for this: commentary on § 1592(c)(4) describes a voluntary disclosure made before CBP initiates a formal investigation as sharply reducing penalty exposure, with negligence cases commonly coming down to the back duties and interest. The point is that the disclosure decision is now on a clock, and the clock started when your agent produced a finding nobody asked it for.

  • Decide the disposition path before the first historical run, not after. Who sees findings, who decides on disclosure, within what window. An unowned finding sitting in a dashboard is the worst of both worlds: you have the knowledge and none of the mitigation.
  • Run it under privilege where that is available to you, and take that advice from counsel rather than from this page. The output of a historical re-classification is a legal risk assessment, and how it is scoped and who it is addressed to matters.
  • Separate the forward and backward systems. Prospective classification wants high throughput; retrospective review wants high precision, tight scope and a human on every finding. Running one pipeline for both produces a flood of low-confidence historical "errors" that nobody can triage and that you now know about.
  • Start narrow and deliberately. One product family, one year, a sample sized to tell you whether there is a systemic problem. You are buying information about whether to look further, which is a different purchase from fixing everything.

If you build one thing first, build the six-digit research assistant with mandatory citations and an unresolved-attribute queue, inside the licensing line, pointed at new products. It is the version that needs no broker on the critical path, produces the questions that actually unblock your classification backlog, and generates the record of care you will want later — and it does not start a clock you have not decided how to answer.