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

# Read Workspace File

> Stream one file out of a session's workspace.

The body is piped chunk by chunk rather than read whole: the API
process is shared, so one large download must not be able to
exhaust it for everyone else.



## OpenAPI

````yaml /versions/2.0.6dev/en/deploy/openapi.json get /workspace/files
openapi: 3.1.0
info:
  title: AgentScope
  version: 2.0.6dev
servers: []
security: []
paths:
  /workspace/files:
    get:
      tags:
        - workspace
      summary: Read Workspace File
      description: |-
        Stream one file out of a session's workspace.

        The body is piped chunk by chunk rather than read whole: the API
        process is shared, so one large download must not be able to
        exhaust it for everyone else.
      operationId: read_workspace_file_workspace_files_get
      parameters:
        - name: agent_id
          in: query
          required: true
          schema:
            type: string
            title: Agent Id
        - name: session_id
          in: query
          required: true
          schema:
            type: string
            title: Session Id
        - name: path
          in: query
          required: true
          schema:
            type: string
            description: Absolute path, or one relative to the workspace root.
            title: Path
          description: Absolute path, or one relative to the workspace root.
        - name: download
          in: query
          required: false
          schema:
            type: boolean
            description: Force a Content-Disposition attachment.
            default: false
            title: Download
          description: Force a Content-Disposition attachment.
        - name: token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              A token from ``POST /workspace/files/download-token``, accepted in
              place of the ``X-User-ID`` header so a browser navigation can
              download the file directly.
            title: Token
          description: >-
            A token from ``POST /workspace/files/download-token``, accepted in
            place of the ``X-User-ID`` header so a browser navigation can
            download the file directly.
        - name: x-user-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-User-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````