Challenge

Build a Cross-Border Trade & Customs Compliance Agent with Vercel AI SDK

Logistics operators face expensive customs delays when cross-border shipping manifests contain misclassified Harmonized System (HS) code descriptions. Build a streaming TypeScript agent using Vercel AI SDK to analyze bill-of-lading documents, validate HS tariff codes, and flag import compliance issues in real time.

Workflow AutomationHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Create a full-stack TypeScript agent with Vercel AI SDK to automate customs manifest checks and cross-border trade document validation.

Delivery guide

How work is evaluated

Evaluation

Evaluates Vercel AI SDK agent ability to stream line-item validation and detect invalid HS codes in shipping manifests.

Datasets

Shared data for this challenge

Review public datasets and any private uploads tied to your build.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

hs_code_verification_pass

Ensures correct HS code match clears the manifest without error flags

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

classification_accuracy

Accuracy of trade restriction detection across test manifest batch • target: 0.95 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Build dynamic full-stack TypeScript agents using Vercel AI SDK (`ai` package)

  • Implement streaming UI tool call feedback loops with `streamText` and `generateObject`

  • Parse shipping manifest line items and query ASEAN Single Window HS code tables

  • Generate structured trade compliance clearance certificates with error logs

Resources and assets

Reference links and supporting material

Dataset notes

Synthetic ASEAN bills-of-lading and Harmonized System tariff reference tables.

How this agent runs

Evaluates Vercel AI SDK agent ability to stream line-item validation and detect invalid HS codes in shipping manifests.

Challenge input

JSON object with manifest_id, origin_country, destination_country, items array

AI SDK

Offers typed structured object generation and streaming UI tools

Evaluated output

JSON object with status, clearable, flagged_items array containing hs_code_match

Checks for
  • Ensures correct HS code match clears the manifest without error flags
  • Accuracy of trade restriction detection across test manifest batch • target: 0.95 • range: 0-1
Proof of success
  • Benchmark: LogiTrade-Bench
  • Classification Accuracy target: 0.95
  • 1 public reference case
Runtime evidence
  • JavaScript execution harness
  • javascript sandbox (unavailable on Versalist)
View technical recipe

Configured tools

Action Space
  • Vercel AI SDK · Required
  • Zed · Optional
  • Evidently AI · Optional
Orchestration
  • Vercel AI SDK · Required

Evaluation contract

  • hs_code_verification_pass · Weight 1
  • classification_accuracy · Weight 1

Recipe state

This is a preview. The configuration can change before the evaluation recipe is locked.

Frequently Asked Questions about Build a Cross-Border Trade & Customs Compliance Agent with Vercel AI SDK