Task Catalog
Every parcel runs through a coordinated agent graph rather than a single call. The Router classifies the incoming parcel and dispatches it to one of the 18 worker specialists below; the Verifier checks the worker's output and can bounce it back; the Exceptions Specialist makes the final call on high-stakes or low-confidence items. See the multi-agent pipeline for how the roles fit together.
Each task's output schema is the single source of truth (the Zod schema in src/tasks/schemas.ts), from which the prompt instruction, the tolerant parser, the grader's field list, and the focus-card rows all derive. This page is generated from that registry + the scenario pool.
The agent rolesโ
| Role | Step | What it does | |
|---|---|---|---|
| ๐ฆ | Router | route | Reads the incoming parcel (label photo + manifest line), classifies the exception type and modality, and dispatches to the right worker. |
| ๐ง | Worker | work | The specialist task agent โ extracts the structured answer (parsed address, damage verdict, HS code, etc.) against the task schema. |
| ๐ | Verifier | check | Independently reviews the worker's output against the source โ does the parsed address match the label? does declared value match the invoice? |
| โ ๏ธ | Exceptions Specialist | decide | A heavier second-look agent, invoked only for high-stakes or low-confidence items: customs holds, hazmat, high-value, suspected tamper. |
| ๐งญ | Orchestrator | decide | Runs the per-item graph and applies the retry/escalate/accept policy, emitting the final routing decision plus a coordination trace. |
Worker specialistsโ
18 task types ยท 111 scenarios, spread across all four modalities.
| Task | id | Modality | Difficulty | Scenarios | |
|---|---|---|---|---|---|
| ๐ท๏ธ | Label Parse | label-parse | Vision | 1 | 7 |
| ๐ฆ | Damage Assess | damage-assessment | Vision | 2 | 6 |
| โฃ๏ธ | Hazmat Check | hazmat-detection | Vision | 3 | 6 |
| ๐งพ | Customs Invoice | customs-invoice | Document | 2 | 6 |
| ๐ | Seal / Tamper | seal-tamper | Vision | 3 | 5 |
| ๐ | Manifest Recon | manifest-recon | Document | 1 | 6 |
| ๐ | Tariff Class | tariff-classification | Text | 2 | 7 |
| ๐ฆ | Exception Route | exception-routing | Text | 1 | 7 |
| ๐ | Dim/Weight | dim-weight | Vision | 2 | 6 |
| ๐งฑ | Pallet Check | pallet-check | Vision | 2 | 6 |
| ๐ | Address Check | address-validation | Text | 1 | 6 |
| ๐ | Carrier Select | carrier-select | Text | 1 | 6 |
| โฑ๏ธ | SLA / ETA | sla-risk | Text | 2 | 7 |
| โฉ๏ธ | RMA / Return | rma-disposition | Text | 2 | 6 |
| ๐ | Restricted | restricted-screening | Text | 3 | 7 |
| ๐ | Docs Check | docs-completeness | Document | 1 | 6 |
| โ๏ธ | Handwritten | handwritten-label | Vision | 3 | 5 |
| ๐๏ธ | Conveyor Cam | conveyor-incident | Video | 3 | 6 |
Task detailsโ
๐ท๏ธ Label Parseโ
label-parse ยท Vision ยท difficulty 1 ยท 7 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
carrier | string |
trackingNumber | string |
serviceLevel | string |
address | string |
Example scenario โ lp-7 โ adversarial (Water-damaged Yodel label (hard).):
{
"carrier": "Yodel",
"trackingNumber": "JD000223344556",
"serviceLevel": "ECONOMY",
"address": "9 Mill Lane Leeds LS1 5PU"
}
๐ฆ Damage Assessโ
damage-assessment ยท Vision ยท difficulty 2 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
damaged | boolean |
damageType | crushed | wet | torn | none |
severity | number |
action | accept | repackage | refuse |
Example scenario โ dm-2 โ adversarial (Badly crushed corner โ refuse.):
{
"damaged": true,
"damageType": "crushed",
"severity": 4,
"action": "refuse"
}
โฃ๏ธ Hazmat Checkโ
hazmat-detection ยท Vision ยท difficulty 3 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
unClass | string |
compliant | boolean |
labelMissing | boolean |
Example scenario โ hz-2 โ adversarial (UN class 8 corrosive โ required label missing (mislabel).):
{
"unClass": "8",
"compliant": false,
"labelMissing": true
}
๐งพ Customs Invoiceโ
customs-invoice ยท Document ยท difficulty 2 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
hsCode | string |
declaredValue | string |
countryOfOrigin | string |
Example scenario โ ci-2 โ adversarial (Suspected customs undervaluation (adversarial).):
{
"hsCode": "6110.20",
"declaredValue": "USD 180.00",
"countryOfOrigin": "BD"
}
๐ Seal / Tamperโ
seal-tamper ยท Vision ยท difficulty 3 ยท 5 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
sealIntact | boolean |
tampered | boolean |
flag | clear | tamper | unknown |
Example scenario โ st-2 โ adversarial (Seal broken / tampered โ flag TAMPER.):
{
"sealIntact": false,
"tampered": true,
"flag": "tamper"
}
๐ Manifest Reconโ
manifest-recon ยท Document ยท difficulty 1 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
expected | number |
scanned | number |
missing | number |
Example scenario โ mr-4 โ adversarial (Over-delivery โ 7 extra (adversarial).):
{
"expected": 64,
"scanned": 71,
"missing": 0
}
๐ Tariff Classโ
tariff-classification ยท Text ยท difficulty 2 ยท 7 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
hsCode | string |
dutyCategory | duty-free | low-duty | standard | high-duty |
Example scenario โ tf-5 โ adversarial (Whisky โ high duty (adversarial).):
{
"hsCode": "2208.30",
"dutyCategory": "high-duty"
}
๐ฆ Exception Routeโ
exception-routing ยท Text ยท difficulty 1 ยท 7 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
category | string |
queue | string |
priority | P1 | P2 | P3 |
Example scenario โ er-4 โ adversarial (Hazmat safety hold, P1 (adversarial).):
{
"category": "safety-hold",
"queue": "hazmat-specialist",
"priority": "P1"
}
๐ Dim/Weightโ
dim-weight ยท Vision ยท difficulty 2 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
declaredLengthCm | number |
declaredWidthCm | number |
declaredHeightCm | number |
declaredWeightKg | number |
mismatch | boolean |
Example scenario โ dw-2 โ adversarial (Large box, tiny declared weight โ mismatch.):
{
"declaredLengthCm": 50,
"declaredWidthCm": 40,
"declaredHeightCm": 40,
"declaredWeightKg": 1,
"mismatch": true
}
๐งฑ Pallet Checkโ
pallet-check ยท Vision ยท difficulty 2 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
cartonCount | number |
overhang | boolean |
stackingViolation | boolean |
Example scenario โ pc-2 โ adversarial (Cartons overhanging edge.):
{
"cartonCount": 18,
"overhang": true,
"stackingViolation": false
}
๐ Address Checkโ
address-validation ยท Text ยท difficulty 1 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
canonical | string |
deliverable | boolean |
zone | string |
Example scenario โ av-2 โ adversarial (Missing postcode, undeliverable.):
{
"canonical": "42 Wallaby Way, Sydney",
"deliverable": false,
"zone": "INT-AU"
}
๐ Carrier Selectโ
carrier-select ยท Text ยท difficulty 1 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
carrier | string |
service | string |
cost | string |
Example scenario โ cs-4 โ adversarial (Hazmat constraint excludes cheap option.):
{
"carrier": "DHL",
"service": "HAZMAT",
"cost": "GBP 15.00"
}
โฑ๏ธ SLA / ETAโ
sla-risk ยท Text ยท difficulty 2 ยท 7 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
status | on-time | at-risk | breached |
etaHours | number |
cause | string |
Example scenario โ sr-2 โ adversarial (Customs hold โ breached.):
{
"status": "breached",
"etaHours": 50,
"cause": "customs"
}
โฉ๏ธ RMA / Returnโ
rma-disposition ยท Text ยท difficulty 2 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
disposition | restock | refurbish | scrap |
reason | string |
Example scenario โ rma-3 โ adversarial (Liquid damage โ scrap (adversarial).):
{
"disposition": "scrap",
"reason": "liquid-damage-unrepairable"
}
๐ Restrictedโ
restricted-screening ยท Text ยท difficulty 3 ยท 7 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
status | allowed | restricted | prohibited |
reason | string |
Example scenario โ rs-2 โ adversarial (Counterfeit โ prohibited.):
{
"status": "prohibited",
"reason": "counterfeit-goods"
}
๐ Docs Checkโ
docs-completeness ยท Document ยท difficulty 1 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
bolPresent | boolean |
cooPresent | boolean |
packingListPresent | boolean |
complete | boolean |
Example scenario โ dc-2 โ adversarial (Missing COO โ incomplete.):
{
"bolPresent": true,
"cooPresent": false,
"packingListPresent": true,
"complete": false
}
โ๏ธ Handwrittenโ
handwritten-label ยท Vision ยท difficulty 3 ยท 5 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
name | string |
addressLine | string |
postcode | string |
Example scenario โ hw-3 โ adversarial (Handwritten โ hard (adversarial).):
{
"name": "K. Patel",
"addressLine": "33 Bridge Lane",
"postcode": "B16 4QP"
}
๐๏ธ Conveyor Camโ
conveyor-incident ยท Video ยท difficulty 3 ยท 6 scenarios
Output schema (the structured object the worker must emit, graded against ground truth):
| Field | Type |
|---|---|
event | clear | jam | fall | crush |
action | accept | reroute | refuse |
Example scenario โ cv-4 โ adversarial (Trailing tote rams it into the scan post โ crushed.):
{
"event": "crush",
"action": "refuse"
}
Adding a task #18+ is one config plus a grader โ see Add a Task and Authoring scenario data. Re-run npm run gen:docs to refresh this page.