{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://creatorfront.ai/.well-known/agents.schema.json",
  "title": "Creatorfront agents.json manifest",
  "description": "Schema for the /.well-known/agents.json manifest published by Creatorfront's storefronts subdomain (Pillar 4 — agent-web). Documents the AI-readable surfaces, JSON facades, and attribution metadata that shopping agents (Perplexity, Operator, Claude, etc.) can discover and transact through. The schema is informational — there is no formal registry; we publish it so agents can validate the manifest shape if they want.",
  "type": "object",
  "required": ["name", "site_type", "surfaces", "commerce"],
  "properties": {
    "schema": {
      "type": "string",
      "format": "uri",
      "description": "Self-reference to this schema document. Optional."
    },
    "name": {
      "type": "string",
      "description": "Brand name of the site publishing the manifest."
    },
    "description": {
      "type": "string",
      "description": "Plain-language description of what the site is and how an agent should think about it."
    },
    "site_type": {
      "type": "string",
      "enum": [
        "creator_commerce_aggregator",
        "merchant_storefront",
        "marketplace",
        "content_site"
      ],
      "description": "Coarse-grained categorization so the agent can pick the right interaction strategy."
    },
    "surfaces": {
      "type": "array",
      "description": "One entry per discoverable surface. Each surface gives the agent a URL template and a hint at the response format.",
      "items": {
        "type": "object",
        "required": ["type", "url_template", "format"],
        "properties": {
          "type": {
            "type": "string",
            "description": "Surface kind, e.g. `storefront`, `storefront_json`, `product`."
          },
          "url_template": {
            "type": "string",
            "description": "RFC 6570 URI template with placeholders like {creator_slug}."
          },
          "format": {
            "type": "string",
            "enum": ["html", "json"],
            "description": "Wire format of the response body."
          },
          "structured_data": {
            "type": "string",
            "enum": ["schema.org", "jsonld_custom", "none"],
            "description": "If the surface is HTML, which structured-data convention it embeds."
          },
          "content_type": {
            "type": "string",
            "description": "Optional explicit Content-Type for JSON surfaces."
          }
        }
      }
    },
    "commerce": {
      "type": "object",
      "description": "Cart, checkout, and attribution metadata.",
      "required": ["checkout_provider", "attribution"],
      "properties": {
        "checkout_provider": {
          "type": "string",
          "description": "Where the actual transaction happens. `shopify_universal_cart_or_brand_native` means the agent should construct a Shopify cart deep-link from the product surface; `brand_native_only` means each product page links to the brand's own checkout."
        },
        "attribution": {
          "type": "object",
          "required": ["cookie", "ttl_days"],
          "properties": {
            "cookie": {
              "type": "string",
              "description": "Cookie name the storefront sets to attribute the originating creator."
            },
            "ttl_days": {
              "type": "integer",
              "minimum": 1,
              "description": "Attribution window in days."
            },
            "also_via": {
              "type": "string",
              "description": "Backup attribution mechanism for agents that don't persist cookies."
            }
          }
        },
        "bot_friendly": {
          "type": "boolean",
          "description": "Whether the site welcomes automated agents (rate-limits, robots.txt allowances, etc.)."
        },
        "affiliate_disclosure": {
          "type": "string",
          "description": "Plain-English disclosure that the surfaces involve creator commission revenue."
        }
      }
    },
    "contact": {
      "type": "string",
      "format": "email",
      "description": "Partnership/integration contact for agent operators."
    },
    "docs": {
      "type": "string",
      "format": "uri",
      "description": "Human-readable documentation of the agent-web surfaces."
    },
    "last_updated": {
      "type": "string",
      "format": "date",
      "description": "ISO date the manifest was last updated."
    }
  },
  "additionalProperties": true
}
