{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agentqueryprotocol.com/specification/2026-07-30/schema/query-subject.schema.json",
  "title": "AQP QuerySubject",
  "description": "A portable reference to the thing a query is about.",
  "type": "object",
  "additionalProperties": false,
  "required": ["kind", "id"],
  "properties": {
    "kind": {
      "enum": ["interaction", "message", "task", "artifact", "tool_call", "response", "resource", "service", "user", "other"]
    },
    "id": { "type": "string", "minLength": 1, "maxLength": 256 },
    "protocol": { "type": "string", "minLength": 1, "maxLength": 64 },
    "contextId": { "type": "string", "minLength": 1, "maxLength": 256 },
    "parentId": { "type": "string", "minLength": 1, "maxLength": 256 }
  }
}
