How the work gets done

How the AI agents work

The atomic units that classify, screen, and price every entry — and how they stay grounded.

4 min readUpdated Jul 17, 2026

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:

  1. 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.
  2. 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.
  3. 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)

#AgentKindRuns onOne-liner
1HTS ClassifierLLM (Claude Sonnet)every line, every entryClassifies a product description to a 10-digit HTSUS code with cited precedent
2Document ExtractorLLM (Claude Sonnet, vision)every uploaded PDF/imageParses a commercial invoice / packing list / BoL into structured fields
3Denied-Party ScreenerDeterministicevery party on every entryFuzzy-matches supplier/importer/consignee against 31K+ US sanctions records
4Duty CalculatorDeterministicevery classified lineStacks base HTSUS + Section 301, Section 232, IEEPA, Section 201 into an effective rate
5Risk ModelerDeterministicevery entry post-screeningReturns an expected detention cost as a transparent range
6AutopilotDeterministic state machineevery entry, every transitionRoutes entries through draft → ai_review → ready → filed → cleared
7Audit ResponderOrchestrator (deterministic)on demand, per CF-28 / CF-29Composes 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.
8Landed Cost SimulatorOrchestrator (deterministic)on demand, pre-POComposes 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.
9Drawback AdvisorOrchestrator (deterministic)post-clearance, on broker reviewSurfaces 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.
Ready to see it live?

Put your own book of entries through Commers.