{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/SearchAllMessagesRequest",
  "title": "SearchAllMessagesRequest",
  "properties": {
    "query": {
      "type": "string",
      "title": "Query",
      "description": "Text query for full-text search"
    },
    "search_mode": {
      "type": "string",
      "enum": [
        "vector",
        "fts",
        "hybrid"
      ],
      "title": "Search Mode",
      "description": "Search mode to use",
      "default": "hybrid"
    },
    "agent_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Id",
      "description": "Filter messages by agent ID"
    },
    "conversation_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Conversation Id",
      "description": "Filter messages by conversation ID"
    },
    "limit": {
      "type": "integer",
      "maximum": 100,
      "minimum": 1,
      "title": "Limit",
      "description": "Maximum number of results to return",
      "default": 50
    },
    "start_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Date",
      "description": "Filter messages created after this date"
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "End Date",
      "description": "Filter messages created on or before this date"
    }
  },
  "type": "object",
  "required": [
    "query"
  ]
}