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

# Get Execution Files

> Get all files for an execution, grouped by directory. Files are tracked by the file syncer daemon during execution.



## OpenAPI

````yaml https://odyssey.asteroid.ai/agents/v2/openapi.yaml get /executions/{executionId}/files
openapi: 3.1.0
info:
  title: Agent Service
  version: v1
servers:
  - description: V2 API
    url: https://odyssey.asteroid.ai/agents/v2
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
  - name: Execution
  - name: Files
  - name: Agent Profiles
  - name: Agent Profile Pools
  - name: Workflows
  - name: Schema
  - name: Documentation
  - name: Context
paths:
  /executions/{executionId}/files:
    get:
      tags:
        - Files
      summary: Get Execution Files
      description: >-
        Get all files for an execution, grouped by directory. Files are tracked
        by the file syncer daemon during execution.
      operationId: ExecutionFilesGet
      parameters:
        - in: path
          name: executionId
          required: true
          schema:
            $ref: '#/components/schemas/Common.uuid'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agents.Files.AgentFilesResponse'
          description: The request has succeeded.
        '404':
          content:
            text/plain:
              schema:
                enum:
                  - Execution not found.
                type: string
          description: The server cannot find the requested resource.
components:
  schemas:
    Common.uuid:
      format: uuid
      type: string
    Agents.Files.AgentFilesResponse:
      description: >-
        Response containing all agent files for an execution, grouped by
        directory
      properties:
        directories:
          $ref: '#/components/schemas/Agents.Files.AgentFilesDirectoryListing'
        lastUpdated:
          format: date-time
          type: string
      required:
        - directories
      type: object
    Agents.Files.AgentFilesDirectoryListing:
      description: Files grouped by their agent directory
      properties:
        debug:
          items:
            $ref: '#/components/schemas/Agents.Files.AgentFile'
          type: array
        downloads:
          items:
            $ref: '#/components/schemas/Agents.Files.AgentFile'
          type: array
        shared:
          items:
            $ref: '#/components/schemas/Agents.Files.AgentFile'
          type: array
        uploads:
          items:
            $ref: '#/components/schemas/Agents.Files.AgentFile'
          type: array
        workspace:
          items:
            $ref: '#/components/schemas/Agents.Files.AgentFile'
          type: array
      type: object
    Agents.Files.AgentFile:
      description: A file tracked in the agent filesystem
      properties:
        agentId:
          $ref: '#/components/schemas/Common.uuid'
        createdAt:
          format: date-time
          type: string
        createdBy:
          $ref: '#/components/schemas/Agents.Files.AgentFileCreatedBy'
        directory:
          $ref: '#/components/schemas/Agents.Files.AgentFileDirectory'
        downloadUrl:
          type: string
        executionId:
          $ref: '#/components/schemas/Common.uuid'
        fileName:
          type: string
        filePath:
          type: string
        fileSize:
          format: int64
          type: integer
        id:
          $ref: '#/components/schemas/Common.uuid'
        mimeType:
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - agentId
        - filePath
        - fileName
        - fileSize
        - createdAt
        - updatedAt
        - executionId
        - directory
        - createdBy
        - downloadUrl
      type: object
    Agents.Files.AgentFileCreatedBy:
      description: Creator of the file
      enum:
        - user
        - agent
        - environment
        - system
      type: string
    Agents.Files.AgentFileDirectory:
      description: Directory types within the agent filesystem
      enum:
        - uploads
        - downloads
        - workspace
        - shared
        - debug
      type: string
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-Asteroid-Agents-Api-Key
      type: apiKey

````