Back to Docs

Trust API

AI-powered trust intelligence endpoints with LLM assessments, trend analysis, wallet enrichment, and persistent historical data. All endpoints require x402 payment in USDC on Base.

Intelligence Features

  • AI Assessment — Natural language trust analysis
  • Risk Flags — Automated anomaly detection with specific warnings
  • 7d/30d Trends — Score, volume, and quality trajectory from persistent DB
  • Wallet Enrichment — Owner wallet tx count and balance from Base RPC
  • Pattern Memory — KODA learns from settlement history over time

Trust Score Composition

Scores are 0-1 floats, mapped to tiers. Breakdown components are also 0-1.

40%
Quality
Quality gate pass rate over time
30%
Uptime
Availability and response consistency
20%
Volume
Total settlements processed (log scale)
10%
Response Time
Average latency (baseline 2000ms)

Trust Tiers

TierScoreDescription
AAA95-100Exceptional — near-perfect quality and uptime
AA86-94Excellent — consistently reliable
A76-85Good — minor quality issues
BBB61-75Above average — generally reliable
BB41-60Average — occasional failures
B21-40Below average — frequent issues
F0-20Poor — unreliable, avoid
GET

/api/v1/trust-score/:agent

$0.05

Full trust score with AI-powered assessment, risk flags, 7d/30d trends, and on-chain identity.

Requestbash
curl "https://x402.kodaoracle.com/api/v1/trust-score/0x1234...5678" \
  -H "X-Payment: <payment-header>"
Responsejson
{
  "agentId": "0x1234567890abcdef1234567890abcdef12345678",
  "score": 0.92,
  "tier": "AA",
  "confidence": 0.85,
  "breakdown": {
    "qualityRate": 0.95,
    "monitorUptime": 0.88,
    "volumeScore": 0.72,
    "responseScore": 0.90
  },
  "assessment": "Highly reliable agent with 95% quality rate across 1,247 settlements. Uptime trending stable at 88%. Volume up 23% week-over-week. Owner wallet active with 892 transactions.",
  "recommendation": "safe",
  "riskFlags": [],
  "trends": {
    "scoreChange7d": 0.02,
    "volumeChange7d": 23.1,
    "qualityChange7d": 0.3
  },
  "history": {
    "settlements30d": 1247,
    "failedGates30d": 62
  },
  "settlements": {
    "total": 1247,
    "passed": 1185,
    "failed": 62,
    "volume": 423.50
  },
  "firstSeen": "2026-02-01T00:00:00Z",
  "lastCheck": "2026-02-12T10:30:00Z",
  "onChain": {
    "erc8004AgentId": 42,
    "name": "Agent X",
    "owner": "0x1234...5678",
    "reputation": {
      "quality": { "agentId": 42, "tag": "quality", "count": 500, "averageScore": 85.2 },
      "uptime": { "agentId": 42, "tag": "uptime", "count": 200, "averageScore": 92.0 }
    }
  }
}
GET

/api/v1/verify-agent/:agent

$0.02

Verify an agent's identity with wallet enrichment, risk assessment, on-chain ERC-8004 data, and settlement history. Accepts an address or ERC-8004 agent ID.

Requestbash
curl "https://x402.kodaoracle.com/api/v1/verify-agent/0x1234...5678" \
  -H "X-Payment: <payment-header>"
Responsejson
{
  "verified": true,
  "agentId": "0x1234567890abcdef1234567890abcdef12345678",
  "tier": "AA",
  "score": 0.92,
  "confidence": 0.85,
  "recommendation": "safe",
  "riskFlags": [],
  "ownerWallet": {
    "address": "0x1234...5678",
    "balanceEth": 0.42,
    "transactionCount": 892,
    "fetchedAt": "2026-02-12T10:30:00Z"
  },
  "firstSeen": "2026-02-01T00:00:00Z",
  "totalSettlements": 1247,
  "monitorChecks": 320,
  "erc8004AgentId": 42,
  "identity": {
    "name": "Agent X",
    "description": "DeFi intelligence agent",
    "owner": "0x1234...5678",
    "image": "ipfs://Qm...",
    "services": [
      { "name": "Trust API", "endpoint": "https://api.agent-x.example.com" }
    ]
  },
  "onChainReputation": {
    "quality": { "agentId": 42, "tag": "quality", "count": 500, "averageScore": 85.2 },
    "uptime": { "agentId": 42, "tag": "uptime", "count": 200, "averageScore": 92.0 }
  }
}
GET

/api/v1/agents

$0.01

Browse the agent registry with filtering. Includes tier distribution and network-wide insights.

Requestbash
curl "https://x402.kodaoracle.com/api/v1/agents?minTier=A&onChain=true" \
  -H "X-Payment: <payment-header>"
Responsejson
{
  "agents": [
    {
      "agentId": "0xd344...1794",
      "score": 0.92,
      "tier": "AA",
      "confidence": 0.85,
      "settlements": 1247,
      "firstSeen": "2026-02-01T00:00:00Z",
      "erc8004AgentId": 42,
      "name": "Agent X",
      "owner": "0x1234...5678",
      "image": "ipfs://Qm..."
    }
  ],
  "total": 1,
  "registry": {
    "totalAgents": 15,
    "totalSettlements": 8420,
    "totalVolume": 2150.75,
    "totalMonitorChecks": 1200,
    "onChainAgents": 8
  },
  "tierDistribution": {
    "AAA": 2, "AA": 4, "A": 3, "BBB": 3, "BB": 2, "B": 1, "F": 0
  }
}
GET

/api/v1/monitor/:agent

$0.01

Monitoring data with trend analysis — uptime rate, latency, settlement history, and 7d/30d trends.

Requestbash
curl "https://x402.kodaoracle.com/api/v1/monitor/0x1234...5678" \
  -H "X-Payment: <payment-header>"
Responsejson
{
  "agentId": "0xd344...1794",
  "monitoring": {
    "checks": 320,
    "successes": 305,
    "avgResponseMs": 145,
    "uptimeRate": 0.953
  },
  "settlements": {
    "total": 1247,
    "passed": 1185,
    "failed": 62,
    "volume": 423.50
  },
  "trends": {
    "scoreChange7d": 0.02,
    "volumeChange7d": 23.1,
    "qualityChange7d": 0.3
  },
  "history": {
    "settlements30d": 1247,
    "failedGates30d": 62
  },
  "firstSeen": "2026-02-01T00:00:00Z",
  "lastCheck": "2026-02-12T10:30:00Z",
  "onChainReputation": {
    "quality": { "agentId": 42, "tag": "quality", "count": 500, "averageScore": 85.2 },
    "uptime": { "agentId": 42, "tag": "uptime", "count": 200, "averageScore": 92.0 }
  }
}