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

# Get agent logs

> Returns container logs. Requires admin role. With follow=true, returns an SSE stream (text/event-stream). Without follow, returns JSON with log text.




## OpenAPI

````yaml /openapi.yaml get /agents/{id}/logs
openapi: 3.0.3
info:
  title: Hill90 API
  description: Hill90 platform API — agent management and lifecycle operations.
  version: 0.1.0
servers:
  - url: /
    description: Relative (behind Traefik reverse proxy)
security: []
paths:
  /agents/{id}/logs:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    get:
      summary: Get agent logs
      description: >
        Returns container logs. Requires admin role. With follow=true, returns
        an SSE stream (text/event-stream). Without follow, returns JSON with log
        text.
      parameters:
        - name: tail
          in: query
          schema:
            type: integer
            default: 200
          description: Number of tail lines
        - name: follow
          in: query
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
          description: If "true", stream logs via SSE
      responses:
        '200':
          description: Log output (JSON or SSE stream)
          content:
            application/json:
              schema:
                type: object
                properties:
                  logs:
                    type: string
            text/event-stream:
              schema:
                type: string
        '401':
          description: Not authenticated
        '403':
          description: Requires admin role
        '404':
          description: Agent not found
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````