---
title: "Get Execution Files"
method: GET
path: "/agents/v2/executions/{executionId}/files"
tags: ["Files"]
---

# Get Execution Files

`GET /agents/v2/executions/{executionId}/files`

## Request

- Base URL: `https://odyssey.asteroid.ai`
- URL: `https://odyssey.asteroid.ai/agents/v2/executions/{executionId}/files`
- Auth: API key in header `X-Api-Key`

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

## Path parameters

- `executionId` string, uuid, required

## Response `200`

The request has succeeded.

- AgentsFilesAgentFilesResponse: Response containing all agent files for an execution, grouped by directory
  - `directories` AgentsFilesAgentFilesDirectoryListing, required: Files grouped by their agent directory
    - `debug` AgentsFilesAgentFile[]
      - `agentId` string, uuid, required
      - `createdAt` string, date-time, required
      - `createdBy` 'user' | 'agent' | 'environment' | 'system', required: Creator of the file
      - `directory` 'uploads' | 'downloads' | 'workspace' | 'shared' | 'debug' | 'tracing', required: Directory types within the agent filesystem
      - `downloadUrl` string, required
      - `executionId` string, uuid, required
      - `fileName` string, required
      - `filePath` string, required
      - `fileSize` integer, required
      - `id` string, uuid, required
      - `mimeType` string
      - `updatedAt` string, date-time, required
      - `workflowId` string, uuid, required
    - `downloads` AgentsFilesAgentFile[]
      - `agentId` string, uuid, required
      - `createdAt` string, date-time, required
      - `createdBy` 'user' | 'agent' | 'environment' | 'system', required: Creator of the file
      - `directory` 'uploads' | 'downloads' | 'workspace' | 'shared' | 'debug' | 'tracing', required: Directory types within the agent filesystem
      - `downloadUrl` string, required
      - `executionId` string, uuid, required
      - `fileName` string, required
      - `filePath` string, required
      - `fileSize` integer, required
      - `id` string, uuid, required
      - `mimeType` string
      - `updatedAt` string, date-time, required
      - `workflowId` string, uuid, required
    - `shared` AgentsFilesAgentFile[]
      - `agentId` string, uuid, required
      - `createdAt` string, date-time, required
      - `createdBy` 'user' | 'agent' | 'environment' | 'system', required: Creator of the file
      - `directory` 'uploads' | 'downloads' | 'workspace' | 'shared' | 'debug' | 'tracing', required: Directory types within the agent filesystem
      - `downloadUrl` string, required
      - `executionId` string, uuid, required
      - `fileName` string, required
      - `filePath` string, required
      - `fileSize` integer, required
      - `id` string, uuid, required
      - `mimeType` string
      - `updatedAt` string, date-time, required
      - `workflowId` string, uuid, required
    - `tracing` AgentsFilesAgentFile[]: Reserved for internal use.
      - `agentId` string, uuid, required
      - `createdAt` string, date-time, required
      - `createdBy` 'user' | 'agent' | 'environment' | 'system', required: Creator of the file
      - `directory` 'uploads' | 'downloads' | 'workspace' | 'shared' | 'debug' | 'tracing', required: Directory types within the agent filesystem
      - `downloadUrl` string, required
      - `executionId` string, uuid, required
      - `fileName` string, required
      - `filePath` string, required
      - `fileSize` integer, required
      - `id` string, uuid, required
      - `mimeType` string
      - `updatedAt` string, date-time, required
      - `workflowId` string, uuid, required
    - `uploads` AgentsFilesAgentFile[]
      - `agentId` string, uuid, required
      - `createdAt` string, date-time, required
      - `createdBy` 'user' | 'agent' | 'environment' | 'system', required: Creator of the file
      - `directory` 'uploads' | 'downloads' | 'workspace' | 'shared' | 'debug' | 'tracing', required: Directory types within the agent filesystem
      - `downloadUrl` string, required
      - `executionId` string, uuid, required
      - `fileName` string, required
      - `filePath` string, required
      - `fileSize` integer, required
      - `id` string, uuid, required
      - `mimeType` string
      - `updatedAt` string, date-time, required
      - `workflowId` string, uuid, required
    - `workspace` AgentsFilesAgentFile[]
      - `agentId` string, uuid, required
      - `createdAt` string, date-time, required
      - `createdBy` 'user' | 'agent' | 'environment' | 'system', required: Creator of the file
      - `directory` 'uploads' | 'downloads' | 'workspace' | 'shared' | 'debug' | 'tracing', required: Directory types within the agent filesystem
      - `downloadUrl` string, required
      - `executionId` string, uuid, required
      - `fileName` string, required
      - `filePath` string, required
      - `fileSize` integer, required
      - `id` string, uuid, required
      - `mimeType` string
      - `updatedAt` string, date-time, required
      - `workflowId` string, uuid, required
  - `lastUpdated` string, date-time

## Other responses

- `404`: The server cannot find the requested resource.

---

[API](https://skmtc.dev/asteroid/apis/agent-service.md) - [All operations](https://skmtc.dev/asteroid/apis/agent-service/llms.txt) - [OpenAPI document](https://skmtc.dev/asteroid/apis/agent-service/revisions/ccc134d1d510?raw)
