{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/luniumpay-com/json-schema/luniumpay-com-agent-identity-schema.json",
  "title": "AgentIdentity",
  "description": "Identidade PERMANENTE do agente. Credencial e substituivel; linhagem, volume, recompensa, mandate e reputacao pertencem ao agent_id.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/luniumpay-com-mesh-identity-api-openapi.yml#/components/schemas/AgentIdentity",
  "type": "object",
  "properties": {
    "agent_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "contact": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "$ref": "#/$defs/AgentLifecycle"
    },
    "environment": {
      "type": "string",
      "enum": [
        "sandbox",
        "production"
      ]
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "settlement_address": {
      "type": [
        "string",
        "null"
      ]
    },
    "referred_by": {
      "type": [
        "string",
        "null"
      ],
      "description": "Imutavel apos o registro (gatilho no banco)."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "AgentLifecycle": {
      "type": "string",
      "enum": [
        "registered",
        "sandbox_active",
        "validated",
        "production_active",
        "suspended"
      ],
      "description": "Producao e ativada por POLITICA, sem humano no circuito. Nao existe estado de espera por aprovacao: o controle de risco esta na regua por PAGADOR (cash-in), no teto por operacao, no teto diario de quem recebe o PIX (venda) e no mandate da propria chave — nao existe teto diario por chave de API (desde 10/09/2026), nem fila de aprovacao."
    }
  }
}