{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://empresacomia.sniperbr.com/schema/agent.schema.json",
  "title": "Agente ou assistente de IA para PMEs",
  "description": "Registro de uma ferramenta no diretório. Regra de ouro: todo dado factual tem fonte (URL) e data de verificação. Quando não há certeza, o valor é a string \"a_verificar\" (ou null nos campos numéricos).",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "company",
    "website",
    "summary_pt",
    "agent_type",
    "tasks",
    "sectors",
    "channels",
    "integrations",
    "pricing",
    "languages_ui",
    "compliance",
    "technical_level",
    "implementation_time",
    "pros",
    "cons",
    "best_for_pt",
    "use_cases_pt",
    "alternatives",
    "sources",
    "data_status",
    "last_verified"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
      "description": "Slug único em kebab-case. Vira a URL /agentes/{id}."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "company": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Empresa dona do produto."
    },
    "website": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://"
    },
    "logo_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "URL pública do logotipo (opcional)."
    },
    "hq_country": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[A-Z]{2}$",
      "description": "País-sede (ISO 3166-1 alpha-2)."
    },
    "founded_year": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1950,
      "maximum": 2100
    },
    "summary_pt": {
      "type": "string",
      "minLength": 150,
      "maxLength": 600,
      "description": "Resposta direta e citável, 40–60 palavras, PT-BR, factual. É o primeiro parágrafo da página."
    },
    "summary_en": {
      "type": [
        "string",
        "null"
      ],
      "description": "Versão em inglês (fase 2)."
    },
    "agent_type": {
      "type": "string",
      "enum": [
        "chatbot_texto",
        "agente_voz",
        "copiloto",
        "automacao_fluxos",
        "plataforma_builder",
        "crm_com_ia",
        "saas_vertical_com_ia",
        "api_infra"
      ]
    },
    "tasks": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "atendimento_whatsapp",
          "agendamento",
          "cobranca",
          "sdr_vendas",
          "suporte",
          "marketing",
          "financeiro",
          "rh",
          "documentos_produtividade"
        ]
      }
    },
    "sectors": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "clinicas",
          "advocacia",
          "contabilidade",
          "imobiliarias",
          "ecommerce",
          "restaurantes",
          "academias",
          "escolas",
          "saloes_estetica",
          "varejo",
          "horizontal"
        ]
      }
    },
    "channels": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "whatsapp",
          "instagram",
          "messenger",
          "telegram",
          "webchat",
          "email",
          "voz_telefone",
          "sms",
          "app_proprio"
        ]
      }
    },
    "integrations": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "whatsapp_api_oficial",
          "whatsapp_nao_oficial",
          "instagram",
          "messenger",
          "telegram",
          "google_calendar",
          "google_workspace",
          "gmail",
          "outlook_microsoft365",
          "hubspot",
          "pipedrive",
          "rd_station",
          "salesforce",
          "zoho",
          "kommo",
          "zapier",
          "make",
          "n8n",
          "api_rest",
          "webhooks",
          "shopify",
          "nuvemshop",
          "woocommerce",
          "vtex",
          "tray",
          "loja_integrada",
          "mercado_livre",
          "asaas",
          "stripe",
          "pix",
          "pagarme",
          "mercado_pago",
          "openai",
          "anthropic",
          "google_gemini",
          "slack",
          "notion",
          "trello",
          "conta_azul",
          "omie",
          "bling",
          "tiny",
          "ifood",
          "calendly"
        ]
      }
    },
    "integrations_other": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Integrações citadas no site oficial que não estão na lista fixa."
    },
    "ai_capabilities": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "respostas_generativas",
          "base_conhecimento_rag",
          "agendamento_autonomo",
          "qualificacao_leads",
          "transcricao",
          "resumo_conversas",
          "acoes_em_sistemas",
          "voz_sintetizada",
          "analise_sentimento",
          "geracao_conteudo",
          "previsao_analytics",
          "nenhuma_declarada"
        ]
      }
    },
    "pricing": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model",
        "status"
      ],
      "properties": {
        "model": {
          "type": "string",
          "enum": [
            "gratuito",
            "freemium",
            "assinatura",
            "por_uso",
            "por_assento",
            "por_conversa",
            "cotacao",
            "open_source",
            "a_verificar"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "BRL",
            "USD",
            "EUR",
            "GBP",
            null
          ]
        },
        "entry_price": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "description": "Menor preço pago publicado, na moeda original."
        },
        "entry_price_period": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "mes",
            "ano",
            "unico",
            "por_uso",
            null
          ]
        },
        "entry_plan_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "plans": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "price": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "period": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "mes",
                  "ano",
                  "unico",
                  "por_uso",
                  null
                ]
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "free_plan": {
          "type": [
            "boolean",
            "string",
            "null"
          ],
          "description": "true/false ou \"a_verificar\"."
        },
        "free_trial_days": {
          "type": [
            "integer",
            "string",
            "null"
          ],
          "description": "Dias de teste grátis, null se não há, ou \"a_verificar\"."
        },
        "price_notes": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "verified_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "status": {
          "type": "string",
          "enum": [
            "verificado",
            "parcial",
            "a_verificar"
          ],
          "description": "verificado = valor lido na página oficial de preços; parcial = parte dos valores confirmada em fonte oficial (ex.: só o plano de entrada ou só o modelo); a_verificar = nada confirmado."
        }
      }
    },
    "languages_ui": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Idiomas da interface (ex.: pt-BR, en, es) ou [\"a_verificar\"]."
    },
    "languages_bot": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Idiomas que o agente atende."
    },
    "compliance": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "lgpd",
        "gdpr"
      ],
      "properties": {
        "lgpd": {
          "type": "string",
          "enum": [
            "sim",
            "nao",
            "a_verificar"
          ],
          "description": "\"sim\" só com menção explícita no site/política."
        },
        "gdpr": {
          "type": "string",
          "enum": [
            "sim",
            "nao",
            "a_verificar"
          ]
        },
        "data_residency": {
          "type": [
            "string",
            "null"
          ],
          "description": "Onde os dados ficam hospedados, se declarado (ex.: \"Brasil\", \"EUA\", \"a_verificar\")."
        },
        "certifications": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Ex.: SOC 2, ISO 27001 — apenas se declaradas."
        },
        "source_url": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "technical_level": {
      "type": "string",
      "enum": [
        "nenhum",
        "basico",
        "intermediario",
        "avancado",
        "a_verificar"
      ]
    },
    "implementation_time": {
      "type": "string",
      "enum": [
        "minutos",
        "horas",
        "dias",
        "semanas",
        "a_verificar"
      ]
    },
    "support_pt_br": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "sim",
        "nao",
        "a_verificar",
        null
      ]
    },
    "pros": {
      "type": "array",
      "minItems": 1,
      "maxItems": 6,
      "items": {
        "type": "string"
      }
    },
    "cons": {
      "type": "array",
      "minItems": 1,
      "maxItems": 6,
      "items": {
        "type": "string"
      }
    },
    "best_for_pt": {
      "type": "string",
      "minLength": 10
    },
    "use_cases_pt": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "alternatives": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
      },
      "description": "Slugs de alternativas (apenas ids existentes são exibidos)."
    },
    "editorial": {
      "type": "object",
      "additionalProperties": false,
      "description": "Avaliação humana. Só gera marcação Review quando reviewed_by e note existem.",
      "properties": {
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "rating": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 1,
          "maximum": 5,
          "description": "Nota humana 1–5 (opcional)."
        },
        "reviewed_by": {
          "type": [
            "string",
            "null"
          ]
        },
        "reviewed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "criteria": {
          "type": "object",
          "additionalProperties": {
            "type": [
              "number",
              "string",
              "null"
            ]
          },
          "description": "Notas por critério (ex.: facilidade, ia, custo_beneficio, lgpd, suporte)."
        }
      }
    },
    "sponsorship": {
      "type": "object",
      "additionalProperties": false,
      "description": "Listagem destacada paga. Sempre exibida com o rótulo \"Patrocinado\".",
      "properties": {
        "sponsored": {
          "type": "boolean"
        },
        "until": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "placements": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "home",
              "setor",
              "tarefa",
              "comparativo"
            ]
          }
        }
      }
    },
    "affiliate_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Link de afiliado (rel=\"sponsored\"), se houver."
    },
    "sources": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url",
          "accessed_at"
        ],
        "properties": {
          "url": {
            "type": "string",
            "pattern": "^https?://"
          },
          "accessed_at": {
            "type": "string",
            "format": "date"
          },
          "covers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "data_status": {
      "type": "string",
      "enum": [
        "verificado",
        "parcial",
        "a_verificar"
      ]
    },
    "last_verified": {
      "type": "string",
      "format": "date"
    },
    "published": {
      "type": "boolean",
      "default": true,
      "description": "false mantém o registro fora do site (rascunho)."
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Observações internas de pesquisa."
    }
  }
}