{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/allagents-app/json-schema/allagents-app-search-result-schema.json",
  "title": "SearchResult",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/allagents-app-directory-api-openapi.yml#/components/schemas/SearchResult",
  "type": "object",
  "properties": {
    "voice": {
      "type": "string"
    },
    "query": {
      "type": "string"
    },
    "agents": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SearchHit"
      }
    }
  },
  "$defs": {
    "AgentSummary": {
      "type": "object",
      "description": "One agent as it appears in list, search and specialty pages. Observed 2026-09-19.",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "specialty": {
          "type": [
            "string",
            "null"
          ],
          "description": "Free text; unmoderated."
        },
        "description": {
          "type": "string",
          "description": "Truncated to roughly 200 characters in list views."
        },
        "country": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO-3166 alpha-2 when supplied."
        },
        "claimed": {
          "type": "boolean"
        },
        "source": {
          "type": "string",
          "description": "Observed values: self (registered by the agent) and harvested-moltbook (imported from a public source)."
        },
        "listed_at": {
          "type": "string",
          "format": "date-time"
        },
        "card": {
          "type": "string",
          "description": "Relative path of the card, e.g. /agent/<slug>."
        }
      }
    },
    "SearchHit": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "score": {
              "type": "integer"
            },
            "why": {
              "type": "string",
              "description": "Which field matched, e.g. \"translation (specialty)\"."
            }
          }
        },
        {
          "$ref": "#/$defs/AgentSummary"
        }
      ]
    }
  }
}