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

# Download an agent's logs.

> A live round-trip to the agent, returned as a zip archive. Answers 409 when the agent is not
Online, 504 when it does not respond in time, and 502 carrying the agent's own error text
when the collection itself fails on the agent side.
            
Engini neither stores the archive nor writes any of it to its own logs. It is, however,
buffered rather than streamed - OPATaskLibrary hands back a byte[], so the whole archive is
held in memory for the life of the request, and there is no size cap. Bounding that means
changing OPATaskLibrary and is tracked separately.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/opa-agents/{id}/logs
openapi: 3.0.0
info:
  title: Engini DeveloperAPI
  version: v1
  description: 'Merged public developer API spec: Identity + WorkflowApi.'
servers:
  - url: https://api.engini.io
security:
  - Bearer: []
  - ApiKey: []
tags:
  - name: Auth
    description: Identify the caller a Developer API request is authenticated as.
  - name: Applications
    description: >-
      Discover the applications (toolkits) available in Engini and their
      connection requirements.
  - name: Tools
    description: Browse and execute the tools exposed by Engini applications.
  - name: Toolsets
    description: Manage toolsets - named groupings of connections and tools.
  - name: McpServers
    description: >-
      Inspect and maintain MCP servers - the account-wide endpoints that expose
      Engini tools and workflows over the Model Context Protocol. Distinct from
      the MCPClient connection kind, which is Engini consuming a third-party MCP
      server.
  - name: Connections
    description: >-
      Manage connections to applications, including OAuth sign-in and
      default-connection selection.
  - name: Triggers
    description: >-
      Create triggers that fire when something changes in a connected app, and
      manage the destinations their events are delivered to.
paths:
  /v1/opa-agents/{id}/logs:
    get:
      tags:
        - OpaAgents
      summary: Download an agent's logs.
      description: >-
        A live round-trip to the agent, returned as a zip archive. Answers 409
        when the agent is not

        Online, 504 when it does not respond in time, and 502 carrying the
        agent's own error text

        when the collection itself fails on the agent side.
                    
        Engini neither stores the archive nor writes any of it to its own logs.
        It is, however,

        buffered rather than streamed - OPATaskLibrary hands back a byte[], so
        the whole archive is

        held in memory for the life of the request, and there is no size cap.
        Bounding that means

        changing OPATaskLibrary and is tracked separately.
      operationId: OpaAgents_GetAgentLogs
      parameters:
        - name: id
          in: path
          required: true
          description: The identifier of the agent.
          schema:
            type: integer
            format: int32
          x-position: 1
      responses:
        '200':
          description: A zip archive of the agent's logs.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: Bad request - malformed body or invalid parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - the caller lacks access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - the resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests - rate limit exceeded.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error - an unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - Bearer: []
        - ApiKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      description: >-
        Unified error envelope for every non-200 response from
        /api/DeveloperAPI/v1/*.

        See applications-tools-spec.md §"Error envelope".
      additionalProperties: false
      required:
        - errorCode
        - message
        - requestId
        - timestamp
        - path
      properties:
        errorCode:
          type: string
          description: Machine-readable error code identifying the failure.
        message:
          type: string
          description: Human-readable error message.
        requestId:
          type: string
          description: Identifier of the request, for support/correlation.
        timestamp:
          type: string
          description: Timestamp when the error occurred (ISO 8601).
        path:
          type: string
          description: Request path that produced the error.
        details:
          type: array
          description: Per-field validation details, when applicable.
          nullable: true
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      description: A single field-level error detail within an ErrorResponse.
      additionalProperties: false
      required:
        - field
        - issue
      properties:
        field:
          type: string
          description: Name of the field the issue relates to.
        issue:
          type: string
          description: Description of the issue with the field.
  securitySchemes:
    Bearer:
      type: http
      description: Enter your JWT token
      scheme: bearer
      bearerFormat: JWT
    ApiKey:
      type: apiKey
      description: >-
        Opaque Developer API key (prefix `eng_`). Authenticates as the key's
        owner and resolves the account automatically.
      name: x-api-key
      in: header

````