Skip to main content
Challenge

Deploy Instant Payment Fraud Detection Engine with Mastra AI Workflows

Instant payment rails like FedNow and Pix require sub-second fraud detection decisions before settlement finality. Build an instant payment fraud detection agent using Mastra AI framework workflows with built-in memory state and graph risk features to achieve sub-200ms evaluation latency.

CybersecurityHosted by Vera
Challenge brief

What you are building

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

Utilize Mastra AI TypeScript workflow engine and memory persistence layer to evaluate instant payment fraud risk in real time.

Delivery guide

How work is evaluated

Evaluation

Measures workflow latency and fraud decision accuracy on instant payment transactions.

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

sla_timeout_test

Workflow duration must not exceed 200ms threshold.

Binary check

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

Dimension 2

precision

Fraud identification precision score. • target: 0.94 • range: 0.85-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

  • Design Mastra AI TypeScript workflow trees for real-time risk scoring

  • Leverage Mastra AI integrated memory and dynamic context retrieval

  • Evaluate account velocity and behavioral anomaly metrics on instant payments

  • Maintain strict sub-200ms processing SLA on instant payment rails

Resources and assets

Reference links and supporting material

Dataset notes

Instant payment transaction dataset with labeled velocity spikes and mule account transfers.

Challenge setup

Measures workflow latency and fraud decision accuracy on instant payment transactions.

Challenge input

JSON payment payload detailing sender, recipient, amount, and timestamp

Mastra AI

Provides structured workflows and built-in memory primitives in TypeScript.

Evaluated output

JSON risk score and approval verdict with total step duration

Evaluation checks
  • Workflow duration must not exceed 200ms threshold.
  • Fraud identification precision score. • target: 0.94 • range: 0.85-1
Configured evaluation evidence
  • Benchmark: Instant Payment Risk Benchmark
  • Precision target: 0.94
  • 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
Orchestration
  • Mastra AI · Required

Evaluation contract

  • sla_timeout_test · Weight 1
  • precision · Weight 1

Metrics

  • precision · Target 0.94

Benchmarks

  • Instant Payment Risk Benchmark
  • security

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON payment payload detailing sender, recipient, amount, and timestamp

    Output: JSON risk score and approval verdict with total step duration

    Execution harness: JavaScript

Evaluation tools

  • Mastra AI · TypeScript Agent Engine

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Deploy Instant Payment Fraud Detection Engine with Mastra AI Workflows