SDK

AFG is keyless by design, so the "SDK" is deliberately tiny: a one-file Python helper for attesting payments, and a zero-dependency query you can make from any language with an HTTP client. No API key, no signup, no SDK account.

Honest status: today the SDK is a single Python helper plus the plain HTTP query. There is no packaged multi-language SDK or pip release yet — just the file below. Attestation capture is live; attestations are stored but do not yet affect the trust score (the scoring weight is off until there's enough real data to calibrate it honestly).

1. Query a trust score (any language, no key)

One GET request returns a 300–850 score with a transparent factor breakdown. No dependencies.

curl 'https://afg.ai/v2/api/trust?wallet=0x...'
# or by agent id:
curl 'https://afg.ai/v2/api/trust?agent_id=my-agent-001'

Python:

import requests
r = requests.get("https://afg.ai/v2/api/trust",
                 params={"wallet": "0x..."})
print(r.json()["trust_score"], r.json()["breakdown"])

2. Attest a payment (Python helper)

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  (pip install eth-account requests).

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", ...}

What you can rely on

Read back attestations

curl 'https://afg.ai/v2/api/attestations?address=0x...'

Full endpoint reference is in the API Docs.