Integration · Vercel AI SDK
Integrate OFAC sanctions screening into your Vercel AI SDK agent. One tool call blocks payments to sanctioned wallets.
Agents built with the Vercel AI SDK can use tool calling to initiate payments. Without a sanctions tool in the loop, the agent has no way to know if a wallet address is on the OFAC SDN list. The deployment operator bears strict liability.
import { generateText } from "ai";
import { sanctionsCheck } from "@agentmail/mcp-sdk";
import { openai } from "@ai-sdk/openai";
const result = await generateText({
model: openai("gpt-4o"),
tools: {
sanctionsCheck,
sendPayment: {
description: "Send USDC to wallet",
parameters: ...,
execute: async ({ wallet }) => {
// Always screen before payment
const screen = await sanctionsCheck({ wallet });
if (screen.flagged) throw new Error("Blocked by OFAC");
return executePayment(wallet);
}
}
},
prompt: "Pay the invoice from wallet 0x..."
});Install agentmail SDKnpm install @agentmail/mcp-sdkAdd tool to AI SDKImport sanctionsCheck tool into your generateText or streamText callWire pre-payment checkScreen counterparty wallet before the payment tool is calledDeploy to VercelOne-click deploy. Free tier works in production.From $19/mo (600 checks) · Free tier: 5 checks/day, no API key
Free tier: 5 checks/day, no API key. Scale from $19/mo.
See pricing