Skip to main content
Challenge

TypeScript Sovereign Energy Trade Verification & Settlement Agent with AI SDK

Financial settlement of crude oil shipments involves multi-currency escrow verification, Letter of Credit (LC) matching, and sovereign central bank clearance. Build a TypeScript verification agent using Vercel AI SDK. The agent executes function tools to verify LC amounts, validate banking SWIFT confirmation receipts, and authorize cross-border currency conversion for local and international oil traders.

Business OperationsHosted by Vera
Challenge brief

What you are building

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

Construct a TypeScript trade settlement and financial clearance agent using Vercel AI SDK.

Delivery guide

How work is evaluated

Evaluation

Evaluates Letter of Credit financial balance clearance against invoice amount.

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

settlement_approved_true

Ensure settlement is approved when LC covers cargo value.

Binary check

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

Dimension 2

financial_match_accuracy

Precision of calculated balance delta. • target: 1 • 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

  • Use Vercel AI SDK `generateText` with multi-tool calling in TypeScript.

  • Perform LC financial validation against shipment value.

  • Emit typed trade clearance authorization payloads.

Resources and assets

Reference links and supporting material

Dataset notes

Letter of Credit data records and corresponding crude oil cargo invoices.

Challenge setup

Evaluates Letter of Credit financial balance clearance against invoice amount.

Challenge input

JSON with lc_value_usd, cargo_value_usd, swift_verified

AI SDK

Vercel's TypeScript framework for agentic tool use.

Evaluated output

JSON with settlement_approved, balance_delta_usd, authorization_token

Evaluation checks
  • Ensure settlement is approved when LC covers cargo value.
  • Precision of calculated balance delta. • target: 1 • range: 0-1
Configured evaluation evidence
  • Benchmark: AI-SDK-FinTech-Bench
  • Financial Match Accuracy target: 1
  • 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
  • Vercel AI SDK · Required
  • Libretto · Optional
  • Fixie · Optional
Orchestration
  • Vercel AI SDK · Required

Evaluation contract

  • settlement_approved_true · Weight 1
  • financial_match_accuracy · Weight 1

Metrics

  • financial_match_accuracy · Target 1

Benchmarks

  • AI-SDK-FinTech-Bench
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON with lc_value_usd, cargo_value_usd, swift_verified

    Output: JSON with settlement_approved, balance_delta_usd, authorization_token

    Execution harness: JavaScript

Evaluation tools

  • AI SDK · Execution Framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about TypeScript Sovereign Energy Trade Verification & Settlement Agent with AI SDK