Skip to content

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SancTrust

Agentic AML and sanctions due diligence with an analyst in control

🏆 Best Implementation Award — IBM Enterprise Agents Hackathon, April 2026

SancTrust turns counterparty screening from scattered desk research into one reviewable workflow. It screens official sanctions data, investigates uncertain matches with agents, records the evidence behind each result, and leaves the final decision with a human analyst.

Watch the product demo · View the project presentation

Workflow Agent system Default screening Test coverage
7 phases 6 specialist tools 3 official U.S. sources 122 tests across 36 files

What the project achieved

  • Built a seven-phase case workflow from entity intake through screening, investigation, analyst review, and final report.
  • Combined deterministic sanctions matching with agentic research. Policy rules enforce risk bands and workflow gates; analysts own the final decision.
  • Made every material action traceable through persisted evidence, source coverage, risk decisions, and case events.
  • Added explicit human checkpoints. A case cannot quietly become low risk while evidence is unresolved or an active source failed.
  • Designed optional AI and data integrations to degrade safely, so the core workflow remains usable without Gemini, Tavily, Redis, or registry credentials.

Product workflow

  1. Create a case for a person or organization and select the screening mode.
  2. Screen policy-approved sources using normalized aliases and PostgreSQL trigram similarity.
  3. Investigate uncertain results with structured agent workflows, OSINT leads, and registry context when integrations are available.
  4. Review the evidence in a three-column analyst workspace with source status, match explanations, risk signals, and a live audit log.
  5. Close the case only after analyst review, then generate a versioned JSON record and HTML reports tied to the case evidence.
flowchart LR
    A["Entity intake"] --> B["Policy-scoped screening"]
    B --> C["Explainable match candidates"]
    C --> D["Agentic enrichment"]
    D --> E["Deterministic risk rules"]
    E --> F["Analyst review"]
    F --> G["Versioned report + audit trail"]

    H["OFAC / BIS data"] --> B
    I["Tavily / Gemini / registries"] --> D
    J["Source coverage + evidence"] --> E
Loading

Why the implementation matters

Engineering challenge Implementation Practical value
AI in a regulated workflow Agents perform bounded research and return structured outputs; rules and analysts retain decision authority Useful automation without hiding how a risk result was reached
Noisy entity names Alias normalization, token-order variants, fuzzy retrieval, and field-level match explanations Finds plausible matches while showing analysts why each candidate appeared
Incomplete external services Optional integrations record an unavailable state and let the case reach review instead of crashing The workflow stays operable and missing evidence stays visible
Changing screening scope Versioned policy files select active sources and risk bands Source expansion becomes a controlled configuration change
Audit and reproducibility First-class findings, leads, coverage records, case events, and state-derived report hashes Reviewers can reconstruct the evidence and decisions behind a case

Shipped capabilities

Sanctions screening

  • Default policy.v2 coverage for OFAC SDN, OFAC Consolidated, and the U.S. BIS Denied Persons List
  • Policy-controlled policy.v3 path that also activates the U.S. Trade Consolidated Screening List
  • Snapshot-based OpenSanctions ingestion with checksums and source metadata
  • Person and organization matching with explainable scores, matched fields, conflicts, and missing data
  • Critical, high, low, and incomplete risk outcomes based on candidate state and source coverage

Agentic investigation

  • Six coordinated specialist tools for entity enrichment, ownership, key persons, adverse media, sanctions reasoning, and narrative generation
  • Tavily search and extraction for evidence gathering
  • Optional Gemini deep-investigation loop with bounded tool steps
  • Heuristic fallbacks for supported tasks and explicit unavailable events where a safe fallback is not appropriate
  • Optional Redis-backed agent memory behind a separate integration boundary

Analyst controls

  • Case queue and case-detail workspace
  • Live case-event stream and audit log
  • Verify, dismiss, and convert-to-finding review actions
  • Analyst-owned final risk decision and report unlock
  • Case archiving that preserves workflow state and history

Reports and evidence

  • Canonical case records across subjects, candidates, findings, source coverage, decisions, and events
  • Versioned JSON reports with deterministic SHA-256 state hashes
  • Internal HTML investigation and final reports
  • Stored source references and evidence tiers for review

Architecture

SancTrust is a TypeScript monorepo with a separate analyst interface and workflow worker.

apps/
  web/          Next.js analyst interface and API proxy
  worker/       Workflow runner, screening jobs, investigation, and reports

packages/
  agents/       Structured AI tasks and guarded fallbacks
  connectors/   Sanctions, OSINT, registry, and memory integrations
  contracts/    Shared domain schemas and types
  db/           Prisma persistence and repositories
  matching/     Entity normalization, retrieval, and candidate assessment
  policy/       Versioned source activation and risk rules
  workflow/     Phases, transitions, and analyst-review controls

python/
  ingestion/    Reproducible sanctions fixture downloads

Core stack: Next.js, React, TypeScript, PostgreSQL, Prisma, Vitest, Vercel AI SDK, Gemini, Tavily, and Redis.

Verification

The test suite covers the boundaries most likely to fail in a regulated agent workflow:

  • sanctions-name variants and golden source-activation cases
  • agent output schemas and heuristic fallbacks
  • review gates, idempotency, and graceful degradation
  • OSINT and ownership flows
  • report generation, persistence, and API routes

Run the full local checks:

pnpm lint
pnpm typecheck
pnpm test
pnpm build

Integration tests create temporary PostgreSQL databases, so pnpm test needs access to a writable PostgreSQL server.

Run locally

Requirements: Node.js 24+, pnpm 10+, and PostgreSQL.

git clone https://github.com/ashkanrdn/Sanctions-Screener.git
cd Sanctions-Screener
cp .env.example .env
pnpm install
pnpm db:generate
pnpm db:push
pnpm dev

Open the analyst app at http://127.0.0.1:3010. The worker API runs at http://127.0.0.1:4010.

Only DATABASE_URL is required for the core workflow. Optional keys enable Tavily research, Gemini investigation, Redis memory, Companies House, and OpenCorporates.

Project status

This is an award-winning hackathon MVP and engineering prototype, not a production compliance decision engine. The current default screening policy is U.S.-focused. Broader jurisdiction coverage, production data licensing, identity controls, and compliance validation remain deployment work.

Further reading

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages