Customs Agent

At a glance

  • Live at: Adani Ports (primary)
  • Channels: API (document processing), email (notifications)
  • Languages: EN
  • Owner: Ports pod
  • Key use case: Automated customs document validation and pre-filing preparation

The problem it solves

Customs clearance is document-heavy and error-prone. A single import or export shipment involves multiple documents — Bill of Entry (BoE), Bill of Lading (BoL), Delivery Order (DO), Let Export Order (LEO), Shipping Bill — each with mandatory fields, cross-references, and regulatory requirements.

Manual document checking is slow and misses errors. A wrong HS code, a mismatched consignee name, or a missing field means the shipment gets held at customs — adding days of delay and potentially triggering penalties.

How it works

Step by step

  1. Document intake — Customs documents arrive via API (uploaded by CHA, broker, or internal ops).
  2. Field extraction — Uses OCR and LLM parsing to extract structured data from each document.
  3. Cross-validation — Checks consistency across documents:
    • Consignee name matches across BoE and BoL
    • HS codes are valid and match the commodity description
    • Weights and quantities match between documents
    • Reference numbers cross-reference correctly
  4. HS code validation — Validates HS (Harmonized System) codes against the tariff database. Flags potentially incorrect classifications.
  5. Pre-Bayan preparation — For the Saudi/GCC market, prepares the pre-Bayan customs declaration filing with validated data.
  6. Discrepancy handling — Flags mismatches with specific details (which field, which documents, what the expected value should be) and notifies the relevant party.
  7. Filing readiness — Marks the shipment as ready for customs filing once all validations pass.

Supported document types

DocumentAbbreviationUsed for
Bill of EntryBoEImport customs declaration
Bill of LadingBoLProof of shipment from carrier
Delivery OrderDOAuthorization to release cargo
Let Export OrderLEOCustoms approval to export
Shipping BillSBExport customs declaration
Pre-Bayan declarationGCC customs pre-filing

Integration with other agents

At Adani Ports, the Customs agent works alongside:

  • Appointment agent — Dock slots depend on clearance status; customs clearance triggers slot availability
  • Demurrage prevention agent — Customs delays are a top cause of demurrage; the customs agent’s speed directly reduces charges

Tech stack

LayerWhat’s used
ModelsLLM for document parsing + field extraction. Classification for HS code validation.
MemoryShort-term: document set context. Long-term: historical filing patterns, known discrepancy types.
Tools (MCP)ProjectX API (consignment data), tariff database lookup, document storage, email notification.
GuardrailsCannot file customs declarations directly (human approval required). Read-only for financial fields.
EvalsDocument accuracy (extraction correctness), cross-validation precision/recall, HS code validation accuracy.

Sources

Changelog

  • 26 May 2026: Full content from Adani Ports deployment details and Drive decks.