{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/studiomeyer-io/json-schema/studiomeyer-io-search-input-schema.json",
  "title": "SearchInput",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/memory-openapi.json#/components/schemas/SearchInput",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "project": {
      "type": "string"
    },
    "agentId": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200,
        "x-max-utf16-code-units": 200,
        "description": "Non-blank exact tag, no NUL characters. Maximum 200 UTF-16 code units as enforced by the server; astral characters such as emoji count as two units. JSON Schema maxLength counts Unicode characters and cannot enforce this additional JavaScript length bound by itself.",
        "allOf": [
          {
            "pattern": "\\S"
          },
          {
            "pattern": "^[^\\u0000]*$"
          }
        ]
      },
      "minItems": 1,
      "maxItems": 20
    },
    "limit": {
      "type": "integer"
    },
    "types": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "decision",
          "learning",
          "session",
          "skill",
          "evolution",
          "entity"
        ]
      }
    },
    "recencyWeight": {
      "type": "number"
    },
    "memoryType": {
      "type": "string",
      "enum": [
        "episodic",
        "semantic",
        "all"
      ]
    },
    "agentic": {
      "type": "boolean"
    },
    "rerank": {
      "type": "boolean"
    },
    "rerankTopK": {
      "type": "integer"
    },
    "asOf": {
      "type": "string",
      "format": "date-time"
    },
    "dateRangeStart": {
      "type": "string",
      "description": "ISO date or date-time; used together with dateRangeEnd."
    },
    "dateRangeEnd": {
      "type": "string",
      "description": "ISO date or date-time. Date-only values include the full UTC day."
    },
    "expand": {
      "type": "boolean"
    },
    "noiseFilter": {
      "type": "boolean"
    },
    "includeArchived": {
      "type": "boolean"
    },
    "includeEphemeral": {
      "type": "boolean"
    },
    "readOnly": {
      "type": "boolean"
    },
    "trackUsage": {
      "type": "boolean"
    }
  },
  "required": [
    "query"
  ],
  "allOf": [
    {
      "if": {
        "required": [
          "tags"
        ]
      },
      "then": {
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "rerankTopK": {
            "type": "integer",
            "minimum": 3,
            "maximum": 20
          }
        }
      },
      "else": {
        "properties": {
          "query": {
            "type": "string",
            "pattern": "\\S"
          }
        }
      }
    }
  ]
}