Skip to main content
Loading navigation

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

What you are building

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

How work is evaluated

Evaluation

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

Datasets

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

How submissions are scored

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

  • 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

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)

Shows the first task, up to three tools, and up to three evidence 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