$ kontext — trust infrastructure for agents that move USDC on Base & Arc

One call — verify() — runs OFAC screening, logs into a tamper-evident digest chain, computes trust score, and returns structured compliance. Zero dependencies. Free on Base + Arc.

$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

$MCP SERVER (8 TOOLS)

Expose compliance tools to Claude Code, Cursor, and Windsurf via Model Context Protocol.

claude_desktop_config.json
{
  "mcpServers": {
    "kontext": {
      "command": "npx",
      "args": ["-y", "kontext-sdk", "mcp"]
    }
  }
}

Available tools:

verify_transaction

check_sanctions

log_reasoning

get_trust_score

get_compliance_certificate

anchor_digest

exchange_attestation

verify_audit_trail

$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

$ 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 — CTR Alert
{
  compliant: true,
  riskLevel: 'medium',
  checks: [
    { name: 'OFAC Sanctions', passed: true },
    { name: 'Amount Threshold (CTR)', passed: true,
      details: 'Above $10K CTR threshold' },
  ],
  recommendations: ['File CTR within 15 days'],
  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', 'File SAR'],
  trustScore: { score: 12, level: 'untrusted' },
}

$ 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 (S. 1582) — 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

Suspicious activity reports ← generateSARReport() 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

$2.00 / 1K events above 20K

  • No monthly minimum
  • All 8 chains
  • CSV export
  • SAR/CTR reports
  • Advanced anomaly rules
  • Webhook alerts
  • Unified screening
MIT Licensed·Patented Digest Chain·GENIUS Act Aligned·USDC Native·Base + Arc Free·Open Source·x402 Compatible·8 MCP Tools·Zero Dependencies

Ship compliance before the deadline.

npm install. Kontext.init(). verify(). Three layers of proof in one call. Open source, TypeScript-first, free forever on Base + Arc.