> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpertai.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 搜索 Store 数据

> 查询 namespace_prefix 下的数据。省略 query 可列出或筛选数据；语义 query 搜索需要智能体的记忆模型配置。SDK 方法将命名空间数组作为第一个参数传入。



## OpenAPI

````yaml /api/openapi.sdk.zh-Hans.json post /api/ai/store/items/search
openapi: 3.0.3
info:
  title: XpertAI SDK HTTP 接口
  version: 1.0.0
  description: >-
    SDK 指南使用的当前 HTTP 接口。使用服务端 API Key，通过 Authorization: Bearer <API_KEY> 或
    x-api-key 鉴权，不依赖 ChatKit。本参考覆盖指南中的案例，不代表 SDK 导出的所有方法都已实现；使用其他字段前请核对部署支持情况。
servers:
  - url: https://api.xpertai.cn
    description: XpertAI API，私有部署请替换为自己的 API 服务地址。
security:
  - ApiKeyBearer: []
  - ApiKeyHeader: []
tags:
  - name: Assistants
  - name: Threads
  - name: Runs
  - name: Contexts
  - name: Store
paths:
  /api/ai/store/items/search:
    post:
      tags:
        - Store
      summary: 搜索 Store 数据
      description: >-
        查询 namespace_prefix 下的数据。省略 query 可列出或筛选数据；语义 query 搜索需要智能体的记忆模型配置。SDK
        方法将命名空间数组作为第一个参数传入。
      operationId: search_store_items
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                namespace_prefix:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: 命名空间首段为智能体 ID，各段不能包含句点。
                filter:
                  type: object
                  additionalProperties: true
                query:
                  type: string
                limit:
                  type: integer
                  minimum: 0
                  default: 10
                offset:
                  type: integer
                  minimum: 0
                  default: 0
              required:
                - namespace_prefix
            example:
              namespace_prefix:
                - 22222222-2222-4222-8222-222222222222
                - sdk-example
              limit: 10
              offset: 0
      responses:
        '201':
          description: 请求成功。
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/StoreItem'
              example:
                items:
                  - namespace:
                      - 22222222-2222-4222-8222-222222222222
                      - sdk-example
                    key: key1
                    value:
                      value: 42
                    created_at: '2026-10-12T00:00:00Z'
                    updated_at: '2026-10-12T00:00:00Z'
        '400':
          description: 请求参数、标识关联或操作状态不正确。
        '401':
          description: 缺少 API Key 或 API Key 无效。
        '403':
          description: 调用方无权访问目标资源。
        '404':
          description: 资源不存在或对调用方不可用。
components:
  schemas:
    StoreItem:
      type: object
      properties:
        namespace:
          type: array
          items:
            type: string
        key:
          type: string
        value:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - namespace
        - key
        - value
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      description: 服务端 API Key，不要暴露到浏览器代码中。
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.