@merchantguard/agent-sdk
Compliance infrastructure for AI agents. GuardScore, 14 vertical coaches, real-time alerts, PSP matching.
npm install @merchantguard/agent-sdk
Quick Start
import { createClient } from '@merchantguard/agent-sdk';
const guard = createClient();
const result = await guard.checkWallet('0x...');
console.log(`Score: ${result.score}, Approved: ${result.approved}`);
const decision = await guard.coach.cbd('Can I sell delta-8 gummies online?');
console.log(decision.answer);
const alerts = await guard.alerts.critical(['cbd', 'crypto']);
Features
| Wallet Verification | GuardScore (0-100) + NFT passport check |
| 14 Compliance Coaches | CBD, Crypto, Nutra, VAMP, Gaming, Adult, and more |
| Real-time Alerts | PSP policy changes, regulatory updates, VAMP warnings |
| PSP Matching | Find processors that accept your vertical |
| Passport Management | Soulbound NFT on Base/Arbitrum |
Compliance Coaches
Access 14 vertical-specific AI compliance coaches:
const decision = await guard.coach.ask('cbd', 'What health claims can I make?');
await guard.coach.cbd('Can I ship to Idaho?');
await guard.coach.crypto('Do I need a money transmitter license?');
await guard.coach.nutra('What are the FTC rules for free trials?');
await guard.coach.vamp('My chargeback rate is 1.2%, what should I do?');
await guard.coach.highRisk('Stripe rejected me, what now?');
await guard.coach.pspMatch('I need processing for CBD doing $50k/month');
Available Verticals
cbd | THC compliance, COA requirements, shipping restrictions |
crypto | KYC/AML, Travel Rule, MTL licensing |
nutra | FTC claims, Click-to-Cancel, subscription rules |
adult | 2257 compliance, age verification, billing descriptors |
gaming | State licensing, UIGEA, responsible gambling |
travel | Future delivery risk, cancellation policies |
ticketing | Primary/secondary market, delivery guarantees |
subscriptions | Cancellation flows, auto-renewal disclosures |
ecommerce | PCI DSS 4.0, return policies, FTC Mail Order Rule |
bnpl | CFPB rules, fee disclosures, credit reporting |
mexico | CNBV, Ley Fintech, SPEI/CoDi |
vamp | GuardPay Health Bands, remediation planning |
high-risk | MATCH list recovery, reserve negotiation |
psp-match | PSP recommendations based on vertical + volume |
telehealth | HIPAA, Ryan Haight Act, state licensing |
Decision Object Response
interface DecisionObject {
vertical: string;
decision: 'allow' | 'block' | 'allow_with_conditions' | 'require_human_review';
risk_level: 'low' | 'medium' | 'high' | 'critical';
confidence: number;
required_actions: Array<{
id: string;
severity: 'must' | 'should' | 'recommended';
description: string;
}>;
policy_citations: Array<{
source: string;
id: string;
title: string;
}>;
answer: string;
disclaimer: string;
}
Wallet Verification
const result = await guard.checkWallet('0x...');
console.log({
approved: result.approved,
score: result.score,
riskLevel: result.riskLevel,
hasNFT: result.hasNFT,
credentials: result.credentials,
});
Batch Verification
const wallets = ['0x...', '0x...', '0x...'];
const results = await guard.checkMultipleWallets(wallets);
results.forEach((result, wallet) => {
console.log(`${wallet}: ${result.score}`);
});
Pre-Trade Check
const check = await guard.beforeTrade({
protocol: 'GMX',
counterparty: '0x...',
amount: '10000',
});
if (!check.approved) {
console.log(`Blocked: ${check.reason}`);
}
Alerts
const alerts = await guard.alerts.list({
verticals: ['cbd', 'crypto'],
maxResults: 10,
minSeverity: 5,
});
const critical = await guard.alerts.critical(['cbd']);
await guard.alerts.subscribe('https://your-agent.com/webhook', ['cbd', 'crypto']);
Alert Format
interface Alert {
id: string;
title: string;
summary: string;
severity: number;
category: 'PSP' | 'Regulatory' | 'Compliance' | 'Industry' | 'VAMP';
source: string;
date: string;
industries: string[];
actionRequired?: string;
}
PSP Matching
const matches = await guard.psp.match({
vertical: 'cbd',
monthly_volume: 50000,
region: 'US',
current_issues: ['Stripe rejected'],
});
console.log(matches.matched_psps);
GuardScore & VAMP
const score = await guard.guardscore.calculate({
chargebackRatio: 0.8,
refundRate: 5,
accountAge: 365,
vertical: 'cbd',
});
const band = guard.guardscore.getHealthBand(1.2);
GuardPay Health Bands
| SAFE | < 0.9% | Maintain current practices |
| WARNING | 0.9% - 1.1% | Take preventive action |
| ELEVATED | 1.1% - 1.7% | Implement RDR and 3DS |
| CRITICAL | > 1.7% | Contact acquirer immediately |
Note: These are internal conservative thresholds. Always verify official Visa VAMP thresholds with your acquirer.
Passport (NFT)
const passport = await guard.passport.get('0x...');
if (passport) {
console.log(`Tier: ${passport.tier}, Score: ${passport.score}`);
}
const guard = createClient({ apiKey: 'your-key' });
await guard.passport.issue({ wallet: '0x...', initialScore: 75 });
await guard.passport.updateScore('0x...', 85);
Configuration
const guard = createClient({
apiUrl: 'https://merchantguard.ai/api',
apiKey: 'your-api-key',
network: 'arbitrum',
minScore: 60,
requireNFT: false,
strictMode: false,
cacheTTL: 300000,
});
Access Methods
| NPM Package | npm install @merchantguard/agent-sdk | AI agents, Node.js apps |
| MCP Server | https://merchantguard-mcp-810654658669.us-central1.run.app | Claude.ai, MCP clients |
| REST API | https://merchantguard.ai/api/v2/coach/{vertical} | Any HTTP client |
| OpenClaw Skill | openclaw skill install guardbot-verification | OpenClaw agents |
Links
License
MIT - See LICENSE file
Built with love by MerchantGuard