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

# List artifacts

> List artifacts (files) produced by an agent. Optionally scope to a specific session, search by filename, sort, and paginate.



## OpenAPI

````yaml get /agents/{agent_id}/artifacts
openapi: 3.0.0
info:
  title: Public API
  version: 1.0.0
servers:
  - url: https://api.gumloop.com/api/v1
security: []
paths:
  /agents/{agent_id}/artifacts:
    get:
      tags:
        - Artifacts
      summary: List artifacts
      description: >-
        List artifacts (files) produced by an agent. Optionally scope to a
        specific session, search by filename, sort, and paginate.
      operationId: listArtifacts
      parameters:
        - in: path
          name: agent_id
          required: true
          schema:
            type: string
          description: ID of the agent whose artifacts to list.
        - in: query
          name: session_id
          required: false
          schema:
            type: string
          description: Filter to artifacts produced within a specific session.
        - in: query
          name: search_query
          required: false
          schema:
            type: string
          description: Case-insensitive substring match against the artifact filename.
        - in: query
          name: sort_order
          required: false
          schema:
            type: string
            default: newest
          description: Sort order for results. Defaults to `newest`.
        - in: query
          name: page_size
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
          description: Number of artifacts to return per page. Clamped to 1–100.
        - in: query
          name: cursor
          required: false
          schema:
            type: string
          description: Opaque pagination cursor returned by a prior call as `next_cursor`.
      responses:
        '200':
          description: Artifacts matching the provided filters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  artifacts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique artifact identifier.
                          example: art_aBcDeF123
                        version_id:
                          type: string
                          nullable: true
                          description: ID of this specific artifact version.
                          example: ver_xYz9012
                        major_version:
                          type: integer
                          nullable: true
                          example: 2
                        agent_id:
                          type: string
                          nullable: true
                          description: ID of the agent that produced the artifact.
                          example: abc123DEFghiJKL
                        session_id:
                          type: string
                          nullable: true
                          description: >-
                            ID of the session in which the artifact was
                            produced.
                          example: ses_8h2k4m1n
                        filename:
                          type: string
                          nullable: true
                          example: q4_sales_report.pdf
                        created_at:
                          type: string
                          format: date-time
                          nullable: true
                          description: >-
                            ISO 8601 timestamp of when the artifact version was
                            created.
                          example: '2026-05-15T14:32:00Z'
                        metadata:
                          type: object
                          description: Arbitrary metadata stored with the artifact version.
                        url:
                          type: string
                          nullable: true
                          description: Signed URL for direct access to the artifact file.
                          example: https://storage.googleapis.com/...
                        creator:
                          type: object
                          nullable: true
                          description: >-
                            The user who created this artifact version. `null`
                            when unknown.
                          properties:
                            id:
                              type: string
                              nullable: true
                              example: user_19a3bc
                            first_name:
                              type: string
                              nullable: true
                              example: Ada
                            last_name:
                              type: string
                              nullable: true
                              example: Lovelace
                            email:
                              type: string
                              nullable: true
                              example: ada@example.com
                            profile_picture:
                              type: string
                              nullable: true
                              example: https://example.com/avatars/ada.png
                  next_cursor:
                    type: string
                    nullable: true
                    description: >-
                      Cursor to pass as `cursor` on the next request. `null`
                      when there are no more results.
              examples:
                multiple:
                  summary: Multiple artifacts
                  value:
                    artifacts:
                      - id: art_aBcDeF123
                        version_id: ver_xYz9012
                        major_version: 2
                        agent_id: abc123DEFghiJKL
                        session_id: ses_8h2k4m1n
                        filename: q4_sales_report.pdf
                        created_at: '2026-05-15T14:32:00Z'
                        metadata:
                          media_type: application/pdf
                          size: 12345
                        url: >-
                          https://storage.googleapis.com/gumloop-artifacts/art_aBcDeF123?X-Goog-Signature=...
                        creator:
                          id: user_19a3bc
                          first_name: Ada
                          last_name: Lovelace
                          email: ada@example.com
                          profile_picture: https://example.com/avatars/ada.png
                      - id: art_gHiJkL456
                        version_id: ver_aBc4567
                        major_version: 1
                        agent_id: abc123DEFghiJKL
                        session_id: ses_8h2k4m1n
                        filename: summary.txt
                        created_at: '2026-05-15T14:30:11Z'
                        metadata: {}
                        url: >-
                          https://storage.googleapis.com/gumloop-artifacts/art_gHiJkL456?X-Goog-Signature=...
                        creator:
                          id: user_19a3bc
                          first_name: Ada
                          last_name: Lovelace
                          email: ada@example.com
                          profile_picture: null
                    next_cursor: eyJjcmVhdGVkX3RzIjoiMjAyNi0wNS0xNVQxNDozMDoxMVoifQ==
                empty:
                  summary: No artifacts
                  value:
                    artifacts: []
                    next_cursor: null
        '400':
          description: Bad request — `page_size` is not an integer.
        '401':
          description: Unauthorized — missing or invalid API key.
        '403':
          description: Forbidden — the caller does not have read access on the agent.
        '404':
          description: Agent not found.
        '500':
          description: Internal server error.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl
            'https://api.gumloop.com/api/v1/agents/AGENT_ID/artifacts?page_size=20'
            \
              -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
        - lang: python
          label: Python
          source: |
            from gumloop import Gumloop

            client = Gumloop(access_token="YOUR_ACCESS_TOKEN")

            response = client.artifacts.list(agent_id="AGENT_ID")
            for artifact in response.artifacts:
                print(artifact.id, artifact.filename)
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A personal API key or an [OAuth 2.0](/api-reference/oauth) access token.
        Personal API keys also require the `x-auth-key` header with your user
        ID.

````