Skip to main content
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

Challenge datasets

Public datasets, plus the private datasets you have access to.

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.

Challenge setup

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

Evaluation checks
  • 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
Configured evaluation evidence
  • Benchmark: LogiTrade-Bench
  • Classification Accuracy target: 0.95
  • 1 public reference case
Configured runtime
  • JavaScript execution harness
  • javascript sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

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

Metrics

  • classification_accuracy · Target 0.95

Benchmarks

  • LogiTrade-Bench
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON object with manifest_id, origin_country, destination_country, items array

    Output: JSON object with status, clearable, flagged_items array containing hs_code_match

    Execution harness: JavaScript

Evaluation tools

  • AI SDK · Streaming Agent SDK

Recipe freeze marker

No recipe freeze time is recorded.

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