1. Import document collection, completeness gate & HS-code suggestion
For each consignment a broker chases the importer for the invoice, packing list and BOE particulars, checks by hand that the set is complete, then squints at the product description to work out the HS heading — slow, and the missing document only surfaces at the counter.
Trigger: Email (docs inbox) or Webhook (upload)
How the workflow runs
- Trigger
Shipment documents arrive. An Email trigger on the docs inbox (or an upload Webhook) catches the commercial invoice, packing list and BOE particulars for a consignment.
- Agent
Extract fields + check completeness. An intake agent reads each document, extracts the key fields (parties, goods description, values, quantities) and checks the set against the required-document checklist for that trade lane.
- Condition
Completeness gate. A Condition node holds the consignment as WAITING and drafts a precise chase for anything missing; only a complete set proceeds to classification.
- Agent
Suggest the HS classification. A classification-advisor agent proposes a candidate HS code from the goods description, with the tariff heading it reasoned from, a rationale and a confidence — explicitly as a suggestion for a broker to check.
- Approval
Licensed broker classifies & files. An Approval node puts the completed set and the suggested code in front of a licensed customs broker, who confirms or corrects the classification and authorizes filing. The agents never classify with finality and never file.
- Tool (MCP)
File on approval + confirm. Only after the broker approves, a Tool (MCP) node submits the entry to the customs/EDI portal and the importer is notified with the reference.
Channels & connectors
- Webhook
- Knowledge base
- Tool (MCP → customs/EDI portal)
- Approval / HITL
Outcome
Every consignment reaches the broker as a complete, extracted set with a defensible candidate HS code already drafted — so the broker spends their time deciding, not chasing paper and re-typing fields.
Why it helps
The completeness gate stops incomplete sets from reaching the counter, and the HS suggestion gives the broker a starting point with its reasoning attached; the classification and the filing stay human because they are regulated, licensed decisions — the agents assist, they don't decide.
Build spec
2 agents — 1 document-intake/completeness agent + 1 HS-classification advisor. The completeness gate, broker approval and EDI filing are workflow nodes. · Pattern: Sequential specialists: intake / completeness → classification advisor → licensed-broker approval
System prompt (paste-ready)
(Classification advisor) Propose a CANDIDATE HS classification for the goods, using ONLY the extracted description and the tariff schedule / classification notes in Knowledge. Return strict JSON {candidate_hs_code, tariff_heading, rationale, confidence 0-1, alternatives[]}. You are ADVISORY ONLY: never present a code as final, never authorize or perform a customs filing, and never state duty as owed. A licensed customs broker must review and decide the classification and the filing — if the description is ambiguous, lower the confidence and say what's missing rather than guessing.Agent roles & model tiers
Document intake / completeness — Economy tier — fast, cheap; runs once per consignment on routine extraction
Extract the key fields from the invoice / packing list / BOE particulars and check the set against the required-document checklist for the trade lane. Return {parties, goods_description, values, quantities, checklist_status: COMPLETE|WAITING, missing[], chase_message?}. Copy values exactly — never compute, correct or invent a figure; if a document is missing, draft a short chase for only the missing items.HS-classification advisor — Standard tier — reasons over the tariff schedule when the set is complete
Suggest a CANDIDATE HS code from the extracted description and the tariff schedule in Knowledge, with tariff heading, rationale and confidence. Advisory only — never final, never a filing, never a duty determination; ambiguous → lower confidence and flag what's missing for the broker.
MCP connectors
- Customs / EDI filing portal (e.g. ICEGATE-type submission) — via a Tool (MCP) node, only after broker approval
- Document intake — via the Email / upload Webhook trigger
- WhatsApp — importer chase + confirmation channel
Built-in tools
- document parsing (PDF/scan → text)
- knowledge_search (required-document checklist per trade lane + HS tariff schedule / classification notes)
Guardrails
- No final classification and no filing without the licensed-broker Approval — both agents are advisory; a licensed broker confirms the HS code and authorizes the entry
- Completeness gate: a consignment is marked COMPLETE only when every checklist item is present, so an incomplete set can never proceed to filing
- The advisor never states duty as owed and never presents a code as final — it returns a confidence and its tariff-heading reasoning for a human to check, and lowers confidence on ambiguity instead of guessing
Cost strategy
The high-frequency, routine work — extraction and the completeness check — runs on the economy tier, so the per-consignment baseline stays cheap. The standard-tier classification advisor runs only once the set is complete (the gate stops wasted work on incomplete consignments), and a premium model is never required because a licensed human makes the actual call. Cost scales with consignment volume under a per-consignment tool/token cap.
Output & delivery
Documents in → the economy intake agent extracts fields and runs the completeness gate (chasing missing items on WhatsApp) → on a complete set the advisor drafts a candidate HS code with rationale + confidence → the licensed broker confirms/corrects the classification and authorizes filing at the Approval node → a Tool node submits the entry to the customs/EDI portal and confirms to the importer; the draft, the broker's decision and the filing reference are logged.