> ## 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.

# Delete Workflow Agent File

> Delete an agent file from a workflow version. This creates a new workflow version with the file removed and returns its id as workflowId; publish or execute that version for the removal to take effect.



## OpenAPI

````yaml https://odyssey.asteroid.ai/agents/v2/openapi.yaml delete /agents/{agentId}/workflows/{workflowId}/agent-files/{fileId}
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
  - name: Admin Customer Activity
paths:
  /agents/{agentId}/workflows/{workflowId}/agent-files/{fileId}:
    delete:
      tags:
        - Files
      summary: Delete Workflow Agent File
      description: >-
        Delete an agent file from a workflow version. This creates a new
        workflow version with the file removed and returns its id as workflowId;
        publish or execute that version for the removal to take effect.
      operationId: WorkflowAgentFilesDelete
      parameters:
        - in: path
          name: agentId
          required: true
          schema:
            $ref: '#/components/schemas/Common.uuid'
        - in: path
          name: workflowId
          required: true
          schema:
            $ref: '#/components/schemas/Common.uuid'
        - in: path
          name: fileId
          required: true
          schema:
            $ref: '#/components/schemas/Common.uuid'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Agents.Files.WorkflowAgentFileChangeResponse
          description: The request has succeeded.
        '404':
          content:
            text/plain:
              schema:
                enum:
                  - File not found.
                type: string
          description: The server cannot find the requested resource.
components:
  schemas:
    Common.uuid:
      format: uuid
      type: string
    Agents.Files.WorkflowAgentFileChangeResponse:
      description: >-
        Response after a workflow-scoped agent-file change. When the change
        created a new workflow version, workflowId is that new version; for
        legacy versions it is the version the change was applied to.
      properties:
        files:
          items:
            $ref: '#/components/schemas/Agents.Files.SharedFile'
          type: array
        workflowId:
          $ref: '#/components/schemas/Common.uuid'
      required:
        - workflowId
        - files
      type: object
    Agents.Files.SharedFile:
      description: A file in the agent's persistent shared storage
      properties:
        agentId:
          $ref: '#/components/schemas/Common.uuid'
        checksum:
          description: >-
            Hex-encoded SHA-256 of the file contents. Used for change and rename
            detection when diffing versions. Absent when the checksum is
            unknown.
          type: string
        createdAt:
          format: date-time
          type: string
        downloadUrl:
          format: uri
          type: string
        fileName:
          type: string
        filePath:
          type: string
        fileSize:
          format: int64
          type: integer
        id:
          $ref: '#/components/schemas/Common.uuid'
        isFrozen:
          type: boolean
        lastModifiedByExecutionId:
          $ref: '#/components/schemas/Common.uuid'
        mimeType:
          type: string
        updatedAt:
          format: date-time
          type: string
        version:
          type: integer
      required:
        - id
        - agentId
        - filePath
        - fileName
        - fileSize
        - createdAt
        - updatedAt
        - version
        - isFrozen
        - downloadUrl
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-Asteroid-Agents-Api-Key
      type: apiKey

````