> ## 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/stats
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /agents/spans/stats:
    post:
      tags:
        - Agents
      summary: GenAI span 통계
      description: 에이전트 span에 대해 차트용 집계를 쿼리합니다.
      operationId: genai_spans_stats_agents_spans_stats_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentSpanStatsReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSpanStatsRes'
          description: 성공 응답
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 검증 오류
components:
  schemas:
    AgentSpanStatsReq:
      description: GenAI 에이전트 span에 대해 chart용 집계를 요청합니다.
      properties:
        bucket_by:
          anyOf:
            - discriminator:
                mapping:
                  number:
                    $ref: '#/components/schemas/AgentSpanStatsNumericBucketSpec'
                  time:
                    $ref: '#/components/schemas/AgentSpanStatsTimeBucketSpec'
                propertyName: type
              oneOf:
                - $ref: '#/components/schemas/AgentSpanStatsTimeBucketSpec'
                - $ref: '#/components/schemas/AgentSpanStatsNumericBucketSpec'
            - type: 'null'
          title: Bucket By
        end:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: End
        granularity:
          anyOf:
            - exclusiveMinimum: 0
              type: integer
            - type: 'null'
          title: Granularity
        group_by:
          items:
            $ref: '#/components/schemas/AgentGroupByRef'
          title: Group By
          type: array
        group_filters:
          items:
            $ref: '#/components/schemas/AgentSpanGroupFilter'
          title: Group Filters
          type: array
        group_limit:
          default: 50
          maximum: 1000
          minimum: 1
          title: Group Limit
          type: integer
        metrics:
          items:
            $ref: '#/components/schemas/AgentSpanStatsMetricSpec'
          title: Metrics
          type: array
        project_id:
          title: Project Id
          type: string
        query:
          anyOf:
            - $ref: '#/components/schemas/Query'
            - type: 'null'
        start:
          format: date-time
          title: Start
          type: string
        timezone:
          default: UTC
          title: Timezone
          type: string
      required:
        - project_id
        - start
      title: AgentSpanStatsReq
      type: object
    AgentSpanStatsRes:
      description: chart용 에이전트 span 통계 행을 포함하는 응답입니다.
      properties:
        bucket_type:
          default: time
          enum:
            - time
            - number
          title: Bucket Type
          type: string
        columns:
          items:
            $ref: '#/components/schemas/AgentSpanStatsColumn'
          title: Columns
          type: array
        end:
          format: date-time
          title: End
          type: string
        granularity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Granularity
        rows:
          items:
            additionalProperties:
              anyOf:
                - format: date-time
                  type: string
                - type: string
                - type: integer
                - type: number
                - type: boolean
                - type: 'null'
            type: object
          title: Rows
          type: array
        start:
          format: date-time
          title: Start
          type: string
        timezone:
          title: Timezone
          type: string
      required:
        - start
        - end
        - timezone
      title: AgentSpanStatsRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AgentSpanStatsNumericBucketSpec:
      description: 하나의 숫자 span 또는 그룹화된 값의 범위를 기준으로 통계 행을 버킷팅합니다.
      properties:
        alias:
          default: value
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
          title: Alias
          type: string
        bins:
          default: 24
          maximum: 200
          minimum: 1
          title: Bins
          type: integer
        group_by:
          items:
            $ref: '#/components/schemas/AgentGroupByRef'
          title: Group By
          type: array
        max:
          anyOf:
            - type: number
            - type: 'null'
          title: Max
        measure:
          anyOf:
            - $ref: '#/components/schemas/AgentSpanMeasureSpec'
            - type: 'null'
        min:
          anyOf:
            - type: number
            - type: 'null'
          title: Min
        type:
          const: number
          default: number
          title: Type
          type: string
        value:
          anyOf:
            - $ref: '#/components/schemas/AgentSpanValueRef'
            - type: 'null'
      title: AgentSpanStatsNumericBucketSpec
      type: object
    AgentSpanStatsTimeBucketSpec:
      description: started_at 시간 간격을 기준으로 통계 행을 버킷팅합니다.
      properties:
        type:
          const: time
          default: time
          title: Type
          type: string
      title: AgentSpanStatsTimeBucketSpec
      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
    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
    AgentSpanStatsMetricSpec:
      description: 일치하는 각 span에서 추출해 chart 행으로 집계할 metric입니다.
      properties:
        aggregations:
          items:
            enum:
              - sum
              - avg
              - min
              - max
              - count
              - count_distinct
              - count_true
              - count_false
            type: string
          title: Aggregations
          type: array
        alias:
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
          title: Alias
          type: string
        percentiles:
          items:
            type: number
          title: Percentiles
          type: array
        value:
          $ref: '#/components/schemas/AgentSpanValueRef'
        value_type:
          enum:
            - datetime
            - number
            - boolean
            - string
          title: Value Type
          type: string
      required:
        - alias
        - value_type
        - value
      title: AgentSpanStatsMetricSpec
      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
    AgentSpanStatsColumn:
      description: 에이전트 span 통계 결과 행의 한 column을 설명하는 메타데이터입니다.
      properties:
        aggregation:
          anyOf:
            - type: string
            - type: 'null'
          title: Aggregation
        metric:
          anyOf:
            - type: string
            - type: 'null'
          title: Metric
        name:
          title: Name
          type: string
        role:
          enum:
            - time
            - bucket
            - group
            - metric
          title: Role
          type: string
        value_type:
          enum:
            - datetime
            - number
            - boolean
            - string
          title: Value Type
          type: string
      required:
        - name
        - role
        - value_type
      title: AgentSpanStatsColumn
      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
    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
    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
    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
    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
    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

````