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

# List Results

> Returns recorded attempts for an Agent Preference eval, newest first, each with whether your company won, lost, or tied against the competitor.



## OpenAPI

````yaml /openapi.json get /v2/agent-preference/evals/{eval_id}/results
openapi: 3.1.0
info:
  title: Lightsage Public API
  description: Public API for Lightsage CLI and external integrations.
  version: 1.0.0
servers:
  - url: https://api.lightsage.com
    description: Production
security: []
tags:
  - name: Status
    description: Check API availability and validate the calling API key.
  - name: Visibility
    description: >-
      Measure visibility, citations, competitors, and prompt performance across
      answer platforms.
  - name: Prompts
    description: Manage tracked prompts and topics, and inspect their stored runs.
  - name: Opportunities
    description: Review ranked opportunities computed from prompt visibility results.
  - name: Tasks
    description: Manage the persisted action queue and task lifecycle.
  - name: Site Audits
    description: Review website audit results and page-level findings.
  - name: Evals
    description: Define eval tasks, judges, subjects, and saved configurations.
  - name: Eval Templates
    description: >-
      Select reusable judges, targets, schedules, metadata, and runtime settings
      with `POST /v2/eval-templates`, then copy only those settings into
      prompt-specific evals with `POST /v2/evals/batch`. Templates never contain
      prompts and remain independent from evals created from them.
  - name: Eval Runs
    description: Start eval runs and inspect their lifecycle state.
  - name: Eval Results
    description: Review completed eval outcomes and diagnostic details.
  - name: Agent Preference
    description: >-
      Compare your company head-to-head with a tracked competitor. Create a
      comparison with `POST /v2/agent-preference/evals`, run it with `POST
      /v2/eval-runs`, then read which company agents recommended.
  - name: Agents
    description: List runnable coding-agent harness and model combinations.
  - name: Repositories
    description: Manage reusable Git repository workspaces.
  - name: Environments
    description: List reusable runtime environments without exposing secret values.
  - name: MCP Servers
    description: List reusable MCP server integrations without exposing credentials.
  - name: CLIs
    description: List reusable command-line interfaces without exposing setup commands.
  - name: Skills
    description: List reusable skills available to workflows and evals.
paths:
  /v2/agent-preference/evals/{eval_id}/results:
    get:
      tags:
        - Agent Preference
      summary: List Results
      description: >-
        Returns recorded attempts for an Agent Preference eval, newest first,
        each with whether your company won, lost, or tied against the
        competitor.
      operationId: v2_agent_preference_results_list
      parameters:
        - name: eval_id
          in: path
          required: true
          schema:
            type: string
            title: Eval Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2AgentPreferenceResultsResponse'
        '404':
          description: The eval is not an Agent Preference eval in this organization.
          content:
            application/json:
              example:
                detail: >-
                  Agent preference eval not found. Use an eval ID from the agent
                  preference evals list.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - LightsageApiKeyAuth: []
components:
  schemas:
    V2AgentPreferenceResultsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/V2AgentPreferenceResult'
          type: array
          title: Data
        count:
          type: integer
          title: Count
          description: The number of items in `data`.
        total:
          type: integer
          title: Total
          description: All recorded attempts for this eval.
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
        - count
        - total
        - limit
        - offset
      title: V2AgentPreferenceResultsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    V2AgentPreferenceResult:
      properties:
        id:
          type: string
          title: Id
          description: Result ID for one attempt.
        eval_id:
          type: string
          title: Eval Id
        agent:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent
          description: Runnable agent combining the harness and model.
        preference_result:
          anyOf:
            - $ref: '#/components/schemas/V2PreferenceResult'
            - type: 'null'
          description: >-
            Null when the attempt did not produce a usable recommendation, such
            as an attempt that ended in an error.
        latency_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Latency Ms
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
      type: object
      required:
        - id
        - eval_id
      title: V2AgentPreferenceResult
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    V2PreferenceResult:
      properties:
        outcome:
          type: string
          enum:
            - won
            - lost
            - tie
          title: Outcome
          description: >-
            `won` when the agent recommended your company, `lost` when it
            recommended the competitor, and `tie` when it recommended both
            equally or neither.
        winner_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Winner Name
          description: The recommended company. Null on a tie.
        competitor_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Competitor Name
        competitor_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Competitor Domain
      type: object
      required:
        - outcome
      title: V2PreferenceResult
      description: Which company an agent recommended, from your company's side.
  securitySchemes:
    LightsageApiKeyAuth:
      type: apiKey
      in: header
      name: X-Lightsage-Api-Key

````

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