$ Compliance logging for agents that move UUSSDD

Your agents handle $3K+ transfers with zero compliance infrastructure. verify() returns OFAC screening, audit trail, and trust score in one call.

agent.ts
typescript
const result = await ctx.verify({
  txHash: '0xabc...def',
  chain: 'base',
  amount: '5000',
  token: 'USDC',
  from: '0xTreasury...C3',
  to: '0xVendor...D4',
  agentId: 'treasury-agent',
});
playground
··

$ What verify() returns

Three scenarios. One function call each.

$500 USDC — Clean
{
  compliant: true,
  riskLevel: 'low',
  checks: [
    { name: 'OFAC Sanctions', passed: true },
    { name: 'Amount Threshold', passed: true },
  ],
  trustScore: { score: 92, level: 'high' },
  digestProof: { valid: true, chainLength: 42 },
}
$15K USDC — Review Required
{
  compliant: true,
  riskLevel: 'medium',
  checks: [
    { name: 'OFAC Sanctions', passed: true },
    { name: 'Amount Threshold', passed: true,
      details: 'Above review threshold' },
  ],
  recommendations: ['Manual review recommended'],
  trustScore: { score: 71, level: 'medium' },
}
Sanctioned — Blocked
{
  compliant: false,
  riskLevel: 'critical',
  checks: [
    { name: 'OFAC Sanctions', passed: false,
      details: 'Address on SDN list' },
  ],
  recommendations: ['Block transaction'],
  trustScore: { score: 12, level: 'untrusted' },
}

$ Explore the SDK

Five ways to integrate Kontext into your stack.

$WHAT IS KONTEXT

Compliance logging SDK for AI agents that move money. One call — verify() — runs OFAC screening, logs the transaction into a tamper-evident digest chain, computes trust score, returns structured compliance result. Zero dependencies. Free on Base/Arc.

$INTEGRATE IN 3 STEPS
  1. 1. npm install kontext-sdk
  2. 2. Kontext.init({ projectId: '...', environment: '...' })
  3. 3. await ctx.verify({ txHash, chain: 'base', amount, token: 'USDC', from, to, agentId })
$DEFAULT FLOW: x402 USDC ON BASE/ARC
x402-flow.ts
// Agent receives HTTP 402 → reasons about payment → verify → pay
const result = await ctx.verify({
  ...x402Payment,
  chain: 'base',    // or 'arc'
  token: 'USDC',
  agentId: 'payment-agent',
  counterparty: {
    endpoint: 'https://api.example.com/.well-known/kontext'
  }
});
$CIRCLE PROGRAMMABLE WALLETS
circle-wallets.ts
// Wrap Circle transfers with compliance
const result = await ctx.verify({
  txHash: circleResponse.txHash,
  chain: 'arc',
  amount: '5000',
  token: 'USDC',
  from: circleWallet,
  to: recipient,
  agentId: 'treasury-agent',
});
$VERIFY INPUT SCHEMA
types.ts
interface VerifyInput {
  txHash: string;
  chain: 'base' | 'arc' | 'ethereum' | 'polygon' | 'arbitrum' | 'optimism' | 'avalanche' | 'solana';
  amount: string;
  token: 'USDC' | 'USDT' | 'DAI' | 'EURC';
  from: string;
  to: string;
  agentId: string;
  reasoning?: string;
  counterparty?: { endpoint: string; agentId: string };
  anchor?: { rpcUrl: string; contractAddress: string; privateKey?: string };
  metadata?: Record<string, unknown>;
}
$VERIFY OUTPUT SCHEMA
types.ts
interface VerifyResult {
  compliant: boolean;
  checks: Array<{ name: string; passed: boolean; details?: string }>;
  riskLevel: 'low' | 'medium' | 'high' | 'critical';
  recommendations: string[];
  trustScore: { score: number; level: string; factors: Factor[] };
  digestProof: { valid: boolean; chainLength: number };
  transaction: TransactionRecord;
  counterparty?: { attested: boolean; digest: string };
  anchorProof?: { txHash: string; blockNumber: number };
}
$SUPPORTED CHAINS (Base + Arc free)
basearcethereumpolygonarbitrumoptimismavalanchesolana
$PRIMARY TOKEN: USDC

Also supports: USDT, DAI, EURC

$MACHINE-READABLE ENDPOINTS

Agent card ··· https://getkontext.com/.well-known/kontext.json

LLM guide ···· https://getkontext.com/llms.txt

npm ·········· https://npmjs.com/package/kontext-sdk

GitHub ······· https://github.com/Legaci-Labs/kontext

$ Reasoning trace — 500 USDC via x402

Kontext follows agents that move programmable money

Sender Agent (US)

Circle Programmable Wallet · 0xTreasury...C3

reasoning: "Vendor invoice #4821. Recipient verified in allowlist. Amount within daily limit ($25K remaining). Routing via x402 on Base for lowest settlement cost."

verify() →OFAC ✓Amount ✓Trust: 92Digest: a7b8...

x402 / Base

500 USDC

tx: 0x3f...a91

On-Chain Anchor

~$0.001 on Base

Recipient Agent (Italy)

MetaMask Wallet · 0xVendor...D4

reasoning: "Incoming 500 USDC from 0xTreasury...C3. Sender not sanctioned. Payment matches expected invoice. Confirming receipt and closing settlement."

verify() →OFAC ✓Sender ✓Trust: 88Digest: c4e2...

A2A attestation exchanged ✓

$ Three layers of proof

1. DIGEST CHAIN

SHA-256 hash chain linking every action. Tamper = chain breaks.

getTerminalDigest()
verifyDigestChain()
exportDigestChain()

2. ON-CHAIN ANCHOR

Batch Optimized

batchAnchor(digests, {
  batchSize: 50
})

One tx anchors 50 events
~$0.001 total on Base

3. A2A ATTESTATION

Bilateral compliance proof between agent pairs via x402. Cryptographic.

exchangeAttestation()
fetchAgentCard()
/.well-known/kontext

$ GENIUS ACT — signed July 18, 2025

Implementing regulations: July 2026

Prohibitions effective: November 2026

Payment stablecoin issuers are financial institutions under the BSA. Agents handling $3K+ transfers need:

OFAC screening ← verify() does this

Audit trails ← digest chain does this

Transaction records ← logTransaction() does this

$ Pricing

FREE

$0 forever

  • 20K events/month on Base + Arc
  • No credit card required
  • OFAC screening
  • Digest chain
  • Trust scoring
  • JSON audit export
  • Human-in-the-loop tasks

PAY AS YOU GO

$0.002 / event above 20K

  • No monthly minimum
  • ETH, SOL, Base, Polygon, Arbitrum, Optimism, Arc, Avalanche
  • CSV export
  • Anomaly rules
  • Webhook alerts
  • Unified screening

Compatible with

CircleBaseUSDCVercel AI SDKLangChain

Proof of compliance as code.

Open Source cryptographic proof in an SDK.