API Reference

AFG is autonomous, neutral trust infrastructure for AI agents. The public endpoint is keyless: anyone can query any wallet and get a transparent 300–850 Trust Score derived from unfakeable on-chain behavior. No signup, no key, no human in the loop.

Trust Bureau · Private Beta
POST/v2/api/register
// Optional: register an agent ID. Not required to be scored.
{ agent_id: my-agent-001, platform: my-platform }
Trust Bureau · Private Beta
GET/v2/api/score?agent_id=my-agent-001
// Legacy attested-only score. Prefer GET /v2/api/trust below.
Trust Score · Live
GET/v2/api/trust?agent_id=...&wallet=0x...
// Neutral composite Trust Score (300-850) with a transparent
// factor breakdown, a basis label, and a confidence tier.
// Provide agent_id (attested basis), wallet (on-chain basis), or both.
//
// Returns: { trust_score, range:[300,850], breakdown:{ measures,
//   does_not_measure, neutrality, factors, overall_confidence } }

What the Trust Score measures

What it does not measure

Neutrality: AFG is an independent third party — not owned by or affiliated with any wallet, rail, or cloud provider. A single agent can carry signals from multiple providers (it pays via one rail here, another there); AFG aggregates that cross-provider picture. No single rail can.

Attest a payment in ~10 lines

Attesting is live and keyless — your signature over the payment details is the credential. The signing wallet must be the actual on-chain counterparty (payer = the USDC Transfer sender, payee = the receiver) or the attestation is rejected. Grab the helper: afg_attest_client.py.

from afg_attest_client import attest

resp = attest(
    private_key=KEY,                 # the wallet that was the counterparty
    tx_hash="0x...",                # the USDC payment tx
    chain_id=8453,                   # Base mainnet 8453, Base Sepolia 84532
    payer="0x...", payee="0x...",
    amount=1000000,                  # USDC base units (6 decimals)
    token="0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    role="payer")                    # "payer" or "payee"

print(resp)   # {"verification_status": "verified", "reason": "ok", ...}

Honest status: attestation capture is live, but verified attestations do not yet affect any trust score — the scoring weight is currently off. We are collecting genuine attestations before calibrating, so the weighting is justified by real data rather than guesses.

Roadmap (not yet live): richer obligation-level signals via proof-carrying attestations — reports where the reporter cryptographically signs with the wallet that was the actual on-chain counterparty, so they are trustless and need no human approval. The old human-vetted reporter path has been removed from the live surface.