OFAC screening for AI agent frameworks
A practical guide to adding sanctions screening to LangChain, CrewAI, AutoGen, and the OpenAI Agents SDK.
TL;DR
TL;DR: Agent frameworks move money but do not screen counterparties. Add an OFAC screening API call before any payment step so a flagged counterparty is blocked, not paid.
Why frameworks need screening built in
Most agent frameworks focus on reasoning, tool use, and memory. Payment is usually just another tool call, yet OFAC strict liability applies even when no human reviews the transaction. Intent is not required, and civil penalties start at $356,000 per violation. A framework that routes USDC through Base or Coinbase AgentKit is still responsible for the counterparty it pays.
Where to place the check
The cleanest pattern is one gateway call before funds move. sanctionsai.dev exposes a single HTTP endpoint that screens a counterparty and returns ALLOW or BLOCK in under 100 ms. Wrap it as a reusable tool or middleware so every agent that pays passes through the same gate, with clean counterparties allowed and flagged ones stopped.
Framework-specific notes
- LangChain and CrewAI: register screening as a tool that runs before any transfer tool.
- AutoGen: gate the payment function so it cannot execute without a clean result.
- OpenAI Agents SDK: run screening as a pre-step, then block the payment step on a BLOCK result.