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

# Download a file from a sandbox

> Download a file produced by an agent inside a sandbox.



## OpenAPI

````yaml /gateway-agent-harness-openapi.json get /v1/agents/sandbox/{sandboxId}/file
openapi: 3.1.0
info:
  title: TrueFoundry Agent Harness
  description: Stateful agent execution API.
  version: 0.1.0
servers:
  - url: '{scheme}://{gatewayBaseURL}/{tenantName}'
    variables:
      scheme:
        default: https
        enum:
          - http
          - https
      gatewayBaseURL:
        default: gateway.truefoundry.ai
        description: Gateway host. Override for self-hosted deployments.
      tenantName:
        default: truefoundry
        description: Tenant identifier
    description: Gateway base URL (per-tenant)
security:
  - AuthorizationBearer: []
paths:
  /v1/agents/sandbox/{sandboxId}/file:
    get:
      tags:
        - Agent Harness
      summary: Download a file from a sandbox
      description: Download a file produced by an agent inside a sandbox.
      parameters:
        - schema:
            type: string
            minLength: 1
            description: The sandbox containing the file.
          required: true
          description: The sandbox containing the file.
          name: sandboxId
          in: path
        - schema:
            type: string
            minLength: 1
            description: Absolute path of the file inside the sandbox.
          required: true
          description: Absolute path of the file inside the sandbox.
          name: path
          in: query
      responses:
        '200':
          description: File download.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: Invalid path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
        '403':
          description: Sandbox does not belong to this tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
        '404':
          description: File not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
        '410':
          description: Sandbox no longer available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
        '412':
          description: Sandbox is not configured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
        '413':
          description: File too large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
        '502':
          description: Sandbox infrastructure error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
components:
  schemas:
    RequestErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type:
                - string
                - 'null'
            param:
              type:
                - string
                - 'null'
          required:
            - message
      required:
        - error
  securitySchemes:
    AuthorizationBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````