How the AI agents work
The atomic units that classify, screen, and price every entry — and how they stay grounded.
The atomic units that do the work on every Commers entry. Each agent, explained — one MD per agent: what it does, the contract, how it's built (model, prompt, retrieval), and how it stays grounded. It's the source of truth for how each agent works today. The methodology + roadmap (model choice, GRI, GRI×CROSS, improvement plan) live in How the AI classifies goods; the cross-agent map + shared infra live in AI architecture.
What counts as an "agent" here
We use the word loosely. Three senses, all worth tracking in one place:
- LLM agents — a single Claude call with a tightly-scoped prompt, structured (Zod-validated) output, and prompt caching. Single-purpose by design. Not autonomous loops.
- Deterministic services — code, not models, but they do agent-like work (decide, score, route). Worth specifying alongside the LLM agents because the broker can't tell which is which from the UI, and a customs audit can't either — both need to be defensible.
- Orchestrators — single-purpose pipelines that compose the agents above into a user-facing artifact (a landed cost estimate, a CBP response package). They don't add their own LLM call; they assemble what the upstream agents already produced. Listed as agents because they have the same contract shape (typed input, structured output, documented when-they-fire) and the user-facing surface treats them as units.
We deliberately do not run multi-step agentic loops on customs work. Every number on a filed entry must trace to a regulatory source or a documented model — an open-ended agent loop is not defensible to CBP, to a bond underwriter, or in a 19 USC 1592 penalty proceeding.
The lineup (today)
| # | Agent | Kind | Runs on | One-liner |
|---|---|---|---|---|
| 1 | HTS Classifier | LLM (Claude Sonnet) | every line, every entry | Classifies a product description to a 10-digit HTSUS code with cited precedent |
| 2 | Document Extractor | LLM (Claude Sonnet, vision) | every uploaded PDF/image | Parses a commercial invoice / packing list / BoL into structured fields |
| 3 | Denied-Party Screener | Deterministic | every party on every entry | Fuzzy-matches supplier/importer/consignee against 31K+ US sanctions records |
| 4 | Duty Calculator | Deterministic | every classified line | Stacks base HTSUS + Section 301, Section 232, IEEPA, Section 201 into an effective rate |
| 5 | Risk Modeler | Deterministic | every entry post-screening | Returns an expected detention cost as a transparent range |
| 6 | Autopilot | Deterministic state machine | every entry, every transition | Routes entries through draft → ai_review → ready → filed → cleared |
| 7 | Audit Responder | Orchestrator (deterministic) | on demand, per CF-28 / CF-29 | Composes a structured response package for a CBP post-entry inquiry: cover letter, cited evidence, suggested actions, exposure assessment. Stitches together facts the other agents already produced — no fresh LLM call. |
| 8 | Landed Cost Simulator | Orchestrator (deterministic) | on demand, pre-PO | Composes the Classifier + Screener + Duty Calculator + Risk Modeler into a methodology-cited landed cost estimate before the importer signs the PO. The "$120K cotton tees → 159% effective rate" demo number lives here. |
| 9 | Drawback Advisor | Orchestrator (deterministic) | post-clearance, on broker review | Surfaces CBP duty drawback opportunities (19 USC 1313) — recovers up to 99% of duty paid on imports subsequently exported / destroyed / used in manufacturing of exported goods. The only revenue-aware agent: turns "fee for service" into "share of recovered duty." |
Composition
These aren't isolated. The Simulation pipeline (the demo you'd run for an investor or a prospect) chains them like this:
PDF
│
▼ Document Extractor (LLM) ─── structured invoice ───┐
│
▼ HTS Classifier (LLM, RAG-grounded) ─── 10-digit HTS + conf ──┤
│
▼ Denied-Party Screener (deterministic) ─── block / review / clear┤
│
▼ Duty Calculator (deterministic) ─── 159% effective stack ─┤
│
▼ Risk Modeler (deterministic) ─── $22K-$94K range ──────┤
│
╔═══════════════════════╗ │
║ SimulationResult ║◄┘
║ + Methodology citation║
╚═══════════════════════╝
The two LLM calls happen in parallel where possible. The deterministic services run after the LLM ones because they need the classified HTS code to do their work.
What we deliberately don't have (yet)
- No autonomous tool-using agents. No "agent loops" that decide what API to call next. Phase 2 candidate: an Autopilot variant that watches CBP CSMS messages and proposes exclusion requests — but only after the data flywheel is rich enough to evaluate it.
- No multi-modal agents that compose freight + customs + payment. Freight rates are scoped (Freightos / Xeneta integration). Until then, freight is out of the Simulation explicitly (see methodology §What's NOT in the simulation).
- No "explain this entry" chat agent. The Methodology modal carries the explanation today. We've held off on a chat UI because brokers have repeatedly told us they don't want one — they want decisions, not conversations.
Put your own book of entries through Commers.