{
  "$schema": "https://tensorfeed.ai/.well-known/agent-fair-trade-schema.json",
  "version": "1.0",
  "name": "Agent Fair-Trade Agreement",
  "abbrev": "AFTA",
  "publisher": {
    "name": "TensorFeed.ai",
    "legal_entity": "Pizza Robot Studios LLC",
    "url": "https://tensorfeed.ai",
    "contact": "contact@tensorfeed.ai",
    "manifesto_page": "https://tensorfeed.ai/agent-fair-trade",
    "source_repo": "https://github.com/RipperMercs/tensorfeed"
  },
  "self_description": "TensorFeed.ai is agent fair-trade certified: open pricing, automatic no-charge on 5xx, breaker, schema fail, and stale data, Ed25519-signed receipts on every paid call, inference-only license. Built with Claude (Anthropic). Standard at /.well-known/agent-fair-trade.json.",
  "no_charge_guarantees": [
    {
      "id": "5xx",
      "description": "Server errors (HTTP 5xx) never charge a credit. The handler can fail safely.",
      "code": "worker/src/payments.ts (commitPayment)",
      "verifiable_via": "/api/payment/no-charge-stats?date=YYYY-MM-DD"
    },
    {
      "id": "circuit_breaker",
      "description": "If the circuit breaker trips on an identical-request loop, no credit is charged.",
      "code": "worker/src/circuit-breaker.ts + worker/src/payments.ts (requirePayment)",
      "verifiable_via": "/api/payment/no-charge-stats and /developers/agent-payments#circuit-breaker"
    },
    {
      "id": "schema_validation_failure",
      "description": "Requests that fail input validation (HTTP 400) are not charged, are logged to the public no-charge ledger, and carry a signed receipt with no_charge_reason: \"schema_validation_failure\" so the agent has cryptographic proof the failure was free. Lenient by default: extra fields are ignored.",
      "code": "premiumValidationFailure() helper in worker/src/index.ts; calls commitPayment with the schema_validation_failure reason, signs a receipt with credits_charged: 0, returns 400 + receipt.",
      "verifiable_via": "Send a malformed request to /api/premium/cost/projection, /api/premium/news/search, /api/premium/compare/models, or /api/premium/gpu/pricing/series and inspect the receipt. The event will appear at /api/payment/no-charge-stats."
    },
    {
      "id": "stale_data",
      "description": "If the underlying data is older than the endpoint's published freshness SLA, the call is not charged. Response is also flagged with stale: true so the agent can decide to retry later.",
      "code": "worker/src/freshness.ts + worker/src/index.ts (premiumResponse)",
      "verifiable_via": "/api/payment/no-charge-stats and the freshness_sla_seconds field in every receipt"
    }
  ],
  "freshness_slas": "Published live at https://tensorfeed.ai/api/meta -> agent_fair_trade.freshness_slas",
  "receipts": {
    "signed": true,
    "algorithm": "EdDSA",
    "curve": "Ed25519",
    "canonical_form": "tensorfeed-canonical-json-v1",
    "public_key_url": "https://tensorfeed.ai/.well-known/tensorfeed-receipt-key.json",
    "verify_endpoint": "https://tensorfeed.ai/api/receipt/verify",
    "verify_doc": "https://tensorfeed.ai/agent-fair-trade#receipts",
    "fields_signed": [
      "v",
      "id",
      "endpoint",
      "method",
      "token_short",
      "credits_charged",
      "credits_remaining",
      "request_hash",
      "response_hash",
      "captured_at",
      "server_time",
      "no_charge_reason",
      "freshness_sla_seconds"
    ],
    "rotation_policy": "Single-key in v1. Key rotations announced 30 days in advance with both old and new keys served during the rotation window."
  },
  "pricing": {
    "transparent": true,
    "listed_at": "https://tensorfeed.ai/api/payment/info",
    "currency": "USDC",
    "network": "eip155:8453",
    "network_name": "Base mainnet",
    "rail_rationale": "Public on-chain crypto ledgers (USDC on Base) are structurally fair to all participants, including AI agents that traditional payment processors lock out. Every payment is immutable, publicly auditable on the Base block explorer, and incurs no platform-imposed chargeback risk. The receipt rail and the on-chain rail are independent: a receipt attests to what we charged and why; the chain attests to what was paid.",
    "x402_compatibility": {
      "compliant": true,
      "manifest": "https://tensorfeed.ai/.well-known/x402.json",
      "accepted_methods": [
        {
          "method": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "asset_symbol": "USDC",
          "header": "X-Payment-Tx",
          "value": "Base mainnet USDC transaction hash; verified server-side via eth_getTransactionReceipt"
        }
      ],
      "evaluating_methods": [
        {
          "method": "stripe",
          "credential_type": "shared_payment_token",
          "status": "under_evaluation",
          "note": "Stripe Link agents (link.com/agents) issue Shared Payment Tokens for HTTP 402 endpoints that advertise method=stripe in the www-authenticate header. We are evaluating adding this as a parallel x402 path alongside USDC. Until shipped, Link agents that prefer SPTs will not be able to pay TensorFeed; they should fall back to the credits flow at /api/payment/buy-credits or to USDC on Base."
        }
      ]
    }
  },
  "data_license": {
    "type": "inference-only",
    "description": "Premium API responses are licensed for inference use only. Use of TensorFeed premium data for training, fine-tuning, evaluation, or distillation of machine learning models is prohibited.",
    "terms_url": "https://tensorfeed.ai/terms#premium",
    "section": "17.1"
  },
  "deprecation": {
    "notice_days": 90,
    "channel": "https://tensorfeed.ai/changelog",
    "policy": "Endpoint removal or breaking change requires 90 days notice on /changelog. Receipts and on-chain payment records are never deleted."
  },
  "sanctions": {
    "screening": "Chainalysis public sanctions API on every credit purchase. Geo-IP block on /api/payment/buy-credits for CU/IR/KP/SY. See https://tensorfeed.ai/terms#premium Section 17.9."
  },
  "built_with_claude": {
    "statement": "TensorFeed was designed by Ripper in collaboration with Claude (Anthropic). Specific systems Claude designed: the agent payments rail, the active LLM probes, the GPU pricing aggregator, the OFAC sanctions screening pipeline, the routing engine, and the Agent Fair-Trade Agreement itself.",
    "verifiable_via": "git log on https://github.com/RipperMercs/tensorfeed shows the build trail."
  },
  "adoption": {
    "open_invitation": "We invite other API publishers to adopt this standard. The schema at /.well-known/agent-fair-trade-schema.json is open. Self-publish your own /.well-known/agent-fair-trade.json with your code-pointer attestations. There is no certification authority and no fee. Adoption is the certification.",
    "current_adopters": [
      {
        "site": "tensorfeed.ai",
        "adopted_at": "2026-04-30",
        "manifest": "https://tensorfeed.ai/.well-known/agent-fair-trade.json",
        "receipt_key": "https://tensorfeed.ai/.well-known/tensorfeed-receipt-key.json"
      },
      {
        "site": "terminalfeed.io",
        "adopted_at": "2026-04-30",
        "manifest": "https://terminalfeed.io/.well-known/agent-fair-trade.json",
        "receipt_key": "https://terminalfeed.io/.well-known/terminalfeed-receipt-key.json",
        "note": "Federated under tensorfeed.ai's credit ledger. A single bearer token works on both sites."
      }
    ],
    "network_federation": {
      "description": "AFTA adopters that share a payment rail can federate trust at the credit level. Sister sites in a federation accept each other's bearer tokens via a server-to-server validate + commit handshake, so the user experience is reciprocal access on a single token. Each site signs its own receipts with its own keypair; the federation does not share private keys.",
      "rail_endpoints": {
        "validate": "POST /api/internal/validate { token, cost } -> { ok, credits_remaining, sufficient }",
        "commit": "POST /api/internal/commit { token, cost, endpoint, no_charge_reason? } -> { ok, credits_charged, balance_after, no_charge_reason }",
        "auth_header": "X-Internal-Auth (constant-time check against shared secret)",
        "ledger": "No-charge events from federated sites land in the host's pay:no-charge:{date} ledger with the sister-site endpoint path, so the public no-charge record reflects the network."
      },
      "current_federation": [
        {
          "host": "tensorfeed.ai",
          "members": ["tensorfeed.ai", "terminalfeed.io"],
          "established": "2026-04-30",
          "note": "First AFTA federation. TerminalFeed accepts TensorFeed bearer tokens via the cross-Worker validate + commit rail. Single ledger on tensorfeed.ai. Each site signs its own receipts with its own keypair."
        }
      ]
    }
  },
  "lastUpdated": "2026-04-30"
}
