Read File
Agent Filesystem
Read File
Read the contents of a file from an agent’s workspace.
GET
Read File
Authentication
Requires JWT token or Platform API key.Agent UUID
File path within the agent workspace (wildcard segment)
Response encoding (
utf-8 or base64)Return the file as a binary download
Example Request
Response
For text files, you receive a JSON object with the file content:download=true, the response is a raw binary stream with the appropriate Content-Type header.
Response Fields
| Field | Type | Description |
|---|---|---|
path | string | Absolute path of the file in the workspace |
content | string | File content in the requested encoding |
encoding | string | Encoding used for the content (utf-8 or base64) |
size | number | File size in bytes |
mime_type | string | Detected MIME type of the file |
Status Codes
| Code | Description |
|---|---|
200 | File content returned successfully |
401 | Invalid authentication |
403 | Access denied |
404 | Agent or file not found |

