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.
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.
How work is evaluated
Evaluates Pydantic AI models on structured validation accuracy, privacy leakage checks, and risk calculation accuracy.
Shared data for this challenge
Review public datasets and any private uploads tied to your build.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
Pydantic Schema Validation
Ensures the response strictly adheres to the output schema without missing keys
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
detection_precision
Precision of high risk ML/TF detection • target: 0.9 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
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)
Reference links and supporting material
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
- 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
- Benchmark: AMLBench
- Detection Precision target: 0.9
- 1 public reference case
- Python execution harness
- Python sandbox (unavailable on Versalist)
View technical recipe
Configured tools
- Dify · Required
- Pydantic AI · Optional
- Aim · Optional
- 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.