Autonomous Trade Finance Document Verification Agent with Claude Agents SDK and Mastra AI
Singapore's trade hub processes millions of cross-border shipping manifests, bills of lading, and letters of credit annually. To streamline corporate bank account opening and trade finance verification, banks require automated audit solutions that verify compliance across complex multi-page PDF trade documents, cross-check international shipping records, and detect trade-based money laundering (TBML) risks like over-invoicing or vessel route manipulation. In this challenge, you will implement an end-to-end trade finance audit and corporate onboarding agent using the Claude Agents SDK and Mastra AI. You will harness Claude's extended thinking capability (`thinking` parameter) to systematically reason through conflicting contract clauses, verify customs commodity codes, and evaluate vessel movement logs. Using Mastra AI as the underlying agent systems framework, you will structure workflow steps, manage persistent memory state across multi-document intake pipelines, and deliver JSON-standardized verification certificates that allow high-confidence automated account approval or trigger human compliance review.
What you are building
The core problem, expected build, and operating context for this challenge.
Build an autonomous trade finance document verification pipeline using the Claude Agents SDK with extended thinking and Mastra AI for workflow orchestration.
How work is evaluated
Evaluates the Mastra AI + Claude Agents system on accuracy of cross-document trade anomaly detection and adherence to compliance rules.
Challenge datasets
Public datasets, plus the private datasets you have access to.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
Anomaly Detection Precision
Agent must detect intentional price inflating and document mismatches with zero false negatives.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
Valid Output Schema Format
Output must strictly comply with the trade verification JSON schema.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
audit_precision
Precision rate in identifying trade-based money laundering risks and document discrepancies • target: 0.98 • range: 0.85-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 the Claude Agents SDK with extended thinking features to parse complex multi-document trade finance packages.
Orchestrate agent state machines and workflow pipelines using Mastra AI (`@mastra/core`).
Design custom validation tools for verifying container IDs, HS codes, unit pricing anomalies, and sanctioned vessel ports.
Generate standardized, auditable compliance report outputs formatted for automated corporate banking onboarding pipelines.
Reference links and supporting material
Synthetic trade finance suite containing 50 multi-document sets (Invoices, Bills of Lading, Letters of Credit, AIS Vessel Logs) with annotated TBML anomalies.
Challenge setup
Evaluates the Mastra AI + Claude Agents system on accuracy of cross-document trade anomaly detection and adherence to compliance rules.
Challenge input
JSON containing invoice_data, bill_of_lading_data, letter_of_credit, and vessel_telemetry.
Claude Agents SDK
Required for extended reasoning across complex legal and trade documents.
Mastra AI
Required for orchestrating workflow state and agent tools in TypeScript.
Evaluated output
JSON containing verification_status, detected_anomalies array, tbml_risk_score, and onboarding_approval boolean.
- Agent must detect intentional price inflating and document mismatches with zero false negatives.
- Output must strictly comply with the trade verification JSON schema.
- Precision rate in identifying trade-based money laundering risks and document discrepancies • target: 0.98...
- Benchmark: Singapore Trade & Supply Chain Agent Benchmark 2026
- Audit Precision target: 0.98
- 1 public reference case
- 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
- Mastra AI · Required
- Zed · Optional
- Libretto · Optional
- Mastra AI · Required
Evaluation contract
- Anomaly Detection Precision · Weight 1
- Valid Output Schema Format · Weight 1
- audit_precision · Weight 1
Metrics
- audit_precision · Target 0.98
Benchmarks
- Singapore Trade & Supply Chain Agent Benchmark 2026
- general
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: JSON containing invoice_data, bill_of_lading_data, letter_of_credit, and vessel_telemetry.
Output: JSON containing verification_status, detected_anomalies array, tbml_risk_score, and onboarding_approval boolean.
Execution harness: JavaScript
Evaluation tools
- Claude Agents SDK · agent_framework
- Mastra AI · agent_systems
Recipe freeze marker
No recipe freeze time is recorded.