---
updatedAt: 2026-09-25T16:31:43.000Z
agentTools:
  projectIndex: https://docs.constructor.com/llms.txt
---

# Retrieve product question answers

Answer a shopper's question about one specific product. The agent answers from that product's own data rather than by searching the catalog, which is what makes it suitable for the question box on a product page. Which sources it draws on is configured per index key, and typically covers the product's attributes and description, and its customer reviews where those are ingested. Frequently asked questions may be answered from a pre-generated set, so a common question returns faster than a novel one. An answer can cite the part of the product imagery it draws on, such as a size chart or a dimensions diagram, and can suggest related products where they help. `page_context.item_id` is the product the question is about, and `shopper_input` is the question itself. Pass `thread_id` to ask a follow-up in the same conversation. Results stream back as [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) (`text/event-stream`) so the agent's reply can be rendered as it is produced. To receive the finished reply as a single JSON document instead, send `Accept: application/json`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "AI Shopping Agent",
    "summary": "AI Shopping Agent",
    "description": "API documentation for the AI shopping and product insights agent.",
    "version": "v1",
    "contact": {
      "email": "support@constructor.io"
    }
  },
  "servers": [
    {
      "url": "https://agent.cnstrc.com"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Agent insights",
      "description": "AI-powered shopping and product insight results, available as a single JSON response or as a stream of server-sent events.\n\nEvery mode shares one request and response format: the same query parameters, the same `shopper_input`, `page_context` and `parameters` body (plus an optional `request_context` on `chat` and `qna`), the same event vocabulary on the stream and the same aggregated document in JSON. A mode differs only in which of those fields it requires — `parameters.domain` for `chat`, `parameters.strategy` for `recommendations`, `page_context.item_id` for both `qna` and `recommendations`, and nothing beyond `shopper_input` for `search` — so a client integrates once and changes the path to change the exposure.\n\nWhich events a given turn actually produces depends on the domain answering it rather than on the mode: `recipe_info` and `recipe_instructions` come only from a domain configured for recipes, and `article_reference` only from one with a knowledge base. A `message` carries `route` only when a domain with customer support answers it. A client that handles the whole vocabulary works against every mode and every domain."
    }
  ],
  "paths": {
    "/v1/agent_insights/qna": {
      "post": {
        "tags": [
          "Agent insights"
        ],
        "summary": "Retrieve product question answers",
        "description": "Answer a shopper's question about one specific product. The agent answers from that product's own data rather than by searching the catalog, which is what makes it suitable for the question box on a product page. Which sources it draws on is configured per index key, and typically covers the product's attributes and description, and its customer reviews where those are ingested. Frequently asked questions may be answered from a pre-generated set, so a common question returns faster than a novel one. An answer can cite the part of the product imagery it draws on, such as a size chart or a dimensions diagram, and can suggest related products where they help. `page_context.item_id` is the product the question is about, and `shopper_input` is the question itself. Pass `thread_id` to ask a follow-up in the same conversation. Results stream back as [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) (`text/event-stream`) so the agent's reply can be rendered as it is produced. To receive the finished reply as a single JSON document instead, send `Accept: application/json`.",
        "operationId": "v1-asa-retrieve-agent-insights-qna",
        "parameters": [
          {
            "description": "The key of the index to use.",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Key",
              "description": "The key of the index to use."
            },
            "name": "key",
            "in": "query"
          },
          {
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. When omitted, a new thread is created.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread ID",
              "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. When omitted, a new thread is created."
            },
            "name": "thread_id",
            "in": "query"
          },
          {
            "description": "Turn the content moderation check on or off. When on, shopper input is screened before the agent processes it.",
            "required": false,
            "schema": {
              "type": "boolean",
              "title": "Guard",
              "description": "Turn the content moderation check on or off. When on, shopper input is screened before the agent processes it.",
              "default": false
            },
            "name": "guard",
            "in": "query"
          },
          {
            "description": "The maximum number of result events to return.",
            "required": false,
            "schema": {
              "type": "integer",
              "title": "Num Result Events",
              "description": "The maximum number of result events to return."
            },
            "name": "num_result_events",
            "in": "query"
          },
          {
            "description": "The maximum number of results to return per `item_results` event.",
            "required": false,
            "schema": {
              "type": "integer",
              "title": "Num Results Per Event",
              "description": "The maximum number of results to return per `item_results` event."
            },
            "name": "num_results_per_event",
            "in": "query"
          },
          {
            "description": "An object containing options to format different aspects of the response.",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/FmtOptions"
                }
              ],
              "title": "Fmt Options",
              "description": "An object containing options to format different aspects of the response."
            },
            "name": "fmt_options",
            "in": "query",
            "style": "deepObject",
            "explode": true
          },
          {
            "description": "Additional query parameters to forward to the underlying Constructor search, browse and recommendations API calls, as a JSON-encoded string: for example `qs={\"sort_by\":\"price\",\"sort_order\":\"ascending\"}`. Each mode forwards only the keys that apply to the calls it makes, and any key managed by `page_context.filters` must not be overridden here.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "json",
              "title": "Qs",
              "description": "Additional query parameters to forward to the underlying Constructor search, browse and recommendations API calls, as a JSON-encoded string: for example `qs={\"sort_by\":\"price\",\"sort_order\":\"ascending\"}`. Each mode forwards only the keys that apply to the calls it makes, and any key managed by `page_context.filters` must not be overridden here."
            },
            "name": "qs",
            "in": "query"
          },
          {
            "description": "The ID of the client and version that the request is coming from, such as `cio-js-2.90`.",
            "required": false,
            "schema": {
              "type": "string",
              "title": "C",
              "description": "The ID of the client and version that the request is coming from, such as `cio-js-2.90`."
            },
            "name": "c",
            "in": "query"
          },
          {
            "description": "A customer defined context (such as `vip-club-member`) used to evaluate redirect or refined tag rules. Pass multiple segments by passing multiple `us` arguments.",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "title": "User segments",
              "description": "A customer defined context (such as `vip-club-member`) used to evaluate redirect or refined tag rules. Pass multiple segments by passing multiple `us` arguments."
            },
            "name": "us",
            "in": "query"
          },
          {
            "description": "A customer generated anonymized identifier for a user on a customer website. It should only be sent for logged in customers and helps constructor to tie multiple client and session ID's together to form a behavioral data profile across devices.",
            "required": false,
            "schema": {
              "type": "string",
              "title": "User ID",
              "description": "A customer generated anonymized identifier for a user on a customer website. It should only be sent for logged in customers and helps constructor to tie multiple client and session ID's together to form a behavioral data profile across devices."
            },
            "name": "ui",
            "in": "query"
          },
          {
            "description": "Feature variants keyed by feature name. Accepts flattened `feature_variants[<feature_name>]` query parameters.",
            "required": false,
            "schema": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object",
              "title": "Feature Variants",
              "description": "Feature variants keyed by feature name. Accepts flattened `feature_variants[<feature_name>]` query parameters."
            },
            "name": "feature_variants",
            "in": "query",
            "style": "deepObject",
            "explode": true
          },
          {
            "description": "Feature toggles keyed by feature name. Accepts flattened `features[<feature_name>]` query parameters.",
            "required": false,
            "schema": {
              "additionalProperties": {
                "type": "boolean"
              },
              "type": "object",
              "title": "Features",
              "description": "Feature toggles keyed by feature name. Accepts flattened `features[<feature_name>]` query parameters."
            },
            "name": "features",
            "in": "query",
            "style": "deepObject",
            "explode": true
          },
          {
            "description": "An integer representing the user's session number (starting with `1`), incremented after a 30 minute period of inactivity.",
            "required": false,
            "schema": {
              "type": "integer",
              "title": "S",
              "description": "An integer representing the user's session number (starting with `1`), incremented after a 30 minute period of inactivity."
            },
            "name": "s",
            "in": "query"
          },
          {
            "description": "A globally unique identifier for the user browser (or mobile application instance) making the request.",
            "required": false,
            "schema": {
              "type": "string",
              "title": "I",
              "description": "A globally unique identifier for the user browser (or mobile application instance) making the request."
            },
            "name": "i",
            "in": "query"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The request body for the `qna` mode.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QnARequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "AI-powered agent insights, streamed as server-sent events or aggregated into a single JSON document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInsightsResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "anyOf": [
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "start"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsStart"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "message"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsMessage"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "item_results"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsItemResults"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "article_reference"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsArticleReference"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "follow_up_refinement"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsFollowUpRefinement"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "image_meta"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsImageMeta"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "recipe_info"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsRecipeInfo"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "recipe_instructions"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsRecipeInstructions"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "ping"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsPing"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "server_error"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsServerError"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    },
                    {
                      "properties": {
                        "event": {
                          "type": "string",
                          "default": "end"
                        },
                        "data": {
                          "$ref": "#/components/schemas/SSEAgentInsightsEnd"
                        }
                      },
                      "type": "object",
                      "required": [
                        "event",
                        "data"
                      ]
                    }
                  ]
                },
                "examples": {
                  "Start": {
                    "summary": "Start",
                    "description": "Event always emitted at the beginning of the server-sent event stream.",
                    "value": "event: start\ndata: {'event': 'start', 'result_id': 'string', 'thread_id': 'string', 'request': {'mode': 'qna', 'page_context': {'page_type': 'pdp', 'item_id': 'string'}}}"
                  },
                  "Message": {
                    "summary": "Message",
                    "description": "Event containing text produced by the agent: an answer, a pod title, or an explanation of the results.",
                    "value": "event: message\ndata: {'event': 'message', 'result_id': 'string', 'thread_id': 'string', 'text': 'string'}"
                  },
                  "CustomerSupportMessage": {
                    "summary": "Customer support message",
                    "description": "A message that answers a customer support question. `route` is set to `customer_support`.",
                    "value": "event: message\ndata: {\"result_id\": \"550e8400-e29b-41d4-a716-446655440000\", \"text\": \"For help with your order, please contact customer support.\", \"route\": \"customer_support\"}"
                  },
                  "ItemResults": {
                    "summary": "Item results",
                    "description": "Event containing a set of product results together with the Constructor request that produced them.",
                    "value": "event: item_results\ndata: {'event': 'item_results', 'result_id': 'string', 'thread_id': 'string', 'title': 'string', 'text': 'string', 'request': {'type': 'browse', 'ids': ['string'], 'params': {}}, 'response': {'result_id': 'string', 'results': [{'value': 'string', 'data': {'id': 'string', 'url': 'string', 'image_url': 'string'}}]}}"
                  },
                  "ArticleReference": {
                    "summary": "Article reference",
                    "description": "Event containing a relevant article from the agent's knowledge base. Emitted once per article.",
                    "value": "event: article_reference\ndata: {'event': 'article_reference', 'result_id': 'string', 'thread_id': 'string', 'source': 'string', 'title': 'string', 'image_url': 'string', 'abstract': 'string'}"
                  },
                  "FollowUpRefinement": {
                    "summary": "Follow-up refinement",
                    "description": "Event containing a suggested refinement or follow-up action the shopper can take next.",
                    "value": "event: follow_up_refinement\ndata: {'event': 'follow_up_refinement', 'result_id': 'string', 'thread_id': 'string', 'question': 'string', 'options': ['string']}"
                  },
                  "ImageMeta": {
                    "summary": "Image meta",
                    "description": "Event containing an image the agent referenced while answering, such as a size chart or a dimensions diagram.",
                    "value": "event: image_meta\ndata: {'event': 'image_meta', 'result_id': 'string', 'thread_id': 'string', 'item_id': 'string', 'image_url': 'string'}"
                  },
                  "RecipeInfo": {
                    "summary": "Recipe info",
                    "description": "Event containing a recipe the agent assembled, with its cooking times, serving size and ingredients. Emitted only by domains configured for recipes.",
                    "value": "event: recipe_info\ndata: {'event': 'recipe_info', 'result_id': 'string', 'thread_id': 'string', 'recipe_title': 'string', 'prep_time_minutes': 10, 'cook_time_minutes': 20, 'number_of_servings': 4, 'ingredients': ['string']}"
                  },
                  "RecipeInstructions": {
                    "summary": "Recipe instructions",
                    "description": "Event containing the preparation steps for the recipe described by the preceding `recipe_info`. Emitted only by domains configured for recipes.",
                    "value": "event: recipe_instructions\ndata: {'event': 'recipe_instructions', 'result_id': 'string', 'thread_id': 'string', 'steps': ['string'], 'text': 'string'}"
                  },
                  "Ping": {
                    "summary": "Ping",
                    "description": "Event sent periodically to the caller to keep the connection alive and prevent timeouts.",
                    "value": "event: ping\ndata: {}"
                  },
                  "ServerError": {
                    "summary": "Server error",
                    "description": "Event indicating that an internal server error occurred after the response headers were already sent.",
                    "value": "event: server_error\ndata: {'event': 'server_error', 'result_id': 'string', 'thread_id': 'string', 'status_code': 500, 'message': 'Internal Server Error'}"
                  },
                  "End": {
                    "summary": "End",
                    "description": "Event always closing the stream of server-sent events.",
                    "value": "event: end\ndata: {'event': 'end', 'result_id': 'string', 'thread_id': 'string'}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters, or an unknown index key. Also returned for a `request_context` the index key has not enabled, or one that fails validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInsightsErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInsightsErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInsightsErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "An upstream service was unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentInsightsErrorResponse"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "MessageRoute": {
        "type": "string",
        "enum": [
          "customer_support"
        ],
        "title": "Message route",
        "description": "Where the client should send the shopper next. `customer_support` marks a customer support answer."
      },
      "Path": {
        "properties": {
          "id": {
            "type": "string",
            "title": "ID",
            "description": "The ID of the group."
          },
          "display_name": {
            "type": "string",
            "title": "Display Name",
            "description": "The name of the group as it is displayed to end users."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id"
        ],
        "title": "Path"
      },
      "FmtOptions": {
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            },
            "maxItems": 20,
            "title": "Fields",
            "description": "A list of specific item fields to return in the response. Allows the request to control which fields are returned."
          },
          "show_hidden_fields": {
            "type": "boolean",
            "title": "Show Hidden Fields",
            "description": "A flag to return all `hidden` fields in the response.",
            "default": false
          },
          "hidden_fields": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            },
            "maxItems": 30,
            "title": "Hidden Fields",
            "description": "A list of specific hidden fields to return in the response. Unlike `show_hidden_fields` this parameter allows the request to control which `hidden` fields are returned. Used to return item fields for a particular store or user segment."
          },
          "variations_return_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VariationsReturnType"
              }
            ],
            "title": "Variations Return Type",
            "description": "A flag to return `default`, `all`, or `matched` variations."
          },
          "groups_max_depth": {
            "type": "integer",
            "title": "Groups Max Depth",
            "description": "The maximum depth of the group hierarchy in the response.",
            "default": 1
          },
          "groups_start": {
            "type": "string",
            "title": "Groups Start",
            "description": "A flag to specify the start of the group hierarchy returned in the response. `current` returns groups starting from the currently selected one. `top` returns groups starting from the root category in the hierarchy. `group_id:{id}`, returns the whole tree starting from group with the provided id.",
            "default": "current"
          },
          "groups_path": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 10,
            "title": "Groups Path",
            "description": "Specifies the path from the root group to the current group you are browsing. It is used to construct the parents path in the `response.groups` for the current browsed group. Max depth allowed for the path is 10. This option is only accepted when `groups_start` is 'current'."
          },
          "groups_sort_by": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GroupsSortOrder"
              }
            ],
            "title": "Groups Sort By",
            "description": "A string indicating the option to sort results by. Sorting options are created from item fields and facets in the product catalog."
          },
          "groups_sort_order": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SortOrderType"
              }
            ],
            "description": "A flag to sort either `ascending` or `descending`."
          },
          "show_hidden_facets": {
            "type": "boolean",
            "title": "Show Hidden Facets",
            "description": "A flag to return all facets configured as `hidden` in `response.facets`.",
            "default": false
          },
          "hidden_facets": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 50,
            "title": "Hidden Facets",
            "description": "A list of specific hidden facets to return in the response. Unlike `show_hidden_facets` this parameter allows the request to control which hidden facets are returned. Used to return facets for a particular store or user segment."
          },
          "show_hidden_facet_options": {
            "type": "boolean",
            "title": "Show Hidden Facet Options",
            "description": "A flag to return all `hidden` facets options in the response."
          },
          "show_protected_facets": {
            "type": "boolean",
            "title": "Show Protected Facets",
            "description": "A flag to return all `protected` facets in the response. Requires authentication.",
            "default": false
          },
          "facet_options": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "maxItems": 15
            },
            "title": "Facet Options",
            "description": "A list of specific facet options per facet to return in the response. This parameter accepts up to 5 facets and works only with facets of type `multiple`. Invalid facet options will be ignored. Used to return facet options for a particular facet like store or user segment."
          },
          "facet_groups_limit": {
            "type": "integer",
            "title": "Facet Groups Limit",
            "description": "The maximum limit of the facet groups returned in the response.",
            "minimum": 0
          },
          "show_hidden_sort_options": {
            "type": "boolean",
            "title": "Show Hidden Sort Options",
            "description": "A flag to return all sort options configured as `hidden` in `response.sort_options`."
          },
          "hidden_sort_options": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 25,
            "title": "Hidden Sort Options",
            "description": "A list of `sort_by` fields whose hidden sort options should be included in the response. Unlike `show_hidden_sort_options` this parameter allows you to specify exactly which hidden sort options are returned."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "title": "Format options",
        "description": "Options to format different aspects of the response."
      },
      "VariationsReturnType": {
        "type": "string",
        "enum": [
          "default",
          "all",
          "matched"
        ],
        "title": "Variations return type"
      },
      "GroupsSortOrder": {
        "type": "string",
        "enum": [
          "relevance",
          "value",
          "num_matches"
        ],
        "title": "Groups sort order"
      },
      "SortOrderType": {
        "type": "string",
        "enum": [
          "ascending",
          "descending"
        ],
        "title": "Sort order type"
      },
      "Result": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value",
            "description": "Name of the matched item or variation (if variations are defined)."
          },
          "matched_terms": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Matched Terms",
            "description": "All terms within the item matching the user's query (regardless of whether misspelled)."
          },
          "data": {
            "$ref": "#/components/schemas/ResultData"
          },
          "variations": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ResultVariation"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variations",
            "description": "An array of this item's variations matching user's query."
          },
          "variations_map": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variations Map",
            "description": "Variations data in the format requested by `variations_map` query parameter."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "value",
          "matched_terms",
          "data"
        ],
        "title": "Result"
      },
      "ResultData": {
        "properties": {
          "id": {
            "type": "string",
            "title": "ID",
            "description": "The ID of this item as specified in the catalog."
          },
          "url": {
            "type": "string",
            "title": "URL",
            "description": "The URL where the item can be viewed or purchased."
          },
          "image_url": {
            "type": "string",
            "title": "Image URL",
            "description": "The item's image URL for display in results."
          },
          "variation_id": {
            "type": "string",
            "title": "Variation ID",
            "description": "ID of the selected (best matching) variation. All metadata of the best matching variation will also be merged into the item's `data` object. Returned when [item variation](#) data is defined."
          },
          "facets": {
            "items": {
              "$ref": "#/components/schemas/ResultFacet"
            },
            "type": "array",
            "title": "Facets",
            "description": "The item's associated facets."
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ResultGroup"
            },
            "type": "array",
            "title": "Groups",
            "description": "The item's associated categories."
          }
        },
        "type": "object",
        "title": "Result data"
      },
      "ResultFacet": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "values": {
            "items": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            },
            "type": "array",
            "title": "Values"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "values"
        ],
        "title": "Result facet"
      },
      "ResultGroup": {
        "properties": {
          "group_id": {
            "type": "string",
            "title": "Group ID",
            "description": "The ID of the group."
          },
          "display_name": {
            "type": "string",
            "title": "Display Name",
            "description": "The name of the group as it is displayed to end users."
          },
          "path": {
            "type": "string",
            "title": "Path",
            "description": "The path of `group_id`s above this group. `/great-grandparent/grandparent/parent/`",
            "example": "/great-grandparent/grandparent/parent/"
          },
          "path_list": {
            "items": {
              "$ref": "#/components/schemas/Path"
            },
            "type": "array",
            "title": "Path List",
            "description": "An array of groups constituting the path."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "group_id",
          "path",
          "path_list"
        ],
        "title": "Result group"
      },
      "ResultVariation": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ResultData"
          },
          "value": {
            "type": "string",
            "title": "Value"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "data",
          "value"
        ],
        "title": "Result variation"
      },
      "SearchandizedResult": {
        "properties": {
          "value": {
            "type": "string",
            "title": "Value",
            "description": "Name of the matched item or variation (if variations are defined)."
          },
          "matched_terms": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Matched Terms",
            "description": "All terms within the item matching the user's query (regardless of whether misspelled)."
          },
          "data": {
            "$ref": "#/components/schemas/ResultData"
          },
          "variations": {
            "items": {
              "$ref": "#/components/schemas/ResultVariation"
            },
            "type": "array",
            "title": "Variations",
            "description": "An array of this item's variations matching user's query."
          },
          "variations_map": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "object"
              }
            ],
            "title": "Variations Map",
            "description": "Variations data in the format requested by `variations_map` query parameter."
          },
          "is_slotted": {
            "type": "boolean",
            "title": "Is Slotted",
            "description": "`true` if the current product is slotted as a result of searchandizing."
          },
          "labels": {
            "type": "object",
            "title": "Labels",
            "description": "A set of miscellaneous properties of this result. For example, it can indicate whether a slotted result is advertised or promoted."
          }
        },
        "type": "object",
        "required": [
          "value",
          "matched_terms",
          "data",
          "is_slotted",
          "labels"
        ],
        "title": "Searchandized result"
      },
      "QnARequestBody": {
        "properties": {
          "shopper_input": {
            "type": "string",
            "minLength": 1,
            "title": "Shopper Input",
            "description": "The question to answer about the product."
          },
          "page_context": {
            "$ref": "#/components/schemas/AgentInsightsItemPageContext",
            "description": "The shopper's current position in the catalog. `qna` always answers about one product, so `item_id` is required, including when the shopper asks from a page other than the PDP, e.g. a quick-view on a listing page."
          },
          "parameters": {
            "$ref": "#/components/schemas/QnAParameters",
            "description": "`qna` accepts no extra parameters; the object may be omitted."
          },
          "request_context": {
            "$ref": "#/components/schemas/AgentInsightsRequestContext",
            "description": "The shopper's price for the product, for this request only. Accepted only when enabled for the index key."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "shopper_input",
          "page_context"
        ],
        "title": "QnA request body",
        "description": "A shopper's question about one product, with the page it was asked from. The product is identified by `page_context.item_id`."
      },
      "QnAParameters": {
        "properties": {},
        "additionalProperties": false,
        "type": "object",
        "title": "QnA parameters",
        "description": "Extra parameters for `POST /v1/agent_insights/qna`. The question and the product are carried by `shopper_input` and `page_context` rather than here."
      },
      "AgentInsightsPageContext": {
        "properties": {
          "page_type": {
            "$ref": "#/components/schemas/AgentInsightsPageType",
            "description": "The type of page the shopper is currently viewing. Determines which validation rules apply and provides the agent with positional context in the catalog."
          },
          "item_id": {
            "type": "string",
            "title": "Item ID",
            "description": "The product identifier the shopper is looking at. Required when `page_type` is `pdp`."
          },
          "variation_id": {
            "type": "string",
            "title": "Variation ID",
            "description": "The variation (SKU) identifier for the currently viewed product variant. Gives the agent context to focus on a particular variation. Only valid when `item_id` is set."
          },
          "search_term": {
            "type": "string",
            "title": "Search Term",
            "description": "The search query that produced the current product listing. Relevant for PLP pages with search context."
          },
          "browse_filter": {
            "description": "The primary browse filter defining the category or collection being viewed. Used for PLP pages navigated via category tree or collection links.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentInsightsBrowseFilter"
              }
            ]
          },
          "filters": {
            "items": {
              "$ref": "#/components/schemas/AgentInsightsFilterExpression"
            },
            "type": "array",
            "title": "Filters",
            "description": "Active product filters (facets) currently applied on the page, as a list of [filter expressions](/reference/shared-filter-expressions). They describe the shopper's context, and are forwarded to the downstream Constructor call by any mode that issues a filterable one. `chat` and `search` combine them with the `pre_filter_expression` sent in `qs`, when there is one."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "page_type"
        ],
        "title": "Page context",
        "description": "The shopper's current position in the catalog: the page type, the product in view, and the filters applied to it. The agent reads it to understand where the request came from and to scope its actions accordingly.\n\n`item_id` is required when `page_type` is `pdp`, and `variation_id` is only valid together with `item_id`."
      },
      "AgentInsightsItemPageContext": {
        "properties": {
          "page_type": {
            "$ref": "#/components/schemas/AgentInsightsPageType",
            "description": "The type of page the shopper is currently viewing. Determines which validation rules apply and provides the agent with positional context in the catalog."
          },
          "item_id": {
            "type": "string",
            "minLength": 1,
            "title": "Item ID",
            "description": "The product identifier this request is about. Required."
          },
          "variation_id": {
            "type": "string",
            "title": "Variation ID",
            "description": "The variation (SKU) identifier for the currently viewed product variant. Gives the agent context to focus on a particular variation. Only valid when `item_id` is set."
          },
          "search_term": {
            "type": "string",
            "title": "Search Term",
            "description": "The search query that produced the current product listing. Relevant for PLP pages with search context."
          },
          "browse_filter": {
            "description": "The primary browse filter defining the category or collection being viewed. Used for PLP pages navigated via category tree or collection links.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentInsightsBrowseFilter"
              }
            ]
          },
          "filters": {
            "items": {
              "$ref": "#/components/schemas/AgentInsightsFilterExpression"
            },
            "type": "array",
            "title": "Filters",
            "description": "Active product filters (facets) currently applied on the page, as a list of [filter expressions](/reference/shared-filter-expressions). They describe the shopper's context, and are forwarded to the downstream Constructor call by any mode that issues a filterable one. `qna` looks its products up by ID, so it does not narrow results by them."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "page_type",
          "item_id"
        ],
        "title": "Item page context",
        "description": "Page context for a mode that acts on one specific product, whatever page the shopper asked from.\n\n`item_id` is required here rather than only on a PDP: `qna` always answers about a single product, and `recommendations` needs an anchor to recommend relative to, but either can be triggered from a quick-view on a listing page or from an email campaign."
      },
      "AgentInsightsListingPageContext": {
        "properties": {
          "page_type": {
            "type": "string",
            "enum": [
              "plp"
            ],
            "title": "Page type",
            "description": "The type of page the shopper is on. Always `plp`."
          },
          "item_id": {
            "type": "string",
            "title": "Item ID",
            "description": "A product identifier. Accepted as on the other modes, and it does not change the listing."
          },
          "variation_id": {
            "type": "string",
            "title": "Variation ID",
            "description": "A variation (SKU) identifier. Only valid when `item_id` is set, and it does not change the listing."
          },
          "search_term": {
            "type": "string",
            "maxLength": 256,
            "title": "Search Term",
            "description": "The search query that produced the listing, on a search results page. Every result set is searched with this term, whatever the shopper types. At most 256 characters."
          },
          "browse_filter": {
            "description": "The category the listing browses, on a category page. Every result set stays inside it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentInsightsListingBrowseFilter"
              }
            ]
          },
          "filters": {
            "items": {
              "$ref": "#/components/schemas/AgentInsightsFilterExpression"
            },
            "type": "array",
            "maxItems": 30,
            "title": "Filters",
            "description": "The filters active on the listing, as a list of [filter expressions](/reference/shared-filter-expressions). A filter whose `match_type` is absent or `any`, and whose `name` no other such filter has, is editable: the agent may change or remove it. Every other filter is fixed: it applies to every catalog call of the request and is never changed. At most 30 filters, each with at most 50 values, and names and values of at most 256 characters."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "page_type"
        ],
        "title": "Listing page context",
        "description": "The product listing a `query_refinement` request refines, identified by its search term, its category, or both.\n\n`search_term` or `browse_filter` is required. With both, the term is searched inside the category.",
        "examples": [
          {
            "page_type": "plp",
            "search_term": "sneakers",
            "filters": [
              {
                "name": "brand",
                "value": [
                  "Nike"
                ]
              }
            ]
          }
        ]
      },
      "AgentInsightsPageType": {
        "enum": [
          "home",
          "plp",
          "pdp",
          "collection",
          "email_campaign",
          "cart"
        ],
        "type": "string",
        "title": "Page type",
        "description": "The type of e-commerce page the shopper is currently on.\n\nDrives different validation rules and gives the agent additional context about the shopper's position in the catalog."
      },
      "AgentInsightsBrowseFilter": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "The browse filter name, typically `group_id` for category pages or `collection_id` for collections."
          },
          "value": {
            "type": "string",
            "title": "Value",
            "description": "The browse filter value: the specific category or collection identifier."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "value"
        ],
        "title": "Browse filter",
        "description": "The primary browse filter pair that defines the category or collection being browsed.\n\nThis corresponds to the main navigation filter in the Constructor Browse API: typically a group_id or collection_id that determines which product listing the shopper is viewing.\n\nSee: https://docs.constructor.com/reference/v1-browse-get-browse-results"
      },
      "AgentInsightsListingBrowseFilter": {
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "group_id"
            ],
            "title": "Name",
            "description": "Always `group_id`. Collection and facet browse pages cannot be refined."
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "title": "Value",
            "description": "The ID of the category the listing browses. Not blank, and at most 256 characters."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "value"
        ],
        "title": "Listing browse filter",
        "description": "The category a listing browses, as the `group_id` browse filter of a Constructor browse request."
      },
      "AgentInsightsFilterExpression": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name",
            "description": "The filter (facet) name, as configured in the customer's index."
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                },
                "type": "array"
              }
            ],
            "title": "Value",
            "description": "The selected filter value(s). A single value is accepted and normalized to a single-element list, and numbers/booleans are rendered as strings. Mutually exclusive with `range`."
          },
          "range": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            },
            "type": "array",
            "title": "Range",
            "description": "An inclusive [start, end] range for numeric or date filters. Numbers are accepted and rendered as strings. Use '-inf' or 'inf' for an open bound. Mutually exclusive with `value`."
          },
          "match_type": {
            "description": "How multiple selected values of this filter are combined: `any` (OR), `all` (AND), or `none` (exclusion). Defaults to the Constructor behavior for the filter when omitted. Only valid together with `value`: a range has a single interval to match, so there is nothing to combine.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentInsightsFilterMatchType"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "Filter expression",
        "description": "A single product filter (facet) applied on the current page.\n\nEach expression selects either discrete values or a numeric/date range for one filter name, following the Constructor filter names and values conventions:\n- Multiple values for the same filter name are combined with OR by default\n(e.g., `{\"name\": \"brand\", \"value\": [\"Nike\", \"Adidas\"]}` means brand=Nike OR brand=Adidas).\n- Separate expressions are combined with AND\n(e.g., a brand expression and a color expression must both match).\n- A single value is coerced to a single-element list for consistency.\n- Numbers and booleans are accepted and rendered as strings, because JSON clients serialize a numeric\nfacet selection as a JSON number (`{\"name\": \"rating\", \"value\": 4}`) while Constructor filter values are strings on the wire.\n\nUse `match_type` to override the default OR behavior for a single expression.\n\nSee: https://docs.constructor.com/reference/constructor-concepts-filter-names-values\n\nExamples: {\"name\": \"brand\", \"value\": [\"Capita\", \"Burton\"]} {\"name\": \"color\", \"value\": \"red\"} {\"name\": \"price\", \"range\": [\"100\", \"200\"]} {\"name\": \"rating\", \"value\": 4}  ->  internally coerced to {\"name\": \"rating\", \"value\": [\"4\"]} {\"name\": \"size\", \"value\": [\"XS\", \"S\"], \"match_type\": \"none\"}"
      },
      "AgentInsightsFilterMatchType": {
        "enum": [
          "any",
          "all",
          "none"
        ],
        "type": "string",
        "title": "Filter match type",
        "description": "Controls how multiple selected values for the same filter are combined.\n\nUsed to override the default OR behavior when multiple options of the same facet are selected:\n- any: Results must match ANY of the selected values (OR, default Constructor behavior).\n- all: Results must match ALL of the selected values (AND).\n- none: Results must match NONE of the selected values (exclusion)."
      },
      "AgentInsightsItemResultsRequest": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AgentInsightsItemResultsRequestType",
            "description": "Which Constructor API produced these results."
          },
          "ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "IDs",
            "description": "The item identifiers requested, when the results were retrieved by explicit id lookup."
          },
          "params": {
            "type": "object",
            "title": "Params",
            "description": "The parameters of the underlying Constructor call (num_results_per_page, page, sort_by, section, filters, fmt_options, features, ...)."
          }
        },
        "type": "object",
        "required": [
          "type"
        ],
        "title": "Item results request",
        "description": "The Constructor request used to obtain the accompanying results.\n\nExposed so the caller can either re-issue the request itself (for pagination, refinement, or analytics) or use the results delivered alongside it. Extra keys are allowed because the underlying Constructor request shape differs per request type (e.g., `search_term` for search, `strategy` for recommendations)."
      },
      "AgentInsightsItemResultsRequestType": {
        "enum": [
          "search",
          "browse",
          "recommendations"
        ],
        "type": "string",
        "title": "Item results request type",
        "description": "Which Constructor API produced a set of item results.\n\nLets the client understand the nature of the results and render them accordingly:\n- search: retrieved via the Constructor Search API.\n- browse: retrieved via the Constructor Browse API.\n- recommendations: retrieved via the Constructor Recommendations API."
      },
      "AgentInsightsItemResultsResponse": {
        "properties": {
          "result_id": {
            "type": "string",
            "title": "Result ID",
            "description": "The result ID of the underlying Constructor response, used for analytics matching. Distinct from the top-level ASA result_id."
          },
          "results": {
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SearchandizedResult"
                },
                {
                  "$ref": "#/components/schemas/Result"
                }
              ]
            },
            "type": "array",
            "title": "Results",
            "description": "The items returned by the underlying Constructor call. Searchandizing metadata (is_slotted, labels) is preserved when the underlying API provides it."
          },
          "facets": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RangeFacet"
                },
                {
                  "$ref": "#/components/schemas/SingleOrMultipleFacet"
                },
                {
                  "$ref": "#/components/schemas/HierarchicalFacet"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "range": "#/components/schemas/RangeFacet",
                  "single": "#/components/schemas/SingleOrMultipleFacet",
                  "multiple": "#/components/schemas/SingleOrMultipleFacet",
                  "hierarchical": "#/components/schemas/HierarchicalFacet"
                }
              }
            },
            "type": "array",
            "title": "Facets",
            "description": "Facets associated with the returned items, when the underlying Constructor call returned them."
          }
        },
        "type": "object",
        "title": "Item results response",
        "description": "The Constructor response carrying the items themselves.\n\n`result_id` here is the identifier of the underlying Constructor search, browse, or recommendations response, used for analytics matching. It is distinct from the top-level ASA `result_id` of the event."
      },
      "AgentInsightsListingState": {
        "properties": {
          "page_context": {
            "$ref": "#/components/schemas/AgentInsightsListingPageContext",
            "description": "The refined listing, in the shape of a request `page_context`. Send it as `page_context` on the next request."
          },
          "added": {
            "items": {
              "$ref": "#/components/schemas/AgentInsightsFilterExpression"
            },
            "type": "array",
            "title": "Added",
            "description": "Filters in `page_context` that the request did not carry."
          },
          "removed": {
            "items": {
              "$ref": "#/components/schemas/AgentInsightsFilterExpression"
            },
            "type": "array",
            "title": "Removed",
            "description": "Filters the request carried that `page_context` no longer has."
          }
        },
        "type": "object",
        "required": [
          "page_context",
          "added",
          "removed"
        ],
        "title": "Listing",
        "description": "The listing a `query_refinement` response leaves the shopper on.\n\n`added` and `removed` compare its filters with the ones the request carried, so a filter whose value changed appears in both, and both are empty when the listing did not change. The search term, the category and the fixed filters are always kept.",
        "examples": [
          {
            "page_context": {
              "page_type": "plp",
              "search_term": "sneakers",
              "filters": [
                {
                  "name": "brand",
                  "value": [
                    "Nike"
                  ]
                },
                {
                  "name": "color",
                  "value": [
                    "white"
                  ]
                }
              ]
            },
            "added": [
              {
                "name": "color",
                "value": [
                  "white"
                ]
              }
            ],
            "removed": []
          }
        ]
      },
      "AgentInsightsRefinementChoice": {
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "pattern": "\\S",
            "title": "Label",
            "description": "The text to show for this choice. Never blank."
          },
          "filter": {
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "title": "Name",
                "description": "The filter (facet) name, as configured in the customer's index."
              },
              "value": {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "minItems": 1,
                "maxItems": 1,
                "title": "Value",
                "description": "The one facet value this choice applies."
              }
            },
            "additionalProperties": false,
            "type": "object",
            "required": [
              "name",
              "value"
            ],
            "title": "Choice filter",
            "description": "The filter this choice applies: one `name` with a single `value`, and no `match_type` or `range`. It is a `page_context.filters` entry, so it can be sent back as it is."
          }
        },
        "type": "object",
        "required": [
          "label",
          "filter"
        ],
        "title": "Refinement choice",
        "description": "A suggestion that applies exactly one filter value.\n\n`filter` has the shape of a `page_context.filters` entry. To apply the choice, replace the `page_context.filters` entry with the same `name`, or add `filter` when there is none, and send the next request with no `shopper_input`. A `query_refinement` choice never names a facet the listing already filters, so there a tap only adds `filter`.",
        "examples": [
          {
            "label": "Black",
            "filter": {
              "name": "color",
              "value": [
                "black"
              ]
            }
          }
        ]
      },
      "AgentInsightsMode": {
        "enum": [
          "chat",
          "search",
          "qna",
          "recommendations",
          "query_refinement"
        ],
        "type": "string",
        "title": "Mode",
        "description": "The agent exposure scenario. Determines how the agent interprets the request and what it returns.\n\nEach mode represents a distinct job the agent performs for the shopper:\n- chat: Full conversational agent with multi-turn dialog, product discovery, and domain knowledge.\n- search: Search bar experience: query classification and AI overview snippet to spark interest in full chat.\n- qna: Product question answering on PDP or other pages, with optional product recommendations.\n- recommendations: Curated, personalized product recommendations with optional title, explanation, and follow-up refinements. Used as part of intelligent recommendations widgets.\n- query_refinement: Auto-suggested refinements on product listing pages to help shoppers narrow down results."
      },
      "AgentInsightsResponse": {
        "properties": {
          "result_id": {
            "type": "string",
            "title": "Result ID",
            "description": "Agent insight result ID."
          },
          "thread_id": {
            "type": "string",
            "format": "uuid",
            "title": "Thread ID",
            "description": "A unique identifier for the conversation thread. Pass it back on the next request to continue the same conversation. Only populated for conversational modes."
          },
          "status": {
            "$ref": "#/components/schemas/AgentInsightsResponseStatus",
            "description": "`complete` if the underlying stream finished; `partial` if it was truncated or errored mid-stream."
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "The agent's text output. When the agent produced several message events they are joined in the order they were emitted."
          },
          "route": {
            "$ref": "#/components/schemas/MessageRoute",
            "description": "Marks a customer support answer. Set when a message event carried a route; `message` contains the full answer. Omitted otherwise. You can use `route` to show a button for your support chat or help center. New values may be added without an API version change. Treat unknown values as if `route` were absent."
          },
          "item_results": {
            "items": {
              "$ref": "#/components/schemas/AggregatedItemResults"
            },
            "type": "array",
            "title": "Item Results",
            "description": "Every set of product results the agent produced, in emission order."
          },
          "article_references": {
            "items": {
              "$ref": "#/components/schemas/AggregatedArticleReference"
            },
            "type": "array",
            "title": "Article References",
            "description": "Knowledge base articles the agent referenced, in emission order."
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/AggregatedImageMeta"
            },
            "type": "array",
            "title": "Images",
            "description": "Images the agent referenced while answering, in emission order."
          },
          "recipes": {
            "items": {
              "$ref": "#/components/schemas/AggregatedRecipe"
            },
            "type": "array",
            "title": "Recipes",
            "description": "Recipes the agent assembled, in emission order, each joined with its instructions. Present only for domains configured for recipes."
          },
          "follow_up_refinement": {
            "description": "The suggested refinement or follow-up action, when the agent produced one.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AggregatedFollowUpRefinement"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "result_id",
          "status"
        ],
        "title": "Agent insights response",
        "description": "The collected agent insight returned when the client asks for `application/json`.",
        "examples": [
          {
            "follow_up_refinement": {
              "options": [
                "Yes, sub-zero",
                "No, mild weather"
              ],
              "question": "Do you need it for winter conditions?"
            },
            "item_results": [
              {
                "request": {
                  "ids": [
                    "item_id_1"
                  ],
                  "params": {
                    "num_results_per_page": 20
                  },
                  "type": "browse"
                },
                "response": {
                  "results": [
                    {
                      "value": "Waterproof Hiking Boot",
                      "matched_terms": [
                        "waterproof",
                        "hiking"
                      ],
                      "is_slotted": false,
                      "labels": {},
                      "data": {
                        "id": "item_id_1",
                        "url": "https://example.com/product/item_id_1",
                        "image_url": "https://cdn.example.com/item_id_1.jpg"
                      }
                    }
                  ]
                },
                "result_id": "973e152a-ee03-47d2-a01b-1214da90a02b"
              }
            ],
            "message": "Based on your interest in hiking gear, here are some waterproof options...",
            "result_id": "550e8400-e29b-41d4-a716-446655440000",
            "status": "complete",
            "thread_id": "662e8400-e29b-41d4-a716-446655440001"
          }
        ]
      },
      "AgentInsightsResponseStatus": {
        "enum": [
          "complete",
          "partial"
        ],
        "type": "string",
        "title": "Response status",
        "description": "Whether the collected stream represents the agent's full answer.\n\n- complete: the underlying stream finished normally.\n- partial: the stream was truncated or emitted a server_error, so the answer may be incomplete."
      },
      "AggregatedItemResults": {
        "properties": {
          "result_id": {
            "type": "string",
            "title": "Result ID",
            "description": "The result ID of the underlying Constructor response."
          },
          "title": {
            "type": "string",
            "title": "Title",
            "description": "Agent-generated title for this set of results."
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "Agent-generated explanation of this set of results."
          },
          "request": {
            "description": "The Constructor request used to obtain these results.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentInsightsItemResultsRequest"
              }
            ]
          },
          "response": {
            "$ref": "#/components/schemas/AgentInsightsItemResultsResponse",
            "description": "The Constructor response carrying the items."
          },
          "listing": {
            "description": "Only on `query_refinement`: the refined listing these results belong to.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentInsightsListingState"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "response"
        ],
        "title": "Item results",
        "description": "One set of product results, flattened from an `item_results` event.\n\n`result_id` is the underlying Constructor response id (`response.result_id` in the SSE schema), lifted to the top of the entry because that is the identifier callers use for analytics matching."
      },
      "AggregatedArticleReference": {
        "properties": {
          "source": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Source",
            "description": "Canonical URL of the referenced article."
          },
          "title": {
            "type": "string",
            "title": "Title",
            "description": "Title of the referenced article."
          },
          "image_url": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Image URL",
            "description": "Representative image for the referenced article."
          },
          "abstract": {
            "type": "string",
            "title": "Abstract",
            "description": "Short abstract of the referenced article."
          }
        },
        "type": "object",
        "required": [
          "source",
          "title"
        ],
        "title": "Article reference",
        "description": "One knowledge base article, flattened from an `article_reference` event."
      },
      "AggregatedFollowUpRefinement": {
        "properties": {
          "question": {
            "type": "string",
            "title": "Question",
            "description": "The refinement prompt shown to the shopper. Absent when the mode suggests follow-ups without a prompt, in which case the suggestions are carried by `options`."
          },
          "options": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Options",
            "description": "Selectable answers to the refinement prompt."
          },
          "choices": {
            "items": {
              "$ref": "#/components/schemas/AgentInsightsRefinementChoice"
            },
            "type": "array",
            "minItems": 1,
            "title": "Choices",
            "description": "The options as filters, when each one applies a single filter value: same labels, same order. Absent when the options are free text."
          }
        },
        "type": "object",
        "title": "Follow-up refinement",
        "description": "The suggested refinement, flattened from a `follow_up_refinement` event."
      },
      "AggregatedImageMeta": {
        "properties": {
          "item_id": {
            "type": "string",
            "title": "Item ID",
            "description": "The item this image belongs to."
          },
          "image_url": {
            "type": "string",
            "maxLength": 2083,
            "minLength": 1,
            "format": "uri",
            "title": "Image URL",
            "description": "Full-size image URL."
          }
        },
        "type": "object",
        "required": [
          "item_id",
          "image_url"
        ],
        "title": "Image meta",
        "description": "One image the agent referenced, flattened from an `image_meta` event."
      },
      "AggregatedRecipe": {
        "properties": {
          "recipe_title": {
            "type": "string",
            "title": "Recipe Title",
            "description": "The name of the recipe."
          },
          "prep_time_minutes": {
            "type": "integer",
            "title": "Preparation time in minutes",
            "description": "How long the recipe takes to prepare, in minutes."
          },
          "cook_time_minutes": {
            "type": "integer",
            "title": "Cooking time in minutes",
            "description": "How long the recipe takes to cook, in minutes."
          },
          "number_of_servings": {
            "type": "integer",
            "title": "Number of servings",
            "description": "How many servings the recipe yields, when the agent stated it."
          },
          "ingredients": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Ingredients",
            "description": "The ingredients the recipe calls for, as free-form lines."
          },
          "steps": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Recipe Directions",
            "description": "The preparation steps, in the order they are to be followed. Absent when the agent described the recipe without emitting instructions for it."
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "A closing remark on the recipe, such as a serving suggestion."
          }
        },
        "type": "object",
        "required": [
          "recipe_title",
          "prep_time_minutes",
          "cook_time_minutes",
          "ingredients"
        ],
        "title": "Recipe",
        "description": "One recipe, flattened from a `recipe_info` event and the `recipe_instructions` that followed it. The two events are joined here because they describe one recipe between them; `steps` and `text` come from the instructions."
      },
      "AgentInsightsError": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/AgentInsightsErrorCode",
            "description": "Machine-readable error code."
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Human-readable description of the problem."
          },
          "source": {
            "type": "string",
            "title": "Source",
            "description": "Dotted path of the parameter that caused the error, relative to the request body or query string (e.g. 'shopper_input', 'page_context.item_id', 'parameters.strategy')."
          }
        },
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "Agent insights error",
        "description": "A single problem with the request."
      },
      "AgentInsightsErrorCode": {
        "enum": [
          "parameter_missing",
          "parameter_invalid",
          "parameter_unknown",
          "client_error",
          "rate_limit_exceeded",
          "not_implemented",
          "server_error",
          "upstream_service_error"
        ],
        "type": "string",
        "title": "Error code",
        "description": "Machine-readable error codes returned by the unified endpoint.\n\nRequest validation (HTTP 400):\n- parameter_missing: A required parameter was not supplied.\n- parameter_invalid: A parameter was supplied with an unacceptable value.\n- parameter_unknown: A parameter was supplied that the requested mode does not accept.\n\nRequest rejected for reasons other than its shape:\n- client_error: The request is well-formed but cannot be served (HTTP 422, 404, ...).\n- rate_limit_exceeded: The client exceeded its request budget (HTTP 429).\n\nFailures on our side:\n- not_implemented: The requested mode is valid but not available yet (HTTP 501). Not retryable.\n- upstream_service_error: A dependency was unavailable (HTTP 503).\n- server_error: Anything else that failed while serving the request (HTTP 5xx)."
      },
      "AgentInsightsErrorResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Human-readable summary of the failure."
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/AgentInsightsError"
            },
            "type": "array",
            "title": "Errors",
            "description": "The individual problems found."
          },
          "trace_id": {
            "type": "string",
            "title": "Trace ID",
            "description": "Trace identifier to quote when escalating."
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "Agent insights error response",
        "description": "The error response body returned by the unified endpoint."
      },
      "AgentInsightsStartRequest": {
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/AgentInsightsMode",
            "description": "The agent exposure scenario this stream was produced for."
          },
          "page_context": {
            "$ref": "#/components/schemas/AgentInsightsPageContext",
            "description": "The page context the shopper was on when this stream was produced."
          }
        },
        "type": "object",
        "required": [
          "mode",
          "page_context"
        ],
        "title": "Start request",
        "description": "Echo of the request that produced this insight, so a client can correlate a stream to what it asked for."
      },
      "RangeFacet": {
        "additionalProperties": false,
        "properties": {
          "type": {
            "description": "If a facet is of type `range`, then no facet options are provided. Instead a `min` and `max` value is provided to specify the range of values that can be sent in `filters`.",
            "title": "Type",
            "type": "string",
            "enum": [
              "range"
            ]
          },
          "name": {
            "description": "The name of the facet. This should be passed in the filters parameter when a facet of this type is selected. `filters[name]=value`",
            "title": "Name",
            "type": "string"
          },
          "display_name": {
            "description": "The name of the facet as it is displayed to end users. Note that in `filters` parameter you need to use not `display_name` but `name`.",
            "title": "Display Name",
            "type": "string"
          },
          "hidden": {
            "description": "The boolean value saying whether facet is available for interaction.",
            "title": "Hidden",
            "type": "boolean"
          },
          "data": {
            "description": "Object containing custom data associated with this facet. An empty object (`{}`) if no data is currently associated with this facet.",
            "title": "Data",
            "type": "object"
          },
          "status": {
            "description": "Specifies the selected facet value range. If no range is selected the field will be omitted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RangeFacetStatus"
              }
            ],
            "title": "Status"
          },
          "min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer"
              },
              {
                "enum": [
                  "-inf",
                  "+inf",
                  "inf"
                ],
                "type": "string"
              }
            ],
            "description": "Minimum facet value of the result items.",
            "title": "Min"
          },
          "max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer"
              },
              {
                "enum": [
                  "-inf",
                  "+inf",
                  "inf"
                ],
                "type": "string"
              }
            ],
            "description": "Maximum facet value of the result items.",
            "title": "Max"
          }
        },
        "required": [
          "type",
          "name",
          "display_name",
          "hidden",
          "data"
        ],
        "title": "Range facet",
        "type": "object"
      },
      "RangeFacetStatus": {
        "additionalProperties": false,
        "properties": {
          "min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer"
              },
              {
                "enum": [
                  "-inf",
                  "+inf",
                  "inf"
                ],
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "description": "Selected minimum value of the range facet.",
            "title": "Min"
          },
          "max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer"
              },
              {
                "enum": [
                  "-inf",
                  "+inf",
                  "inf"
                ],
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "description": "Selected maximum value of the range facet.",
            "title": "Max"
          }
        },
        "title": "Range facet status",
        "type": "object"
      },
      "SingleOrMultipleFacet": {
        "additionalProperties": false,
        "properties": {
          "type": {
            "description": "If a facet is of type `single`, then only one of the options may be selected (e.g: display as radio button). If the type is `multiple`, then multiple options may be selected (e.g: display as checkboxes).",
            "enum": [
              "single",
              "multiple"
            ],
            "title": "Type",
            "type": "string"
          },
          "name": {
            "description": "The name of the facet. This should be passed in the filters parameter when a facet of this type is selected. `filters[name]=value`",
            "title": "Name",
            "type": "string"
          },
          "display_name": {
            "description": "The name of the facet as it is displayed to end users. Note that in `filters` parameter you need to use not `display_name` but `name`.",
            "title": "Display Name",
            "type": "string"
          },
          "hidden": {
            "description": "The boolean value saying whether facet is available for interaction.",
            "title": "Hidden",
            "type": "boolean"
          },
          "data": {
            "description": "Object containing custom data associated with this facet. An empty object (`{}`) if no data is currently associated with this facet.",
            "title": "Data",
            "type": "object"
          },
          "options": {
            "description": "An array of possible facet values matching this search. By default, facet options are sorted by relevance. Number of options is limited, by default, to 500. But the limit can be configured per [facet](/reference/v1-facets-create-facet) key.",
            "title": "Options",
            "items": {
              "$ref": "#/components/schemas/FacetOption"
            },
            "type": "array"
          }
        },
        "required": [
          "type",
          "name",
          "display_name",
          "hidden",
          "data"
        ],
        "title": "Single or Multiple facet",
        "type": "object"
      },
      "HierarchicalFacet": {
        "additionalProperties": false,
        "properties": {
          "type": {
            "title": "Type",
            "type": "string",
            "enum": [
              "hierarchical"
            ]
          },
          "name": {
            "description": "The name of the facet. This should be passed in the filters parameter when a facet of this type is selected. `filters[name]=value`",
            "title": "Name",
            "type": "string"
          },
          "display_name": {
            "description": "The name of the facet as it is displayed to end users. Note that in `filters` parameter you need to use not `display_name` but `name`.",
            "title": "Display Name",
            "type": "string"
          },
          "hidden": {
            "description": "The boolean value saying whether facet is available for interaction.",
            "title": "Hidden",
            "type": "boolean"
          },
          "data": {
            "description": "Object containing custom data associated with this facet. An empty object (`{}`) if no data is currently associated with this facet.",
            "title": "Data",
            "type": "object"
          },
          "options": {
            "description": "An array of possible facet values matching this search. By default, facet options are sorted by relevance.",
            "title": "Options",
            "items": {
              "$ref": "#/components/schemas/HierarchicalFacetOption"
            },
            "type": "array"
          }
        },
        "required": [
          "type",
          "name",
          "display_name",
          "hidden",
          "data"
        ],
        "title": "Hierarchical facet",
        "type": "object"
      },
      "FacetOption": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "description": "The name of the facet option as it is displayed to end users. Note that in `filters` parameter you need to use not `display_name` but `name`.",
            "title": "Display Name",
            "type": "string"
          },
          "status": {
            "description": "`selected` if this option is selected in the current search request, empty string otherwise.",
            "enum": [
              "selected",
              ""
            ],
            "title": "Status",
            "type": "string"
          },
          "value": {
            "description": "The value that should be passed in `filters` to select this option: `filters[name]=value`",
            "title": "Value",
            "type": "string"
          },
          "count": {
            "description": "Number of items in the current search that match this option.",
            "minimum": 0,
            "title": "Count",
            "type": "integer"
          },
          "data": {
            "description": "Object containing custom data associated with this facet option. An empty object (`{}`) if no data is currently associated with this option.",
            "title": "Data",
            "type": "object"
          },
          "range": {
            "description": "Array containing 2 values: the parsed `min` & `max` values that are represented by this facet option. The field exists only for options of a facet with type `range` or `single` if it is configured specially.",
            "title": "Range",
            "items": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "integer"
                },
                {
                  "enum": [
                    "-inf",
                    "+inf",
                    "inf"
                  ],
                  "type": "string"
                }
              ]
            },
            "type": "array"
          }
        },
        "required": [
          "display_name",
          "status",
          "value",
          "count"
        ],
        "title": "Facet option",
        "type": "object"
      },
      "HierarchicalFacetOption": {
        "additionalProperties": false,
        "properties": {
          "display_name": {
            "description": "The name of the facet option as it is displayed to end users. Note that in `filters` parameter you need to use not `display_name` but `name`.",
            "title": "Display Name",
            "type": "string"
          },
          "status": {
            "description": "`selected` if this option is selected in the current search request, empty string otherwise.",
            "enum": [
              "selected",
              ""
            ],
            "title": "Status",
            "type": "string"
          },
          "value": {
            "description": "The value that should be passed in `filters` to select this option: `filters[name]=value`",
            "title": "Value",
            "type": "string"
          },
          "count": {
            "description": "Number of items in the current search that match this option.",
            "minimum": 0,
            "title": "Count",
            "type": "integer"
          },
          "data": {
            "description": "Object containing custom data associated with this facet option. An empty object (`{}`) if no data is currently associated with this option.",
            "title": "Data",
            "type": "object"
          },
          "range": {
            "description": "Array containing 2 values: the parsed `min` & `max` values that are represented by this facet option. The field exists only for options of a facet with type `range` or `single` if it is configured specially.",
            "title": "Range",
            "items": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "integer"
                },
                {
                  "enum": [
                    "-inf",
                    "+inf",
                    "inf"
                  ],
                  "type": "string"
                }
              ]
            },
            "type": "array"
          },
          "options": {
            "description": "An array of possible facet values matching this search. By default, facet options are sorted by relevance. The field exists only for options of a facet with type `hierarchical`.",
            "title": "Options",
            "items": {
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "display_name",
          "status",
          "value",
          "count"
        ],
        "title": "Hierarchical facet option",
        "type": "object"
      },
      "SSEAgentInsightsStart": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "start"
            ],
            "title": "Event Type",
            "default": "start"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          },
          "request": {
            "$ref": "#/components/schemas/AgentInsightsStartRequest",
            "description": "Echo of the mode and page context of the originating request."
          }
        },
        "type": "object",
        "required": [
          "result_id",
          "request"
        ],
        "title": "Start",
        "description": "Denotes the start of the stream.",
        "examples": [
          {
            "event": "start",
            "request": {
              "mode": "qna",
              "page_context": {
                "item_id": "item_id_1",
                "page_type": "pdp"
              }
            },
            "result_id": "550e8400-e29b-41d4-a716-446655440000"
          }
        ]
      },
      "SSEAgentInsightsMessage": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "message"
            ],
            "title": "Event Type",
            "default": "message"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          },
          "text": {
            "description": "Arbitrary text produced by the agent.",
            "title": "Text",
            "type": "string"
          },
          "route": {
            "$ref": "#/components/schemas/MessageRoute",
            "description": "Marks a customer support answer. `text` contains the full answer, including replies from your support agent. Applies to this message only; the next message is handled as usual. Omitted for other messages. You can use `route` to show a button for your support chat or help center. New values may be added without an API version change. Treat unknown values as if `route` were absent."
          }
        },
        "type": "object",
        "required": [
          "result_id",
          "text"
        ],
        "title": "Message",
        "description": "Text content produced by the agent: an answer, a pod title, or an explanation of the results.",
        "examples": [
          {
            "event": "message",
            "result_id": "550e8400-e29b-41d4-a716-446655440000",
            "text": "Based on your interest in hiking gear, here are some waterproof options..."
          },
          {
            "event": "message",
            "result_id": "550e8400-e29b-41d4-a716-446655440000",
            "text": "For help with your order, please contact customer support.",
            "route": "customer_support"
          }
        ]
      },
      "SSEAgentInsightsItemResults": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "item_results"
            ],
            "title": "Event Type",
            "default": "item_results"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          },
          "title": {
            "type": "string",
            "description": "Agent-generated title for this set of results.",
            "title": "Title"
          },
          "text": {
            "type": "string",
            "description": "Agent-generated explanation of this set of results.",
            "title": "Text"
          },
          "request": {
            "description": "The Constructor request (search, browse or recommendations) used to obtain these results.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentInsightsItemResultsRequest"
              }
            ]
          },
          "response": {
            "$ref": "#/components/schemas/AgentInsightsItemResultsResponse",
            "description": "The Constructor response carrying the items."
          },
          "listing": {
            "description": "Only on `query_refinement`: the refined listing these results belong to.",
            "allOf": [
              {
                "$ref": "#/components/schemas/AgentInsightsListingState"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "result_id",
          "response"
        ],
        "title": "Item results",
        "description": "Product results with the metadata needed to render or re-issue the underlying Constructor request.",
        "examples": [
          {
            "event": "item_results",
            "request": {
              "params": {
                "num_results": 10
              },
              "type": "recommendations"
            },
            "response": {
              "result_id": "973e152a-ee03-47d2-a01b-1214da90a02b",
              "results": [
                {
                  "data": {
                    "id": "item_id_1",
                    "image_url": "https://cdn.example.com/item_id1.jpg",
                    "url": "https://example.com/product/item_id1"
                  },
                  "is_slotted": false,
                  "labels": {},
                  "matched_terms": [],
                  "value": "Product Name"
                }
              ]
            },
            "result_id": "550e8400-e29b-41d4-a716-446655440000",
            "title": "Pairs well with"
          }
        ]
      },
      "SSEAgentInsightsArticleReference": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "article_reference"
            ],
            "title": "Event Type",
            "default": "article_reference"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          },
          "source": {
            "description": "Canonical URL of the referenced article.",
            "format": "uri",
            "maxLength": 2083,
            "minLength": 1,
            "title": "Source",
            "type": "string"
          },
          "title": {
            "description": "Title of the referenced article.",
            "title": "Title",
            "type": "string"
          },
          "image_url": {
            "format": "uri",
            "maxLength": 2083,
            "minLength": 1,
            "type": "string",
            "description": "Representative image for the referenced article.",
            "title": "Image URL"
          },
          "abstract": {
            "type": "string",
            "description": "Short abstract of the referenced article.",
            "title": "Abstract"
          }
        },
        "type": "object",
        "required": [
          "result_id",
          "source",
          "title"
        ],
        "title": "Article reference",
        "description": "A relevant article from the agent's knowledge base.\n\nEmitted once per article; multiple articles produce multiple events.",
        "examples": [
          {
            "abstract": "Article Abstract",
            "event": "article_reference",
            "image_url": "https://cdn.example.com/images/article_id1.jpg",
            "result_id": "550e8400-e29b-41d4-a716-446655440000",
            "source": "https://example.com/article/article_id1",
            "title": "Article Title"
          }
        ]
      },
      "SSEAgentInsightsFollowUpRefinement": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "follow_up_refinement"
            ],
            "title": "Event Type",
            "default": "follow_up_refinement"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          },
          "question": {
            "type": "string",
            "description": "The refinement prompt shown to the shopper. Absent when the mode suggests follow-ups without a prompt (the legacy `follow_up_questions` event carries no prompt text), in which case the suggestions are carried by `options`; at least one of `question` and `options` is always present.",
            "title": "Question"
          },
          "options": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "Selectable answers to the refinement prompt.",
            "title": "Options"
          },
          "choices": {
            "items": {
              "$ref": "#/components/schemas/AgentInsightsRefinementChoice"
            },
            "type": "array",
            "minItems": 1,
            "description": "The options as filters, when each one applies a single filter value: same labels, same order. Absent when the options are free text.",
            "title": "Choices"
          }
        },
        "type": "object",
        "required": [
          "result_id"
        ],
        "title": "Follow-up refinement",
        "description": "A suggested refinement or follow-up action the shopper can take next.\n\nEmitted at most once per stream: the aggregated JSON response carries a single refinement, so a mode that emitted several would be visible in full over SSE and truncated to the first one in JSON.\n\n`question` is the prompt a mode shows above its options (\"Want some ideas?\"). Modes that suggest follow-ups without framing them as a prompt (`qna` produces a bare list of follow-up questions the shopper can ask next) omit it and carry their suggestions in `options`, so a client can render `options` alone. At least one of the two is always present.\n\n`choices` is the structured form of `options` when every option applies one filter value. `options` then carries the same labels in the same order, so a client that only renders text keeps working.",
        "examples": [
          {
            "event": "follow_up_refinement",
            "options": [
              "Show me something",
              "What about something else?"
            ],
            "question": "Want some ideas?",
            "result_id": "550e8400-e29b-41d4-a716-446655440000"
          },
          {
            "event": "follow_up_refinement",
            "options": [
              "Is this compatible with a dimmer switch?",
              "What bulb type do you recommend?"
            ],
            "result_id": "550e8400-e29b-41d4-a716-446655440000"
          }
        ]
      },
      "SSEAgentInsightsImageMeta": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "image_meta"
            ],
            "title": "Event Type",
            "default": "image_meta"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          },
          "item_id": {
            "description": "The item this image belongs to.",
            "title": "Item ID",
            "type": "string"
          },
          "image_url": {
            "description": "Full-size image URL.",
            "format": "uri",
            "maxLength": 2083,
            "minLength": 1,
            "title": "Image URL",
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "event",
          "result_id",
          "item_id",
          "image_url"
        ],
        "title": "Image meta",
        "description": "An image the agent referenced while answering: a size chart, a dimensions diagram, a detail shot.\n\nEmitted once per image; several images produce several events. Distinct from the images carried by `item_results`, which belong to the products themselves rather than to the agent's answer.\n\n`image_url` always points at a renderable image, so a client can render the event without checking for an empty URL first.",
        "examples": [
          {
            "event": "image_meta",
            "image_url": "https://cdn.example.com/images/product-dimensions.jpg",
            "item_id": "sofa-corner-grey-001",
            "result_id": "550e8400-e29b-41d4-a716-446655440000"
          }
        ]
      },
      "SSEAgentInsightsRecipeInfo": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "recipe_info"
            ],
            "title": "Event Type",
            "default": "recipe_info"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          },
          "recipe_title": {
            "type": "string",
            "title": "Recipe Title",
            "description": "The name of the recipe."
          },
          "prep_time_minutes": {
            "type": "integer",
            "title": "Preparation time in minutes",
            "description": "How long the recipe takes to prepare, in minutes."
          },
          "cook_time_minutes": {
            "type": "integer",
            "title": "Cooking time in minutes",
            "description": "How long the recipe takes to cook, in minutes."
          },
          "number_of_servings": {
            "type": "integer",
            "title": "Number of servings",
            "description": "How many servings the recipe yields, when the agent stated it."
          },
          "ingredients": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Ingredients",
            "description": "The ingredients the recipe calls for, as free-form lines."
          }
        },
        "type": "object",
        "required": [
          "event",
          "result_id",
          "recipe_title",
          "prep_time_minutes",
          "cook_time_minutes",
          "ingredients"
        ],
        "title": "Recipe info",
        "description": "A recipe the agent assembled, with its cooking times, serving size and ingredients.\n\nEmitted once per recipe, so a turn that proposes several produces several events, each normally followed by its `recipe_instructions`. Only domains configured for recipes produce this event; every other domain completes a turn without it.",
        "examples": [
          {
            "event": "recipe_info",
            "result_id": "550e8400-e29b-41d4-a716-446655440000",
            "recipe_title": "Classic Tomato Spaghetti",
            "prep_time_minutes": 10,
            "cook_time_minutes": 20,
            "number_of_servings": 4,
            "ingredients": [
              "400g spaghetti",
              "1 garlic clove",
              "400g tin of tomatoes",
              "Handful of basil leaves"
            ]
          }
        ]
      },
      "SSEAgentInsightsRecipeInstructions": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "recipe_instructions"
            ],
            "title": "Event Type",
            "default": "recipe_instructions"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          },
          "steps": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Recipe Directions",
            "description": "The preparation steps, in the order they are to be followed."
          },
          "text": {
            "type": "string",
            "title": "Text",
            "description": "A closing remark on the recipe, such as a serving suggestion."
          }
        },
        "type": "object",
        "required": [
          "event",
          "result_id",
          "steps"
        ],
        "title": "Recipe instructions",
        "description": "The step-by-step preparation instructions for a recipe.\n\nEmitted after the `recipe_info` it belongs to, so a turn proposing several recipes produces the two events in pairs. Only domains configured for recipes produce this event.",
        "examples": [
          {
            "event": "recipe_instructions",
            "result_id": "550e8400-e29b-41d4-a716-446655440000",
            "steps": [
              "Boil water in a large pot.",
              "Add spaghetti and cook for 8-10 minutes or until al dente; drain.",
              "In a large skillet, cook garlic in olive oil over medium heat until lightly golden.",
              "Stir in tomatoes, and cook until heated through.",
              "Mix spaghetti with the sauce, and serve with basil leaves on top."
            ],
            "text": "Serve with grated Parmesan cheese if desired."
          }
        ]
      },
      "SSEAgentInsightsPing": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "ping"
            ],
            "title": "Event Type",
            "default": "ping"
          }
        },
        "type": "object",
        "required": [
          "event"
        ],
        "title": "Ping",
        "description": "Keep-alive with no meaningful data.\n\nDeliberately not an `AgentInsightsResultEvent`: the RFC defines the ping payload as an empty object so proxies and clients never have to parse it.",
        "examples": [
          {
            "event": "ping"
          }
        ]
      },
      "SSEAgentInsightsServerError": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "server_error"
            ],
            "title": "Event Type",
            "default": "server_error"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          },
          "status_code": {
            "description": "HTTP-like status code describing the failure.",
            "title": "Status Code",
            "type": "integer"
          },
          "message": {
            "description": "Human-readable description of the failure.",
            "title": "Message",
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "result_id",
          "status_code",
          "message"
        ],
        "title": "Server error",
        "description": "An error that occurred during stream processing, after the response headers were already sent.",
        "examples": [
          {
            "event": "server_error",
            "message": "Internal Server Error",
            "result_id": "550e8400-e29b-41d4-a716-446655440000",
            "status_code": 500
          }
        ]
      },
      "SSEAgentInsightsEnd": {
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "end"
            ],
            "title": "Event Type",
            "default": "end"
          },
          "result_id": {
            "description": "Agent insight result ID. Identical on every event of the stream.",
            "title": "Result ID",
            "type": "string"
          },
          "thread_id": {
            "format": "uuid",
            "type": "string",
            "description": "A unique identifier for the conversation thread. This ID links multiple requests to the same conversation. Only populated for conversational modes.",
            "title": "Thread ID"
          }
        },
        "type": "object",
        "required": [
          "result_id"
        ],
        "title": "End",
        "description": "Denotes the end of the stream.",
        "examples": [
          {
            "event": "end",
            "result_id": "550e8400-e29b-41d4-a716-446655440000"
          }
        ]
      },
      "AgentInsightsPriceFactSource": {
        "type": "string",
        "enum": [
          "integration",
          "browser"
        ],
        "title": "Price fact source",
        "description": "Who resolved the price, as the caller declares it: `integration` for a price resolved server-side, `browser` for one resolved in the shopper's browser. Not verified, so both carry the same trust; it is never an authorization or eligibility signal."
      },
      "AgentInsightsRequestScopedPrice": {
        "properties": {
          "item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "title": "Item ID",
            "description": "The product this price is for. Must equal `page_context.item_id`. Printable, with no leading or trailing whitespace; compared verbatim, never normalised."
          },
          "variation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "title": "Variation ID",
            "description": "The variation this price is for. Must equal `page_context.variation_id`. Omit it for a price that applies to the whole item. Printable, with no leading or trailing whitespace; compared verbatim, never normalised."
          },
          "amount": {
            "type": "string",
            "title": "Amount",
            "description": "The price, as a decimal string greater than zero with at most 12 digits before the decimal point and 6 after it, e.g. `29.95`."
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "title": "Currency",
            "description": "A three-letter currency code, e.g. `AUD`. Normalised to uppercase.",
            "pattern": "^[A-Za-z]{3}$"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires at",
            "description": "When the price stops applying, with a timezone. An expired price is accepted and treated as absent."
          },
          "source": {
            "$ref": "#/components/schemas/AgentInsightsPriceFactSource",
            "description": "Who resolved the price."
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "title": "Reason",
            "description": "Why the shopper gets this price, e.g. `VIP Loyalty Program`, so the agent can mention it next to the price. Declared by the caller like `source`, so it proves nothing about eligibility. One printable line, with no leading or trailing whitespace."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "item_id",
          "amount",
          "currency",
          "expires_at",
          "source"
        ],
        "title": "Request-scoped price",
        "description": "A price that applies to the shopper for this request only, e.g. a member or quantity price the storefront resolved. The agent quotes it instead of the catalog price; an exact variation price takes precedence over an item-level one."
      },
      "AgentInsightsRequestContext": {
        "properties": {
          "prices": {
            "items": {
              "$ref": "#/components/schemas/AgentInsightsRequestScopedPrice"
            },
            "type": "array",
            "minItems": 1,
            "maxItems": 2,
            "title": "Prices",
            "description": "Up to one item-level price, which omits `variation_id`, and one price for the selected variation, which sets it to `page_context.variation_id`. Both are for `page_context.item_id`. One price per item/variation scope."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "prices"
        ],
        "title": "Request context",
        "description": "Facts that apply to this request only, supplied separately from `shopper_input`: they are never added to the conversation, so a later turn of the same thread cannot reuse them.\n\nAccepted only where request context is enabled: for `chat`, on the domain that serves the request; for `qna`, on the index key. Elsewhere a request carrying `request_context` is rejected with `400`. Once enabled, a turn without `request_context` tells the agent that no request price applies, so a price from an earlier turn is not reused. To send no price, omit `request_context`.\n\n\"Printable\", for a price's `item_id`, `variation_id` and `reason`, means letters, marks, numbers, punctuation, symbols and the plain space (U+0020) only. Tabs, line breaks, other control and format characters (such as a soft hyphen, or the zero-width joiner inside some emoji), other spaces (such as a non-breaking space) and private-use characters are rejected, and so, currently, are characters added after Unicode 14.0, such as emoji introduced since 2022."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```