Files
Manage tenant-scoped files that can be attached to agent runs. Upload files to your tenant store, then reference them when creating agents or running journeys to copy them into the agent workspace.
Overview
There are two file storage contexts. The tenant file store is a shared space where you upload files via the API. The agent workspace is a private sandbox that each agent gets for the duration of its execution. Files flow from the tenant store into agent workspaces, not the other way around.
To get files into an agent, upload them to the tenant store first, then reference their paths when creating an agent or running a journey. The system copies the referenced files into the agent's workspace before execution begins. Once in the workspace, the agent can read, write, and organize files freely. It can also download files from the web and upload files to form inputs on pages.
Limits
Individual file uploads are limited to 50 MB. Total tenant storage is subject to your plan's quota. Uploads that would exceed the quota are rejected with a 507 Insufficient Storage response.
List directory
Lists files and subdirectories at the given path within the tenant file store.
Parameters
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
path | string | query | No | Relative directory path to list (empty for root) |
Status Codes
| Code | Description |
|---|---|
200 | OK |
401 | Unauthorized |
Response Body
{
"files": [
{
"name": "report.pdf",
"path": "docs/reports/report.pdf",
"size": 102400,
"is_dir": false,
"updated_at": "2025-01-15T10:30:00Z"
},
{
"name": "images",
"path": "docs/reports/images",
"is_dir": true
}
]
}/api/v1/filesDownload file
Downloads a single file from the tenant file store. Returns the raw file content as application/octet-stream.
Parameters
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
path | string | query | Yes | Relative path of the file to download |
Status Codes
| Code | Description |
|---|---|
200 | File content (binary stream) |
400 | Missing path parameter |
401 | Unauthorized |
404 | File not found |
/api/v1/files/downloadUpload files
Upload one or more files via multipart/form-data. Files are placed under the specified path prefix. Max 50MB per file.
Parameters
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
path | string | body | No | Directory prefix to place files under |
files | file[] | body | Yes | One or more files (multipart form field name: 'files') |
Status Codes
| Code | Description |
|---|---|
200 | Files uploaded |
400 | No files provided |
401 | Unauthorized |
413 | File too large (max 50MB) |
507 | Storage quota exceeded |
Response Body
{
"uploaded": [
{
"path": "docs/report.pdf",
"size": 102400
}
]
}/api/v1/files/uploadDelete file
Deletes a single file from the tenant file store.
Parameters
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
path | string | query | Yes | Relative path of the file to delete |
Status Codes
| Code | Description |
|---|---|
204 | File deleted |
400 | Missing path parameter |
401 | Unauthorized |
/api/v1/filesMove or rename file
Moves or renames a file within the tenant file store.
Parameters
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
src_path | string | body | Yes | Current path of the file |
dst_path | string | body | Yes | New path for the file |
Status Codes
| Code | Description |
|---|---|
200 | File moved |
400 | Validation error |
401 | Unauthorized |
Response Body
{
"success": true
}/api/v1/files/moveCreate directory
Creates a new directory in the tenant file store.
Parameters
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
path | string | body | Yes | Path of the directory to create |
Status Codes
| Code | Description |
|---|---|
200 | Directory created |
400 | Validation error |
401 | Unauthorized |
Response Body
{
"success": true
}/api/v1/files/mkdir