Skip to content

AsterPay/kya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kya — Know Your Agent

Trust scoring for AI agents. Check any wallet's trust score, verify ERC-8004 identity, get tier. Zero dependencies.

npm install agent-kya

Also available as: pip install agent-kya

Quick start

import kya from 'agent-kya';

// Trust score (0–100) — FREE, no API key
const { score, tier } = await kya.check('0xABC...');
console.log(score); // 73
console.log(tier);  // 'trusted'

// Quick boolean
if (await kya.isTrusted('0xABC...', 50)) {
  // safe to transact
}

Why

Every AI agent that transacts with another agent needs to answer one question: should I trust this address?

kya answers it in one line. No signup, no API key, no payment for basic checks.

API

Free (no API key)

Function What it does
kya.check(address) Trust score 0–100, tier, components, blocked status
kya.verify(address) ERC-8004 identity verification (registered agent?)
kya.tier(address) Trust tier + transaction limits
kya.batchCheck(addresses) Batch trust check (max 10)
kya.framework() Scoring methodology, tiers, endpoints
kya.isTrusted(address, minScore?) Quick boolean: score ≥ minScore and not blocked

Premium ($0.01/query via x402)

Function What it does
kya.deepAnalysis(address) Behavioral signals, velocity scoring, anomaly flags, recommendation

Examples

Check before paying another agent

import kya from 'kya';

async function payAgent(agentAddress: string, amount: number) {
  const trust = await kya.check(agentAddress);

  if (trust.blocked) throw new Error('Agent is sanctioned');
  if (trust.score < 20) throw new Error('Trust too low');

  // Proceed with payment...
}

Verify ERC-8004 identity

const { verified, agentId } = await kya.verify('0x...');
if (!verified) {
  console.log('Not a registered agent');
}

Batch check multiple agents

const results = await kya.batchCheck([
  '0xAgent1...',
  '0xAgent2...',
  '0xAgent3...',
]);
results.forEach(r => console.log(r.address, r.score, r.tier));

Deep analysis (paid)

const deep = await kya.deepAnalysis('0x...');
console.log(deep.recommendation); // 'allow' | 'review' | 'block'
console.log(deep.behavioral.anomalyFlags);

Custom API endpoint

import kya from 'agent-kya';

kya.configure({ baseUrl: 'https://my-kya-server.com' });

Trust tiers

Tier Score Max per TX Requirements
Open 0–19 $1 Wallet + sanctions pass
Verified 20–49 $1,000 ERC-8004 identity + wallet history
Trusted 50–79 $10,000 Operator KYB + Travel Rule
Enterprise 80–100 Unlimited Full KYB + trust bond + SLA

How it works

kya queries the AsterPay KYA API which aggregates:

  1. On-chain identity — ERC-8004 registration on Base
  2. Wallet history — age, transaction count, balance patterns
  3. Behavioral signals — velocity, pattern analysis, anomaly detection
  4. Sanctions screening — OFAC, EU, UN sanctions lists

All free endpoints require no authentication. The API is rate-limited but generous for normal use.

Framework integrations

  • LangChain: pip install asterpay[langchain]
  • CrewAI: pip install asterpay[crewai]
  • MCP Server: npx @asterpay/mcp-server
  • AgentKit: npm install @asterpay/agentkit-kya

License

MIT — AsterPay

About

Know Your Agent — trust scoring for AI agents. npm install agent-kya / pip install agent-kya. Free, zero deps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages