> ## 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 Agent Versionsクエリ



## OpenAPI

````yaml /ja/weave/reference/service-api/openapi.json post /agents/agent-versions/query
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /agents/agent-versions/query:
    post:
      tags:
        - Agents
      summary: GenAI Agent Versionsクエリ
      operationId: genai_agent_versions_query_agents_agent_versions_query_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentVersionsQueryReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentVersionsQueryRes'
          description: 成功レスポンス
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 検証エラー
components:
  schemas:
    AgentVersionsQueryReq:
      description: エージェントのバージョンを一覧表示するためのリクエストです。
      properties:
        agent_name:
          title: Agent Name
          type: string
        include_costs:
          default: false
          title: Include Costs
          type: boolean
        limit:
          default: 100
          maximum: 10000
          minimum: 0
          title: Limit
          type: integer
        offset:
          default: 0
          minimum: 0
          title: Offset
          type: integer
        project_id:
          title: Project Id
          type: string
        sort_by:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentSortBy'
              type: array
            - type: 'null'
          title: Sort By
      required:
        - project_id
        - agent_name
      title: AgentVersionsQueryReq
      type: object
    AgentVersionsQueryRes:
      description: エージェントのバージョン統計を含むレスポンスです。
      properties:
        total_count:
          default: 0
          title: Total Count
          type: integer
        versions:
          items:
            $ref: '#/components/schemas/AgentVersionSchema'
          title: Versions
          type: array
      required:
        - versions
      title: AgentVersionsQueryRes
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      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
    AgentVersionSchema:
      description: agent_versions AMT から集約したバージョンごとの統計です。
      properties:
        agent_name:
          title: Agent Name
          type: string
        agent_version:
          title: Agent Version
          type: string
        error_count:
          title: Error Count
          type: integer
        first_seen:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: First Seen
        invocation_count:
          title: Invocation Count
          type: integer
        last_seen:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Seen
        project_id:
          title: Project Id
          type: string
        span_count:
          title: Span Count
          type: integer
        total_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Cost Usd
        total_duration_ms:
          title: Total Duration Ms
          type: integer
        total_input_tokens:
          title: Total Input Tokens
          type: integer
        total_output_tokens:
          title: Total Output Tokens
          type: integer
      required:
        - project_id
        - agent_name
        - invocation_count
        - span_count
        - total_input_tokens
        - total_output_tokens
        - total_duration_ms
        - error_count
        - first_seen
        - last_seen
        - agent_version
      title: AgentVersionSchema
      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

````