Challenge

Pydantic AI & Dify Anti-Money Laundering Sharing Agent

Build a Pydantic AI multi-party information sharing pipeline integrated into Dify to analyze cross-bank COSMIC platform ML/TF alerts with structured Pydantic validation. Achieve a 90%+ true-positive detection rate while enforcing zero data-leakage constraints.

Workflow AutomationHosted by Vera
Challenge brief

What you are building

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

Construct a type-safe agent using Pydantic AI and Dify workflows to evaluate inter-bank COSMIC platform ML/TF intelligence securely.

Delivery guide

How work is evaluated

Evaluation

Evaluates Pydantic AI models on structured validation accuracy, privacy leakage checks, and risk calculation accuracy.

Datasets

Shared data for this challenge

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

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

Pydantic Schema Validation

Ensures the response strictly adheres to the output schema without missing keys

Binary check

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

Dimension 2

detection_precision

Precision of high risk ML/TF detection • target: 0.9 • 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

  • Leverage Pydantic AI for strongly typed agent inputs, outputs, and validation rules

  • Integrate agent logic with Dify workflow orchestration engine

  • Process financial transaction logs while adhering to Singapore's COSMIC data privacy guidelines

  • Implement risk-based scoring for Money Laundering / Terrorism Financing (ML/TF)

Resources and assets

Reference links and supporting material

Dataset notes

Anonymized COSMIC platform simulation dataset containing structured transaction graphs and ML/TF risk labels.

How this agent runs

Evaluates Pydantic AI models on structured validation accuracy, privacy leakage checks, and risk calculation accuracy.

Challenge input

JSON containing obfuscated transaction logs and counterparty metadata

Pydantic AI

Provides type-safe structured outputs and validation for compliance

Dify

Visual workflow builder and agent orchestration tool

Evaluated output

JSON matching Pydantic output model with risk_level, confidence, and flags

Checks for
  • Ensures the response strictly adheres to the output schema without missing keys
  • Precision of high risk ML/TF detection • target: 0.9 • range: 0-1
Proof of success
  • Benchmark: AMLBench
  • Detection Precision target: 0.9
  • 1 public reference case
Runtime evidence
  • Python execution harness
  • Python sandbox (unavailable on Versalist)
View technical recipe

Configured tools

Action Space
  • Dify · Required
  • Pydantic AI · Optional
  • Aim · Optional
Orchestration
  • Pydantic AI · Optional

Evaluation contract

  • Pydantic Schema Validation · Weight 1
  • detection_precision · Weight 1

Recipe state

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

Frequently Asked Questions about Pydantic AI & Dify Anti-Money Laundering Sharing Agent