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

# Get Session Agent Logs

> Returns the agent log lines captured during a session.



## OpenAPI

````yaml /openapi.yaml get /v1/sessions/{session_id}/logs/agent
openapi: 3.1.0
info:
  title: AnchorBrowser API
  version: 1.0.0
  description: APIs to manage all browser-related actions and configuration.
servers:
  - url: https://api.anchorbrowser.io
    description: API server
security: []
paths:
  /v1/sessions/{session_id}/logs/agent:
    get:
      tags:
        - Session Logs
      summary: Get Session Agent Logs
      description: Returns the agent log lines captured during a session.
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Agent logs retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  agentLogs:
                    type: array
                    items:
                      type: string
        '404':
          description: Agent log not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlatErrorResponse'
        '500':
          description: Failed to fetch agent logs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlatErrorResponse'
      security:
        - api_key_header: []
components:
  schemas:
    FlatErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
        code:
          type: integer
          description: HTTP status code.
      required:
        - error
  securitySchemes:
    api_key_header:
      type: apiKey
      in: header
      name: anchor-api-key
      description: API key passed in the header

````