> ## 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 span 쿼리

> 에이전트 span을 원시 행 또는 그룹화된 집계 형태로 쿼리합니다.



## OpenAPI

````yaml /ko/weave/reference/service-api/openapi.json post /agents/spans/query
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /agents/spans/query:
    post:
      tags:
        - Agents
      summary: GenAI span 쿼리
      description: 에이전트 span을 원시 행 또는 그룹화된 집계 형태로 쿼리합니다.
      operationId: genai_spans_query_agents_spans_query_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentSpansQueryReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSpansQueryRes'
          description: 성공 응답
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 검증 오류
components:
  schemas:
    AgentSpansQueryReq:
      description: >-
        프로젝트의 에이전트 span을 쿼리하기 위한 요청입니다.


        `group_by`가 비어 있거나 생략되면 응답의 `spans` 필드에 원시 span 행을 반환합니다. `group_by`가 비어
        있지 않으면 응답의 `groups` 필드에 집계된 그룹 행을 반환합니다.
      properties:
        custom_attr_columns:
          items:
            $ref: '#/components/schemas/AgentSpanValueRef'
          title: Custom Attr Columns
          type: array
        group_by:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentGroupByRef'
              type: array
            - type: 'null'
          title: Group By
        group_distributions:
          items:
            $ref: '#/components/schemas/AgentSpanGroupDistributionSpec'
          maxItems: 20
          title: Group Distributions
          type: array
        group_filters:
          items:
            $ref: '#/components/schemas/AgentSpanGroupFilter'
          title: Group Filters
          type: array
        include_costs:
          default: false
          title: Include Costs
          type: boolean
        include_details:
          default: false
          title: Include Details
          type: boolean
        limit:
          default: 100
          maximum: 10000
          minimum: 0
          title: Limit
          type: integer
        measures:
          items:
            $ref: '#/components/schemas/AgentSpanMeasureSpec'
          title: Measures
          type: array
        offset:
          default: 0
          minimum: 0
          title: Offset
          type: integer
        project_id:
          title: Project Id
          type: string
        query:
          anyOf:
            - $ref: '#/components/schemas/Query'
            - type: 'null'
        sort_by:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentSortBy'
              type: array
            - type: 'null'
          title: Sort By
        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
      required:
        - project_id
      title: AgentSpansQueryReq
      type: object
    AgentSpansQueryRes:
      description: |-
        span 쿼리에 대한 응답입니다.

        요청에서 `group_by`를 지정했는지에 따라 `spans` 또는 `groups` 중 정확히 하나만 채워집니다.
      properties:
        groups:
          items:
            $ref: '#/components/schemas/AgentSpanGroupRow'
          title: Groups
          type: array
        spans:
          items:
            $ref: '#/components/schemas/AgentSpanSchema'
          title: Spans
          type: array
        total_count:
          default: 0
          title: Total Count
          type: integer
      title: AgentSpansQueryRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AgentSpanValueRef:
      description: span 필드 또는 유형 지정된 맞춤형 속성 맵 값에 대한 레퍼런스입니다.
      properties:
        key:
          title: Key
          type: string
        source:
          default: field
          enum:
            - field
            - derived
            - custom_attrs_string
            - custom_attrs_int
            - custom_attrs_float
            - custom_attrs_bool
          title: Source
          type: string
      required:
        - key
      title: AgentSpanValueRef
      type: object
    AgentGroupByRef:
      description: |-
        span을 그룹화할 기준이 되는 필드 또는 맵 키에 대한 레퍼런스입니다.

        `source="field"`는 서버 측 허용 목록에 있는 의미론적 span 필드(`agent.name`) 또는 직접
        span column(`agent_name`)을 대상으로 합니다. 기존 호출자에 대해서는 `source="column"`도
        허용됩니다.
        다른 source는 유형 지정된 맞춤형 속성 Map column 내부의 키를 대상으로 하며,
        이 column은 임의의 사용자 정의 키를 허용합니다.
      properties:
        alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Alias
        key:
          title: Key
          type: string
        source:
          default: field
          enum:
            - field
            - column
            - custom_attrs_string
            - custom_attrs_int
            - custom_attrs_float
            - custom_attrs_bool
          title: Source
          type: string
      required:
        - key
      title: AgentGroupByRef
      type: object
    AgentSpanGroupDistributionSpec:
      description: 반환된 각 span 그룹에 대해 계산할 맞춤형 속성 분포 하나입니다.
      properties:
        alias:
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
          title: Alias
          type: string
        bins:
          default: 12
          maximum: 50
          minimum: 1
          title: Bins
          type: integer
        top_n:
          default: 5
          maximum: 20
          minimum: 1
          title: Top N
          type: integer
        value:
          $ref: '#/components/schemas/AgentSpanValueRef'
      required:
        - alias
        - value
      title: AgentSpanGroupDistributionSpec
      type: object
    AgentSpanGroupFilter:
      description: 그룹화된 span 측정값 하나에 대한 범위 필터입니다.
      properties:
        group_by:
          items:
            $ref: '#/components/schemas/AgentGroupByRef'
          title: Group By
          type: array
        max:
          anyOf:
            - type: number
            - format: date-time
              type: string
            - type: 'null'
          title: Max
        measure:
          $ref: '#/components/schemas/AgentSpanMeasureSpec'
        min:
          anyOf:
            - type: number
            - format: date-time
              type: string
            - type: 'null'
          title: Min
      required:
        - measure
      title: AgentSpanGroupFilter
      type: object
    AgentSpanMeasureSpec:
      description: 그룹 또는 버킷의 spans에 대해 계산된 단일 집계 측정값입니다.
      properties:
        aggregation:
          enum:
            - sum
            - avg
            - min
            - max
            - count
            - count_distinct
            - count_true
            - count_false
          title: Aggregation
          type: string
        alias:
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
          title: Alias
          type: string
        filter:
          anyOf:
            - $ref: '#/components/schemas/Query'
            - type: 'null'
        value:
          anyOf:
            - $ref: '#/components/schemas/AgentSpanValueRef'
            - type: 'null'
        value_type:
          anyOf:
            - enum:
                - datetime
                - number
                - boolean
                - string
              type: string
            - type: 'null'
          title: Value Type
      required:
        - alias
        - aggregation
      title: AgentSpanMeasureSpec
      type: object
    Query:
      additionalProperties: false
      properties:
        $expr:
          anyOf:
            - $ref: '#/components/schemas/AndOperation'
            - $ref: '#/components/schemas/OrOperation'
            - $ref: '#/components/schemas/NotOperation'
            - $ref: '#/components/schemas/EqOperation'
            - $ref: '#/components/schemas/GtOperation'
            - $ref: '#/components/schemas/LtOperation'
            - $ref: '#/components/schemas/GteOperation'
            - $ref: '#/components/schemas/LteOperation'
            - $ref: '#/components/schemas/InOperation'
            - $ref: '#/components/schemas/ContainsOperation'
          title: $Expr
      required:
        - $expr
      title: Query
      type: object
    AgentSortBy:
      description: 에이전트 쿼리 endpoints용 정렬 사양입니다.
      properties:
        direction:
          default: desc
          enum:
            - asc
            - desc
          title: Direction
          type: string
        field:
          title: Field
          type: string
      required:
        - field
      title: AgentSortBy
      type: object
    AgentSpanGroupRow:
      description: |-
        그룹화된 span 쿼리 응답의 단일 행입니다.

        `group_keys`는 각 group_by ref의 별칭을 이 행의 값에 매핑합니다.
        나머지 필드는 그룹별로 계산된 고정 집계 번들입니다.
      properties:
        agent_names:
          items:
            type: string
          title: Agent Names
          type: array
        agent_versions:
          items:
            type: string
          title: Agent Versions
          type: array
        conversation_count:
          default: 0
          title: Conversation Count
          type: integer
        conversation_names:
          items:
            type: string
          title: Conversation Names
          type: array
        distributions:
          additionalProperties:
            $ref: '#/components/schemas/AgentSpanGroupDistributionItem'
          title: Distributions
          type: object
        error_count:
          default: 0
          title: Error Count
          type: integer
        first_message:
          anyOf:
            - $ref: '#/components/schemas/AgentConversationMessagePreview'
            - type: 'null'
        first_seen:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: First Seen
        group_keys:
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: number
              - type: boolean
              - type: 'null'
          title: Group Keys
          type: object
        invocation_count:
          default: 0
          title: Invocation Count
          type: integer
        last_message:
          anyOf:
            - $ref: '#/components/schemas/AgentConversationMessagePreview'
            - type: 'null'
        last_seen:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Seen
        metrics:
          additionalProperties:
            anyOf:
              - format: date-time
                type: string
              - type: string
              - type: integer
              - type: number
              - type: boolean
              - type: 'null'
          title: Metrics
          type: object
        provider_names:
          items:
            type: string
          title: Provider Names
          type: array
        request_models:
          items:
            type: string
          title: Request Models
          type: array
        span_count:
          default: 0
          title: Span Count
          type: integer
        total_cache_creation_input_tokens:
          default: 0
          title: Total Cache Creation Input Tokens
          type: integer
        total_cache_read_input_tokens:
          default: 0
          title: Total Cache Read Input Tokens
          type: integer
        total_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Cost Usd
        total_duration_ms:
          default: 0
          title: Total Duration Ms
          type: integer
        total_input_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Input Cost Usd
        total_input_tokens:
          default: 0
          title: Total Input Tokens
          type: integer
        total_output_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Output Cost Usd
        total_output_tokens:
          default: 0
          title: Total Output Tokens
          type: integer
        total_reasoning_tokens:
          default: 0
          title: Total Reasoning Tokens
          type: integer
      title: AgentSpanGroupRow
      type: object
    AgentSpanSchema:
      description: 쿼리 API에서 반환되는 정규화된 에이전트 span입니다.
      properties:
        agent_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Description
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Id
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
        agent_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Version
        artifact_refs:
          items:
            type: string
          title: Artifact Refs
          type: array
        cache_creation_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Cache Creation Cost Usd
        cache_creation_input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cache Creation Input Tokens
        cache_read_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Cache Read Cost Usd
        cache_read_input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cache Read Input Tokens
        compaction_items_after:
          anyOf:
            - type: integer
            - type: 'null'
          title: Compaction Items After
        compaction_items_before:
          anyOf:
            - type: integer
            - type: 'null'
          title: Compaction Items Before
        compaction_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Compaction Summary
        content_refs:
          items:
            type: string
          title: Content Refs
          type: array
        conversation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversation Id
        conversation_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversation Name
        custom_attrs_bool:
          additionalProperties:
            type: boolean
          title: Custom Attrs Bool
          type: object
        custom_attrs_float:
          additionalProperties:
            type: number
          title: Custom Attrs Float
          type: object
        custom_attrs_int:
          additionalProperties:
            type: integer
          title: Custom Attrs Int
          type: object
        custom_attrs_string:
          additionalProperties:
            type: string
          title: Custom Attrs String
          type: object
        ended_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Ended At
        error_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Type
        finish_reasons:
          items:
            type: string
          title: Finish Reasons
          type: array
        input_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Input Cost Usd
        input_messages:
          items:
            $ref: '#/components/schemas/NormalizedMessage'
          title: Input Messages
          type: array
        input_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Input Tokens
        object_refs:
          items:
            type: string
          title: Object Refs
          type: array
        operation_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Operation Name
        output_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Output Cost Usd
        output_messages:
          items:
            $ref: '#/components/schemas/NormalizedMessage'
          title: Output Messages
          type: array
        output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Output Tokens
        output_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Type
        parent_span_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Span Id
        project_id:
          title: Project Id
          type: string
        provider_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Name
        raw_span_dump:
          anyOf:
            - type: string
            - type: 'null'
          title: Raw Span Dump
        reasoning_content:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning Content
        reasoning_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Reasoning Tokens
        request_choice_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Request Choice Count
        request_frequency_penalty:
          anyOf:
            - type: number
            - type: 'null'
          title: Request Frequency Penalty
        request_max_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Request Max Tokens
        request_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Model
        request_presence_penalty:
          anyOf:
            - type: number
            - type: 'null'
          title: Request Presence Penalty
        request_seed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Request Seed
        request_stop_sequences:
          items:
            type: string
          title: Request Stop Sequences
          type: array
        request_temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Request Temperature
        request_top_p:
          anyOf:
            - type: number
            - type: 'null'
          title: Request Top P
        response_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Id
        response_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Model
        server_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Server Address
        server_port:
          anyOf:
            - type: integer
            - type: 'null'
          title: Server Port
        span_id:
          title: Span Id
          type: string
        span_kind:
          anyOf:
            - enum:
                - UNSPECIFIED
                - INTERNAL
                - SERVER
                - CLIENT
                - PRODUCER
                - CONSUMER
              type: string
            - type: 'null'
          title: Span Kind
        span_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Span Name
        started_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Started At
        status_code:
          anyOf:
            - enum:
                - UNSET
                - OK
                - ERROR
              type: string
            - type: 'null'
          title: Status Code
        status_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Message
        system_instructions:
          items:
            type: string
          title: System Instructions
          type: array
        tool_call_arguments:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Arguments
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Id
        tool_call_result:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Result
        tool_definitions:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Definitions
        tool_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Description
        tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Name
        tool_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Type
        total_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Cost Usd
        trace_id:
          title: Trace Id
          type: string
        wb_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Wb Run Id
        wb_run_step:
          anyOf:
            - type: integer
            - type: 'null'
          title: Wb Run Step
        wb_run_step_end:
          anyOf:
            - type: integer
            - type: 'null'
          title: Wb Run Step End
        wb_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Wb User Id
      required:
        - project_id
        - trace_id
        - span_id
      title: AgentSpanSchema
      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
    AndOperation:
      description: |-
        논리 AND입니다. 모든 조건이 true로 평가되어야 합니다.

        예시:
            ```
            {
                "$and": [
                    {"$eq": [{"$getField": "op_name"}, {"$literal": "predict"}]},
                    {"$gt": [{"$getField": "summary.usage.tokens"}, {"$literal": 1000}]}
                ]
            }
            ```
      properties:
        $and:
          items:
            anyOf:
              - $ref: '#/components/schemas/LiteralOperation'
              - $ref: '#/components/schemas/GetFieldOperator'
              - $ref: '#/components/schemas/ConvertOperation'
              - $ref: '#/components/schemas/AndOperation'
              - $ref: '#/components/schemas/OrOperation'
              - $ref: '#/components/schemas/NotOperation'
              - $ref: '#/components/schemas/EqOperation'
              - $ref: '#/components/schemas/GtOperation'
              - $ref: '#/components/schemas/LtOperation'
              - $ref: '#/components/schemas/GteOperation'
              - $ref: '#/components/schemas/LteOperation'
              - $ref: '#/components/schemas/InOperation'
              - $ref: '#/components/schemas/ContainsOperation'
          title: $And
          type: array
      required:
        - $and
      title: AndOperation
      type: object
    OrOperation:
      description: |-
        논리 OR입니다. 조건 중 하나 이상이 참이어야 합니다.

        예:
            ```
            {
                "$or": [
                    {"$eq": [{"$getField": "op_name"}, {"$literal": "a"}]},
                    {"$eq": [{"$getField": "op_name"}, {"$literal": "b"}]}
                ]
            }
            ```
      properties:
        $or:
          items:
            anyOf:
              - $ref: '#/components/schemas/LiteralOperation'
              - $ref: '#/components/schemas/GetFieldOperator'
              - $ref: '#/components/schemas/ConvertOperation'
              - $ref: '#/components/schemas/AndOperation'
              - $ref: '#/components/schemas/OrOperation'
              - $ref: '#/components/schemas/NotOperation'
              - $ref: '#/components/schemas/EqOperation'
              - $ref: '#/components/schemas/GtOperation'
              - $ref: '#/components/schemas/LtOperation'
              - $ref: '#/components/schemas/GteOperation'
              - $ref: '#/components/schemas/LteOperation'
              - $ref: '#/components/schemas/InOperation'
              - $ref: '#/components/schemas/ContainsOperation'
          title: $Or
          type: array
      required:
        - $or
      title: OrOperation
      type: object
    NotOperation:
      description: |-
        논리 NOT입니다. 조건을 반전합니다.

        예:
            ```
            {
                "$not": [
                    {"$eq": [{"$getField": "op_name"}, {"$literal": "debug"}]}
                ]
            }
            ```
      properties:
        $not:
          maxItems: 1
          minItems: 1
          prefixItems:
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
          title: $Not
          type: array
      required:
        - $not
      title: NotOperation
      type: object
    EqOperation:
      description: |-
        두 피연산자가 같은지 확인합니다.

        예:
            ```
            {
                "$eq": [{"$getField": "op_name"}, {"$literal": "predict"}]
            }
            ```
      properties:
        $eq:
          maxItems: 2
          minItems: 2
          prefixItems:
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
          title: $Eq
          type: array
      required:
        - $eq
      title: EqOperation
      type: object
    GtOperation:
      description: |-
        초과 비교입니다.

        예:
            ```
            {
                "$gt": [{"$getField": "summary.usage.tokens"}, {"$literal": 100}]
            }
            ```
      properties:
        $gt:
          maxItems: 2
          minItems: 2
          prefixItems:
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
          title: $Gt
          type: array
      required:
        - $gt
      title: GtOperation
      type: object
    LtOperation:
      description: |-
        미만 비교입니다.

        예:
            ```
            {
                "$lt": [{"$getField": "summary.usage.tokens"}, {"$literal": 100}]
            }
            ```
      properties:
        $lt:
          maxItems: 2
          minItems: 2
          prefixItems:
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
          title: $Lt
          type: array
      required:
        - $lt
      title: LtOperation
      type: object
    GteOperation:
      description: |-
        이상 비교입니다.

        예:
            ```
            {
                "$gte": [{"$getField": "summary.usage.tokens"}, {"$literal": 100}]
            }
            ```
      properties:
        $gte:
          maxItems: 2
          minItems: 2
          prefixItems:
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
          title: $Gte
          type: array
      required:
        - $gte
      title: GteOperation
      type: object
    LteOperation:
      description: |-
        작거나 같은 비교입니다.

        예:
            ```
            {
                "$lte": [{"$getField": "summary.usage.tokens"}, {"$literal": 100}]
            }
            ```
      properties:
        $lte:
          maxItems: 2
          minItems: 2
          prefixItems:
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
          title: $Lte
          type: array
      required:
        - $lte
      title: LteOperation
      type: object
    InOperation:
      description: |-
        멤버십 검사입니다.

        왼쪽 피연산자가 두 번째 피연산자로 제공된 목록에 있으면 true를 반환합니다.

        예:
            ```
            {
                "$in": [
                    {"$getField": "op_name"},
                    [{"$literal": "predict"}, {"$literal": "generate"}]
                ]
            }
            ```
      properties:
        $in:
          maxItems: 2
          minItems: 2
          prefixItems:
            - anyOf:
                - $ref: '#/components/schemas/LiteralOperation'
                - $ref: '#/components/schemas/GetFieldOperator'
                - $ref: '#/components/schemas/ConvertOperation'
                - $ref: '#/components/schemas/AndOperation'
                - $ref: '#/components/schemas/OrOperation'
                - $ref: '#/components/schemas/NotOperation'
                - $ref: '#/components/schemas/EqOperation'
                - $ref: '#/components/schemas/GtOperation'
                - $ref: '#/components/schemas/LtOperation'
                - $ref: '#/components/schemas/GteOperation'
                - $ref: '#/components/schemas/LteOperation'
                - $ref: '#/components/schemas/InOperation'
                - $ref: '#/components/schemas/ContainsOperation'
            - items:
                anyOf:
                  - $ref: '#/components/schemas/LiteralOperation'
                  - $ref: '#/components/schemas/GetFieldOperator'
                  - $ref: '#/components/schemas/ConvertOperation'
                  - $ref: '#/components/schemas/AndOperation'
                  - $ref: '#/components/schemas/OrOperation'
                  - $ref: '#/components/schemas/NotOperation'
                  - $ref: '#/components/schemas/EqOperation'
                  - $ref: '#/components/schemas/GtOperation'
                  - $ref: '#/components/schemas/LtOperation'
                  - $ref: '#/components/schemas/GteOperation'
                  - $ref: '#/components/schemas/LteOperation'
                  - $ref: '#/components/schemas/InOperation'
                  - $ref: '#/components/schemas/ContainsOperation'
              type: array
          title: $In
          type: array
      required:
        - $in
      title: InOperation
      type: object
    ContainsOperation:
      description: |-
        대소문자를 구분하지 않는 부분 문자열 일치입니다.

        MongoDB의 일부가 아닙니다. Weave 전용 확장입니다.

        예:
            ```
            {
                "$contains": {
                    "input": {"$getField": "display_name"},
                    "substr": {"$literal": "llm"},
                    "case_insensitive": true
                }
            }
            ```
      properties:
        $contains:
          $ref: '#/components/schemas/ContainsSpec'
      required:
        - $contains
      title: ContainsOperation
      type: object
    AgentSpanGroupDistributionItem:
      description: 하나의 span 그룹/맞춤형 속성 쌍에 대한 분포 데이터입니다.
      properties:
        alias:
          title: Alias
          type: string
        bins:
          items:
            $ref: '#/components/schemas/AgentSpanGroupDistributionBin'
          title: Bins
          type: array
        key:
          title: Key
          type: string
        missing_count:
          default: 0
          title: Missing Count
          type: integer
        other_count:
          default: 0
          title: Other Count
          type: integer
        present_count:
          default: 0
          title: Present Count
          type: integer
        source:
          enum:
            - custom_attrs_string
            - custom_attrs_int
            - custom_attrs_float
            - custom_attrs_bool
          title: Source
          type: string
        total_count:
          default: 0
          title: Total Count
          type: integer
        value_type:
          enum:
            - string
            - int
            - float
            - bool
          title: Value Type
          type: string
        values:
          items:
            $ref: '#/components/schemas/AgentSpanGroupDistributionValue'
          title: Values
          type: array
      required:
        - alias
        - source
        - key
        - value_type
      title: AgentSpanGroupDistributionItem
      type: object
    AgentConversationMessagePreview:
      description: |-
        그룹화된 대화 행에 대한 잘린 첫 번째/마지막 메시지 스니펫입니다.

        `role`은 채팅 타임라인 메시지 유형(예: "user_message",
        "assistant_message")이므로 클라이언트는 전체
        채팅 뷰와 일관된 방식으로 스타일을 적용할 수 있습니다. `text`는 다듬어지고 길이 한도가 적용된 미리보기 콘텐츠입니다.
      properties:
        role:
          default: ''
          title: Role
          type: string
        text:
          default: ''
          title: Text
          type: string
      title: AgentConversationMessagePreview
      type: object
    NormalizedMessage:
      description: >-
        모든 공급자 형식에서 정규화된 단일 메시지입니다.


        ClickHouse ``Tuple(role String, content String, finish_reason String)``에
        매핑됩니다.


        - role: 메시지 역할(user, assistant, tool, system)

        - content: 단순 메시지의 경우 일반 텍스트, 멀티모달/구조화된 메시지의 경우 JSON으로 직렬화된 parts 배열

        - finish_reason: 메시지별 종료 사유(출력 메시지에만 해당)
      properties:
        content:
          title: Content
          type: string
        finish_reason:
          default: ''
          title: Finish Reason
          type: string
        role:
          default: ''
          title: Role
          type: string
      required:
        - content
      title: NormalizedMessage
      type: object
    LiteralOperation:
      description: |-
        쿼리 언어에서 상수 값을 나타냅니다.

        이는 JSON으로 직렬화할 수 있는 모든 표준 값이 될 수 있습니다.

        예:
            ```
            {"$literal": "predict"}
            ```
      properties:
        $literal:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - additionalProperties:
                $ref: '#/components/schemas/LiteralOperation'
              type: object
            - items:
                $ref: '#/components/schemas/LiteralOperation'
              type: array
            - type: 'null'
          title: $Literal
      required:
        - $literal
      title: LiteralOperation
      type: object
    GetFieldOperator:
      description: |-
        트레이스된 call의 필드에 접근합니다.

        중첩된 필드 접근에는 점 표기법을 지원합니다. 예: `summary.usage.tokens`.

        `CallSchema`에 있는 필드에서만 작동하며, 여기에는 다음이 포함됩니다.
        - `op_name`, `trace_id`, `started_at`와 같은 최상위 필드
        - `inputs.input_name`, `summary.usage.tokens` 등의 중첩 필드

        예:
            ```
            {"$getField": "op_name"}
            ```
      properties:
        $getField:
          title: $Getfield
          type: string
      required:
        - $getField
      title: GetFieldOperator
      type: object
    ConvertOperation:
      description: |-
        입력값을 특정 유형(예: `int`, `bool`, `string`)으로 변환합니다.

        예:
            ```
            {
                "$convert": {
                    "input": {"$getField": "inputs.value"},
                    "to": "int"
                }
            }
            ```
      properties:
        $convert:
          $ref: '#/components/schemas/ConvertSpec'
      required:
        - $convert
      title: ConvertOperation
      type: object
    ContainsSpec:
      description: |-
        `$contains` 오퍼레이션의 사양입니다.

        - `input`: 검색할 문자열입니다.
        - `substr`: 찾을 부분 문자열입니다.
        - `case_insensitive`: true이면 대소문자를 구분하지 않고 일치합니다.
      properties:
        case_insensitive:
          anyOf:
            - type: boolean
            - type: 'null'
          default: false
          title: Case Insensitive
        input:
          anyOf:
            - $ref: '#/components/schemas/LiteralOperation'
            - $ref: '#/components/schemas/GetFieldOperator'
            - $ref: '#/components/schemas/ConvertOperation'
            - $ref: '#/components/schemas/AndOperation'
            - $ref: '#/components/schemas/OrOperation'
            - $ref: '#/components/schemas/NotOperation'
            - $ref: '#/components/schemas/EqOperation'
            - $ref: '#/components/schemas/GtOperation'
            - $ref: '#/components/schemas/LtOperation'
            - $ref: '#/components/schemas/GteOperation'
            - $ref: '#/components/schemas/LteOperation'
            - $ref: '#/components/schemas/InOperation'
            - $ref: '#/components/schemas/ContainsOperation'
          title: Input
        substr:
          anyOf:
            - $ref: '#/components/schemas/LiteralOperation'
            - $ref: '#/components/schemas/GetFieldOperator'
            - $ref: '#/components/schemas/ConvertOperation'
            - $ref: '#/components/schemas/AndOperation'
            - $ref: '#/components/schemas/OrOperation'
            - $ref: '#/components/schemas/NotOperation'
            - $ref: '#/components/schemas/EqOperation'
            - $ref: '#/components/schemas/GtOperation'
            - $ref: '#/components/schemas/LtOperation'
            - $ref: '#/components/schemas/GteOperation'
            - $ref: '#/components/schemas/LteOperation'
            - $ref: '#/components/schemas/InOperation'
            - $ref: '#/components/schemas/ContainsOperation'
          title: Substr
      required:
        - input
        - substr
      title: ContainsSpec
      type: object
    AgentSpanGroupDistributionBin:
      description: span 그룹의 맞춤형 속성에 대한 숫자 히스토그램 bin 하나입니다.
      properties:
        count:
          title: Count
          type: integer
        index:
          title: Index
          type: integer
        max:
          title: Max
          type: number
        min:
          title: Min
          type: number
      required:
        - index
        - min
        - max
        - count
      title: AgentSpanGroupDistributionBin
      type: object
    AgentSpanGroupDistributionValue:
      description: span 그룹의 범주형 맞춤형 속성 값 개수 하나입니다.
      properties:
        count:
          title: Count
          type: integer
        value:
          title: Value
          type: string
      required:
        - value
        - count
      title: AgentSpanGroupDistributionValue
      type: object
    ConvertSpec:
      description: |-
        `$convert`의 변환 세부 정보를 지정합니다.

        - `input`: 변환할 피연산자입니다.
        - `to`: 변환할 대상 유형입니다.
      properties:
        input:
          anyOf:
            - $ref: '#/components/schemas/LiteralOperation'
            - $ref: '#/components/schemas/GetFieldOperator'
            - $ref: '#/components/schemas/ConvertOperation'
            - $ref: '#/components/schemas/AndOperation'
            - $ref: '#/components/schemas/OrOperation'
            - $ref: '#/components/schemas/NotOperation'
            - $ref: '#/components/schemas/EqOperation'
            - $ref: '#/components/schemas/GtOperation'
            - $ref: '#/components/schemas/LtOperation'
            - $ref: '#/components/schemas/GteOperation'
            - $ref: '#/components/schemas/LteOperation'
            - $ref: '#/components/schemas/InOperation'
            - $ref: '#/components/schemas/ContainsOperation'
          title: Input
        to:
          enum:
            - double
            - string
            - int
            - bool
            - exists
          title: To
          type: string
      required:
        - input
        - to
      title: ConvertSpec
      type: object

````