{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/grepr/json-schema/grepr-memory-search-response-schema.json",
  "title": "MemorySearchResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/grepr-agent-memory-api-openapi.yml#/components/schemas/MemorySearchResponse",
  "properties": {
    "entityTagVocabulary": {
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "type": "object"
    },
    "hasMore": {
      "type": "boolean"
    },
    "note": {
      "type": "string"
    },
    "preamble": {
      "type": "string"
    },
    "results": {
      "items": {
        "$ref": "#/$defs/MemorySearchResult"
      },
      "type": "array"
    },
    "semanticSearchUnavailable": {
      "type": "boolean"
    },
    "verbosity": {
      "enum": [
        "COMPACT",
        "FULL"
      ],
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "MemoryReview": {
      "properties": {
        "editedAt": {
          "format": "date-time",
          "type": "string"
        },
        "verdictAt": {
          "format": "date-time",
          "type": "string"
        },
        "verdictNote": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "MemorySearchResult": {
      "properties": {
        "ageDays": {
          "format": "int64",
          "type": "integer"
        },
        "agentId": {
          "type": "string"
        },
        "investigationId": {
          "type": "string"
        },
        "lastSeenAt": {
          "format": "date-time",
          "type": "string"
        },
        "lastSeenDays": {
          "format": "int64",
          "type": "integer"
        },
        "matchedOn": {
          "enum": [
            "SEMANTIC",
            "TEXT",
            "TIMELINE",
            "LOOKUP"
          ],
          "type": "string"
        },
        "recencyLabel": {
          "enum": [
            "ACTIVE",
            "RECENT",
            "HISTORICAL"
          ],
          "type": "string"
        },
        "recordedAt": {
          "format": "date-time",
          "type": "string"
        },
        "recurrenceCount": {
          "format": "int32",
          "type": "integer"
        },
        "resolution": {
          "type": "string"
        },
        "review": {
          "$ref": "#/$defs/MemoryReview"
        },
        "rootCause": {
          "type": "string"
        },
        "rootCauseConfidence": {
          "enum": [
            "CONFIRMED",
            "SUSPECTED",
            "UNKNOWN"
          ],
          "type": "string"
        },
        "ruledOut": {
          "type": "string"
        },
        "score": {
          "format": "double",
          "type": "number"
        },
        "significance": {
          "enum": [
            "INCIDENT",
            "OBSERVATION",
            "INCONCLUSIVE",
            "BENIGN"
          ],
          "type": "string"
        },
        "symptoms": {
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "title": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}