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

# Stream Monitor Agent Logs

> Tails CloudWatch logs for the monitor agent, filtered to this monitor_id. Requires ?stream=1 or Accept: text/event-stream.



## OpenAPI

````yaml openapi/monitors.json GET /v1/monitors/{monitor_id}/agent-logs
openapi: 3.0.3
info:
  title: Monitors API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/monitors/{monitor_id}/agent-logs:
    get:
      summary: Stream Monitor Agent Logs
      description: >-
        Tails CloudWatch logs for the monitor's shadow agent, filtered to lines
        mentioning this `monitor_id`. Requires `?stream=1` or `Accept:
        text/event-stream`.
      parameters:
        - name: monitor_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^monitor_
        - name: stream
          in: query
          required: true
          schema:
            type: string
            enum:
              - '1'
              - 'true'
        - name: since
          in: query
          schema:
            type: integer
          description: 'Start timestamp in milliseconds (default: 30 minutes ago).'
      responses:
        '200':
          description: SSE stream with `ready`, `log`, `heartbeat`, and `error` events.
          content:
            text/event-stream:
              schema:
                type: string
        '400':
          description: Invalid monitor_id or missing stream parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid API key.
        '404':
          description: Monitor not found.
        '500':
          description: Internal server error.
      security:
        - Authorization: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        monitor_id:
          type: string
          description: Present on some create/update error responses.
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````