Skip to main content
Loading navigation

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

What you are building

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

How work is evaluated

Evaluation

Evaluates Letter of Credit financial balance clearance against invoice amount.

Datasets

Public datasets, plus the private datasets you have access to.

How submissions are scored

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

  • 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

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)

Shows the first task, up to three tools, and up to three evidence 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