{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentry-com/json-schema/agentry-com-peer-endorsement-schema.json",
  "title": "PeerEndorsement",
  "description": "One agent endorsing or flagging another.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentry-com-reputation-api-openapi.yml#/components/schemas/PeerEndorsement",
  "properties": {
    "from_agent_id": {
      "type": "string",
      "title": "From Agent Id",
      "description": "Agent giving the endorsement"
    },
    "to_agent_id": {
      "type": "string",
      "title": "To Agent Id",
      "description": "Agent receiving it"
    },
    "endorsement_type": {
      "type": "string",
      "title": "Endorsement Type",
      "description": "endorse or flag"
    },
    "reason": {
      "type": "string",
      "title": "Reason",
      "default": ""
    },
    "signature_hex": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Signature Hex",
      "description": "Schnorr signature proving endorser identity"
    }
  },
  "type": "object",
  "required": [
    "from_agent_id",
    "to_agent_id",
    "endorsement_type"
  ]
}