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

# Create Monitor

> Create an evaluation monitor that spawns eval runs on a recurring schedule.

Monitors persist a reusable evaluation configuration (target type, metrics,
filters, cadence) and the system automatically creates eval runs at each
scheduled interval.  If ``only_if_changed`` is true (default), runs are
skipped when no new data has arrived since the previous run.

**Request body fields:**

- **name** *(string, required)*: Human-readable label, e.g. ``"Daily prod eval"``.
- **target_type** *(string, required)*: ``"TRACE"`` or ``"SESSION"``.
- **metrics** *(string[], required)*: Metric names to run. Use
  ``GET /evaluations/trace-metrics`` (TRACE) or ``GET /evaluations/session-metrics``
  (SESSION) for available names.
- **filters** *(object, optional, default {})*: Scope the data the monitor evaluates.
  Pass ``{}`` to match everything. Accepted keys depend on ``target_type``:
    - **TRACE**: ``date_from``, ``date_to`` (ISO 8601), ``status``
      (PENDING/RUNNING/COMPLETED/ERROR), ``session_id``, ``user_id``,
      ``tags`` (string[]), ``name`` (substring match).
    - **SESSION**: ``date_from``, ``date_to``, ``user_id``, ``has_error`` (bool),
      ``tags`` (string[]), ``min_trace_count`` (int).
- **cadence** *(string, required)*: Firing schedule. Predefined: ``"every_6h"``,
  ``"daily"``, ``"weekly"``. Custom cron: ``"cron:<min hour dom month dow>"``,
  e.g. ``"cron:0 3 * * *"`` (daily 3 AM UTC), ``"cron:0 6 * * 1-5"``
  (weekdays 6 AM).
- **sampling_rate** *(float, optional, default 1.0)*: Fraction of matching
  items to evaluate per run (0.0–1.0).
- **model** *(string, optional)*: LLM model override, e.g. ``"openai/gpt-4o"``.
- **only_if_changed** *(bool, optional, default true)*: Skip the run if no
  new traces/sessions exist since the last run.
- **signal_weights** *(object, optional, SESSION only)*: Override signal
  aggregation weights. Keys: ``confidence``, ``loop_detection``,
  ``tool_correctness``, ``coherence``.

Auth: ``Bearer`` + ``X-Project-ID`` | ``X-API-Key`` + ``X-Project-Name``



## OpenAPI

````yaml /openapi.json post /evaluations/monitors
openapi: 3.1.0
info:
  title: PandaProbe API
  description: >-
    Open-source agent engineering platform — trace LLM calls, evaluate agent
    performance, and monitor AI pipelines.
  version: 0.1.0
  contact:
    name: PandaProbe
    url: https://www.pandaprobe.com
    email: support@pandaprobe.com
servers:
  - url: https://api.pandaprobe.com
    description: Production
security: []
tags:
  - name: health
    description: Service health and readiness probes.
  - name: user
    description: Authenticated user profile.
  - name: traces
    description: Trace ingestion, querying, updating, and analytics.
  - name: sessions
    description: Session-based trace aggregation and analytics.
  - name: evaluations
    description: Evaluation runs, scores, analytics, and monitoring.
  - name: organizations
    description: Organization management and membership.
  - name: projects
    description: Project CRUD within organizations.
  - name: api-keys
    description: API key lifecycle management.
paths:
  /evaluations/monitors:
    post:
      tags:
        - evaluations
      summary: Create Monitor
      description: >-
        Create an evaluation monitor that spawns eval runs on a recurring
        schedule.


        Monitors persist a reusable evaluation configuration (target type,
        metrics,

        filters, cadence) and the system automatically creates eval runs at each

        scheduled interval.  If ``only_if_changed`` is true (default), runs are

        skipped when no new data has arrived since the previous run.


        **Request body fields:**


        - **name** *(string, required)*: Human-readable label, e.g. ``"Daily
        prod eval"``.

        - **target_type** *(string, required)*: ``"TRACE"`` or ``"SESSION"``.

        - **metrics** *(string[], required)*: Metric names to run. Use
          ``GET /evaluations/trace-metrics`` (TRACE) or ``GET /evaluations/session-metrics``
          (SESSION) for available names.
        - **filters** *(object, optional, default {})*: Scope the data the
        monitor evaluates.
          Pass ``{}`` to match everything. Accepted keys depend on ``target_type``:
            - **TRACE**: ``date_from``, ``date_to`` (ISO 8601), ``status``
              (PENDING/RUNNING/COMPLETED/ERROR), ``session_id``, ``user_id``,
              ``tags`` (string[]), ``name`` (substring match).
            - **SESSION**: ``date_from``, ``date_to``, ``user_id``, ``has_error`` (bool),
              ``tags`` (string[]), ``min_trace_count`` (int).
        - **cadence** *(string, required)*: Firing schedule. Predefined:
        ``"every_6h"``,
          ``"daily"``, ``"weekly"``. Custom cron: ``"cron:<min hour dom month dow>"``,
          e.g. ``"cron:0 3 * * *"`` (daily 3 AM UTC), ``"cron:0 6 * * 1-5"``
          (weekdays 6 AM).
        - **sampling_rate** *(float, optional, default 1.0)*: Fraction of
        matching
          items to evaluate per run (0.0–1.0).
        - **model** *(string, optional)*: LLM model override, e.g.
        ``"openai/gpt-4o"``.

        - **only_if_changed** *(bool, optional, default true)*: Skip the run if
        no
          new traces/sessions exist since the last run.
        - **signal_weights** *(object, optional, SESSION only)*: Override signal
          aggregation weights. Keys: ``confidence``, ``loop_detection``,
          ``tool_correctness``, ``coherence``.

        Auth: ``Bearer`` + ``X-Project-ID`` | ``X-API-Key`` + ``X-Project-Name``
      operationId: create_monitor_evaluations_monitors_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMonitorRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
        - ApiKey: []
        - ProjectID: []
        - ProjectName: []
components:
  schemas:
    CreateMonitorRequest:
      properties:
        name:
          type: string
          title: Name
          description: Human-readable name for the monitor, e.g. 'Daily prod trace eval'.
        target_type:
          type: string
          title: Target Type
          description: >-
            Evaluation scope: ``'TRACE'`` for trace-level metrics or
            ``'SESSION'`` for session-level metrics.
        metrics:
          items:
            type: string
          type: array
          minItems: 1
          title: Metrics
          description: >-
            Metric names to run on each scheduled eval. For TRACE monitors use
            ``GET /evaluations/trace-metrics``; for SESSION monitors use ``GET
            /evaluations/session-metrics`` to list available names. Example:
            ``['task_completion', 'step_efficiency']``.
        filters:
          additionalProperties: true
          type: object
          title: Filters
          description: >-
            JSON object defining which traces/sessions the monitor targets. Pass
            ``{}`` to match everything in the project. **TRACE monitors**
            accept: ``date_from`` (ISO 8601), ``date_to`` (ISO 8601), ``status``
            (PENDING|RUNNING|COMPLETED|ERROR), ``session_id``, ``user_id``,
            ``tags`` (string array, ANY match), ``name`` (substring,
            case-insensitive). **SESSION monitors** accept: ``date_from``,
            ``date_to``, ``user_id``, ``has_error`` (bool), ``tags``,
            ``min_trace_count`` (int). Example: ``{"status": "COMPLETED",
            "tags": ["production"]}``.
        sampling_rate:
          type: number
          maximum: 1
          minimum: 0
          title: Sampling Rate
          description: >-
            Fraction of matching traces/sessions to evaluate per run. 1.0 = all,
            0.1 = random 10%.
          default: 1
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: >-
            LLM model override for judge calls (e.g. ``'openai/gpt-4o'``). Uses
            system default if null.
        cadence:
          type: string
          title: Cadence
          description: >-
            How often the monitor fires. Predefined intervals: ``'every_6h'``,
            ``'daily'``, ``'weekly'``. Custom cron: ``'cron:<5-part
            expression>'`` where the five parts are ``minute hour day-of-month
            month day-of-week``. Examples: ``'cron:0 3 * * *'`` (daily at 3 AM
            UTC), ``'cron:0 6 * * 1-5'`` (weekdays at 6 AM), ``'cron:0 */4 * *
            *'`` (every 4 hours).
        only_if_changed:
          type: boolean
          title: Only If Changed
          description: >-
            When true, the scheduled run is skipped if no new traces/sessions
            have arrived since the last run, saving LLM costs. Set to false to
            always run on schedule regardless of new data.
          default: true
        signal_weights:
          anyOf:
            - additionalProperties:
                type: number
              type: object
            - type: 'null'
          title: Signal Weights
          description: >-
            Override default signal weights for session-level aggregation.
            **Only valid for SESSION monitors** (rejected for TRACE). Keys:
            ``confidence``, ``loop_detection``, ``tool_correctness``,
            ``coherence``. Defaults: confidence=1.0, loop_detection=1.0,
            tool_correctness=0.8, coherence=1.0. Example: ``{"confidence": 1.0,
            "loop_detection": 1.5}``.
      type: object
      required:
        - name
        - target_type
        - metrics
        - cadence
      title: CreateMonitorRequest
      description: Create an evaluation monitor that spawns runs on a cadence.
      example:
        name: Daily production trace eval
        target_type: TRACE
        metrics:
          - task_completion
          - tool_correctness
        filters:
          status: COMPLETED
        sampling_rate: 0.3
        cadence: daily
        only_if_changed: true
        model: gpt-5.4
    MonitorResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        name:
          type: string
          title: Name
        target_type:
          type: string
          title: Target Type
        metric_names:
          items:
            type: string
          type: array
          title: Metric Names
        filters:
          additionalProperties: true
          type: object
          title: Filters
        sampling_rate:
          type: number
          title: Sampling Rate
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        cadence:
          type: string
          title: Cadence
        only_if_changed:
          type: boolean
          title: Only If Changed
        status:
          type: string
          title: Status
        last_run_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Run At
        last_run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Last Run Id
        next_run_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Run At
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - name
        - target_type
        - metric_names
        - filters
        - sampling_rate
        - model
        - cadence
        - only_if_changed
        - status
        - last_run_at
        - last_run_id
        - next_run_at
        - created_at
        - updated_at
      title: MonitorResponse
      description: Full evaluation monitor representation.
    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:
    HTTPBearer:
      type: http
      scheme: bearer
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
    ProjectID:
      type: apiKey
      in: header
      name: X-Project-ID
    ProjectName:
      type: apiKey
      in: header
      name: X-Project-Name

````