File

Updated at:

Files are standalone resources. Once uploaded, a file can be mounted into multiple session sandboxes for tools to read and write, or passed to the agent as message content (image, audio, attachment).

Quotas and status

  • Direct upload size limit per file: 10 MB. Workspace total capacity: 100 GB. Retention: 30 days; files past retention may be cleaned up automatically.
  • After upload, files go through security review. The status field takes the values checking / available / rejected / type_rejected. Only available files can be mounted into a session or referenced as message content.
  • When mounted into a session sandbox, the server makes an internal copy and generates a new file_id. The copy carries scope: {"type": "session", "id": "sesn_..."} in its metadata and is visible only to that session.

File operations

Operation

Endpoint

Description

Upload File

POST /files

Direct multipart/form-data upload; initial status is checking.

Get a file

GET /files/{file_id}

Query file metadata and review status (does not include content).

Download File

GET /files/{file_id}/content

Returns the raw binary stream of the file (only files with downloadable set to true can be downloaded).

List Files

GET /files

Paginated list of files in the workspace, with optional filtering by session ID.

Delete File

DELETE /files/{file_id}

Hard delete; internal copies already mounted into sessions are unaffected.