{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-memory-search-result-schema.json",
  "title": "MemorySearchResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-memory-api-openapi.yml#/components/schemas/MemorySearchResult",
  "type": "object",
  "required": [
    "memories"
  ],
  "properties": {
    "memories": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MemoryHit"
      }
    }
  },
  "$defs": {
    "MemoryHit": {
      "type": "object",
      "description": "One search result.",
      "required": [
        "id",
        "tier",
        "content",
        "relevance"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "tier": {
          "type": "string",
          "enum": [
            "semantic",
            "episodic",
            "procedural",
            "graph"
          ]
        },
        "content": {
          "type": "string"
        },
        "relevance": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "Relevance from 0 to 1, rounded to 3 decimals."
        }
      }
    }
  }
}