Challenge

Build a Cross-Border Payment Fraud Agent with Mastra AI and Arize Phoenix

Inspired by the 2026 MAS and Bank of Thailand MOU on cybersecurity and digital fraud protection, this challenge tasks you with building a high-trust payment monitoring agent. You will leverage the Mastra AI framework to orchestrate a sophisticated workflow that intercepts simulated cross-border transaction data, evaluates it against dynamic risk patterns (derived from MAS/ABS cyber resilience guidelines), and generates explainable risk evidence. To ensure regulatory compliance and transparency, you will integrate Arize Phoenix for real-time observability and trace-based evaluation of the agent's decision-making process. The system must handle asynchronous payment flows, manage persistent state for merchant risk profiles, and output structured reports suitable for human-in-the-loop (HITL) review by MAS compliance officers.

Workflow AutomationHosted by Vera
Challenge brief

What you are building

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

Inspired by the 2026 MAS and Bank of Thailand MOU on cybersecurity and digital fraud protection, this challenge tasks you with building a high-trust payment monitoring agent. You will leverage the Mastra AI framework to orchestrate a sophisticated workflow that intercepts simulated cross-border transaction data, evaluates it against dynamic risk patterns (derived from MAS/ABS cyber resilience guidelines), and generates explainable risk evidence. To ensure regulatory compliance and transparency, you will integrate Arize Phoenix for real-time observability and trace-based evaluation of the agent's decision-making process. The system must handle asynchronous payment flows, manage persistent state for merchant risk profiles, and output structured reports suitable for human-in-the-loop (HITL) review by MAS compliance officers.

Datasets

Shared data for this challenge

Review public datasets and any private uploads tied to your build.

Loading datasets...
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
3 scoring checks
Binary
3 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

Schema Validation

Ensures the output matches the required regulatory JSON schema.

Binary check

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

Dimension 2

Trace Persistence

Verifies that traces were successfully exported to Arize Phoenix.

Binary check

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

Dimension 3

F1 Score

Balance of precision and recall for fraud identification. • target: 0.85 • 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

  • Master Mastra AI initialization and workflow definition using TypeScript to create structured state machines for transaction processing

  • Implement Mastra AI 'Tools' that interface with external blocklists and merchant reputation databases

  • Orchestrate complex human-in-the-loop (HITL) triggers using Mastra's 'Step' architecture for high-value transaction flags

  • Integrate Arize Phoenix for OpenInference-based tracing to capture LLM input/output pairs and latency metrics

  • Deploy Arize Phoenix evaluators to measure the precision and recall of the fraud detection agent against a ground-truth dataset

  • Build a custom 'Audit Trail' service that persists Mastra execution traces into a regulator-friendly format

  • Optimize agent performance by using Mastra AI memory to contextually remember repeat transaction patterns

How this agent runs

The challenge is evaluated on the agent's ability to correctly flag fraudulent transactions while maintaining a low false-positive rate and providing detailed traces in Arize Phoenix.

Preview configuration

Challenge input

JSON array of transaction objects containing amount, currency, sender_country, receiver_country, and merchant_id.

Mastra AI

Required for building the agentic workflow in TypeScript.

Arize Phoenix

Required for tracing and evaluating the agent logic.

Evaluated output

JSON object with boolean flags and evidence strings.

Checks for
  • Ensures the output matches the required regulatory JSON schema.
  • Verifies that traces were successfully exported to Arize Phoenix.
  • Balance of precision and recall for fraud identification. • target: 0.85 • range: 0-1
Proof of success
  • Benchmark: FinReg-Eval-2026
  • F1 Score target: 0.85
  • 1 public reference case
Runtime evidence
  • JavaScript execution harness
  • Javascript sandbox
View technical recipe

Configured tools

Action Space
  • Mastra AI · Required
  • SHAP (Explainability) · Optional
Observation
  • Arize Phoenix · Optional
Reward / Eval
  • Arize Phoenix · Optional
Orchestration
  • Mastra AI · Required

Evaluation contract

  • Schema Validation · Weight 1
  • Trace Persistence · Weight 1
  • F1 Score · Weight 1

Recipe state

This is a preview. The configuration can change before the evaluation recipe is locked.

Run this agent on your dataset

Versalist can run this agent on your behalf with your data. Tell us about your dataset and the result you need.

Discuss your dataset
Start from your terminal
$npx -y @versalist/cli start build-a-cross-border-payment-fraud-agent-with-mastra-ai-and-arize-phoenix

[ok] Wrote CHALLENGE.md

[ok] Wrote .versalist.json

[ok] Wrote eval/examples.json

Requires VERSALIST_API_KEY. Works with any MCP-aware editor.

Docs
Manage API keys
Explore

Find another challenge

Jump to a random challenge when you want a fresh benchmark or a different problem space.

Useful when you want to pressure-test your workflow on a new dataset, new constraints, or a new evaluation rubric.

Frequently Asked Questions about Build a Cross-Border Payment Fraud Agent with Mastra AI and Arize Phoenix