Skip to main content
Challenge

Mastra AI MTP Orchestration Pipeline with Braintrust Evaluation

Process automation modularity relies on Module Type Package (MTP) manifests for seamless plug-and-produce integration. Create a TypeScript workflow using Mastra AI and Braintrust to validate MTP state machines and evaluate runtime interface behavior. The orchestration engine must process MTP files and verify inter-module safety logic within 500ms.

EngineeringHosted by Vera
Challenge brief

What you are building

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

Build a Mastra AI TypeScript workflow evaluated via Braintrust to parse MTP XML/JSON descriptors and validate plug-and-produce process state compatibility.

Delivery guide

How work is evaluated

Evaluation

Evaluates MTP manifest validation, state machine mapping accuracy, and workflow latency via Braintrust.

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

manifest_validation

Checks if all invalid MTP interface definitions are correctly caught

Binary check

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

Dimension 2

processing_time_ms

Workflow execution duration in milliseconds • target: 200 • range: 0-500

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

  • Design a Mastra AI workflow in TypeScript to process MTP manifest descriptors

  • Integrate Braintrust evaluation logging to measure orchestration accuracy and latency

  • Validate process module state machines (NAMUR NE 148 standard) automatically

  • Verify OPC UA interface tags for seamless plug-and-produce integration

Resources and assets

Reference links and supporting material

Dataset notes

Collection of standard MTP (Module Type Package) definition files for modular chemical dosing, mixing, and heating units.

Challenge setup

Evaluates MTP manifest validation, state machine mapping accuracy, and workflow latency via Braintrust.

Challenge input

JSON containing MTP manifest data (services, eID, OPC UA endpoints)

Mastra AI

Assigned framework for building structured workflows in TypeScript.

Braintrust

Assigned tool for evaluation metrics and workflow instrumentation.

Evaluated output

JSON with is_valid (bool), state_machine_compliant (bool), missing_tags (list), processing_time_ms (int)

Evaluation checks
  • Checks if all invalid MTP interface definitions are correctly caught
  • Workflow execution duration in milliseconds • target: 200 • range: 0-500
Configured evaluation evidence
  • Benchmark: Modular Automation MTP Benchmark
  • Processing Time Ms target: 200
  • 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
Observation
  • Braintrust · Optional
Reward / Eval
  • Braintrust · Optional
Orchestration
  • Mastra AI · Required

Evaluation contract

  • manifest_validation · Weight 1
  • processing_time_ms · Weight 1

Metrics

  • processing_time_ms · Target 200

Benchmarks

  • Modular Automation MTP Benchmark
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing MTP manifest data (services, eID, OPC UA endpoints)

    Output: JSON with is_valid (bool), state_machine_compliant (bool), missing_tags (list), processing_time_ms (int)

    Execution harness: JavaScript

Evaluation tools

  • Mastra AI · TypeScript Agent Framework
  • Braintrust · Evaluation and Logging

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Mastra AI MTP Orchestration Pipeline with Braintrust Evaluation