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

# GenAI 검색



## OpenAPI

````yaml /ko/weave/reference/service-api/openapi.json post /agents/search
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /agents/search:
    post:
      tags:
        - Agents
      summary: GenAI 검색
      operationId: genai_search_agents_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentSearchReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSearchRes'
          description: 성공 응답
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 검증 오류
components:
  schemas:
    AgentSearchReq:
      description: |-
        콘텐츠 및/또는 span 수준 필터로 `messages` 테이블을 쿼리합니다.

        `messages` 테이블(메시지 발생 1건당 1행이며, spans에서 생성된 MV로 채워짐)을
        스캔하고 일치하는 span 수준 결과를 반환합니다. 전체 텍스트 검색은
        `query`를 설정합니다. 구조화된 조회(예: 트레이스의 모든 메시지)는 `query`를
        비워 두고 아래 필터를 사용합니다. 응답 형태를 만들기 위해 호출자가 대화별로 그룹화합니다.
      properties:
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
        conversation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversation Id
        limit:
          default: 20
          maximum: 1000
          minimum: 0
          title: Limit
          type: integer
        offset:
          default: 0
          minimum: 0
          title: Offset
          type: integer
        project_id:
          title: Project Id
          type: string
        provider_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Name
        query:
          default: ''
          title: Query
          type: string
        request_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Model
        roles:
          anyOf:
            - items:
                enum:
                  - ''
                  - user
                  - assistant
                  - system
                  - tool
                  - tool_call
                  - tool_result
                type: string
              type: array
            - type: 'null'
          title: Roles
        started_after:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Started After
        started_before:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Started Before
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Trace Id
        truncate_content:
          default: true
          title: Truncate Content
          type: boolean
      required:
        - project_id
      title: AgentSearchReq
      type: object
    AgentSearchRes:
      description: 에이전트 메시지 전반에 대한 전체 텍스트 검색 응답입니다.
      properties:
        results:
          items:
            $ref: '#/components/schemas/AgentSearchConversationResult'
          title: Results
          type: array
        total_conversations:
          default: 0
          title: Total Conversations
          type: integer
      required:
        - results
      title: AgentSearchRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AgentSearchConversationResult:
      description: 검색 쿼리와 일치하는 메시지가 포함된 대화입니다.
      properties:
        agent_name:
          title: Agent Name
          type: string
        conversation_id:
          title: Conversation Id
          type: string
        conversation_name:
          title: Conversation Name
          type: string
        last_activity:
          format: date-time
          title: Last Activity
          type: string
        matched_messages:
          items:
            $ref: '#/components/schemas/AgentSearchMatchedMessage'
          title: Matched Messages
          type: array
      required:
        - conversation_id
        - conversation_name
        - agent_name
        - matched_messages
        - last_activity
      title: AgentSearchConversationResult
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    AgentSearchMatchedMessage:
      description: 검색 쿼리와 일치하는 단일 메시지입니다.
      properties:
        content_digest:
          title: Content Digest
          type: string
        content_preview:
          title: Content Preview
          type: string
        role:
          enum:
            - ''
            - user
            - assistant
            - system
            - tool
            - tool_call
            - tool_result
          title: Role
          type: string
        span_id:
          title: Span Id
          type: string
        started_at:
          format: date-time
          title: Started At
          type: string
        trace_id:
          title: Trace Id
          type: string
      required:
        - span_id
        - trace_id
        - role
        - content_preview
        - content_digest
        - started_at
      title: AgentSearchMatchedMessage
      type: object

````