Skip to main content
Challenge

Gulf Trade Corridor Logistics Handler with Mastra AI

Regional freight operators facing maritime disruptions need automated corridor re-routing to prevent supply chain bottlenecks. Build a TypeScript workflow agent using Mastra AI to process pipeline vs port transit options and trigger automated cargo rerouting.

Business OperationsHosted by Vera
Challenge brief

What you are building

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

Build an event-driven TypeScript workflow using Mastra AI to orchestrate cross-border freight rerouting.

Delivery guide

How work is evaluated

Evaluation

Evaluates Mastra AI workflow step execution and route optimization outputs.

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

route_validity

Validates recommended corridor matches expected inland pipeline path.

Binary check

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

Dimension 2

execution_time_ms

Workflow step completion speed. • target: 800 • range: 0-5000

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

  • Construct a Mastra AI workflow with declarative step dependencies

  • Process multi-modal logistics data (maritime risk levels vs overland pipeline capacity)

  • Implement step retry policies and memory persistence in TypeScript

  • Generate cost-benefit decision matrices for alternative transport corridors

Resources and assets

Reference links and supporting material

Dataset notes

Maritime risk ratings, port throughput limits, and overland pipeline capacity metrics for Gulf energy transit routes.

Challenge setup

Evaluates Mastra AI workflow step execution and route optimization outputs.

Challenge input

JSON with origin_port, destination_hub, and strait_risk_level

Mastra AI

TypeScript framework for defining stateful agent workflows.

Evaluated output

JSON with recommended_corridor, additional_cost_pct, and transit_days_delta

Evaluation checks
  • Validates recommended corridor matches expected inland pipeline path.
  • Workflow step completion speed. • target: 800 • range: 0-5000
Configured evaluation evidence
  • Benchmark: Logistics-Reroute-Bench
  • Execution Time Ms target: 800
  • 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
  • Mastra AI · Required
  • Libretto · Optional
  • Coplay AI · Optional
Orchestration
  • Mastra AI · Required

Evaluation contract

  • route_validity · Weight 1
  • execution_time_ms · Weight 1

Metrics

  • execution_time_ms · Target 800

Benchmarks

  • Logistics-Reroute-Bench
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON with origin_port, destination_hub, and strait_risk_level

    Output: JSON with recommended_corridor, additional_cost_pct, and transit_days_delta

    Execution harness: JavaScript

Evaluation tools

  • Mastra AI · agent_framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Gulf Trade Corridor Logistics Handler with Mastra AI