> ## 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.

# Monitor Runs

> Streams an immediate snapshot followed by live status and sanitized activity. Provide `run_id` to monitor one eval run, or omit it to capture all active runs when the connection opens.



## OpenAPI

````yaml /openapi.json get /v2/eval-runs/monitor
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/eval-runs/monitor:
    get:
      tags:
        - Eval Runs
      summary: Monitor Runs
      description: >-
        Streams an immediate snapshot followed by live status and sanitized
        activity. Provide `run_id` to monitor one eval run, or omit it to
        capture all active runs when the connection opens.
      operationId: v2_eval_runs_monitor
      parameters:
        - name: run_id
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            title: Run Id
          description: >-
            Parent run ID returned by `POST /v2/eval-runs`. Omit to capture all
            currently active eval runs.
        - name: detail
          in: query
          required: false
          schema:
            enum:
              - summary
              - verbose
            type: string
            default: summary
            title: Detail
          description: Reduced activity or the full sanitized durable trace.
        - name: after_id
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: After Id
          description: Durable child-event cursor used when reconnecting.
      responses:
        '200':
          description: A server-sent event stream of eval-run status and activity.
          content:
            text/event-stream:
              schema:
                type: string
              examples:
                one_run_summary:
                  summary: Monitor one run with reduced activity
                  value: >+
                    event: snapshot

                    data:
                    {"runs":[{"run_id":"run_123","status":"running","progress":{"completed":6,"total":10,"percent":60}}]}

                one_run_verbose:
                  summary: Monitor one run with its sanitized trace
                  value: >+
                    id: 4812

                    event: trace

                    data:
                    {"run_id":"run_123","child_job_id":"job_123","event_id":4812,"category":"tools","type":"tool_call","message":"Running
                    npm test","data":{}}

                all_runs_summary:
                  summary: Monitor all currently active eval runs
                  value: >+
                    event: snapshot

                    data:
                    {"runs":[{"run_id":"run_123","status":"running"},{"run_id":"run_456","status":"pending"}]}

        '404':
          description: >-
            Eval run not found. Use the run ID returned when you started the
            eval.
        '409':
          description: >-
            Too many active eval runs were selected. Pass `run_id` to monitor
            one run, or wait for active runs to finish.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '503':
          description: >-
            Eval monitoring is temporarily unavailable. Retry after a short
            delay.
      security:
        - LightsageApiKeyAuth: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  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.