Knowledge
Add File
Upload a document file to an agent’s knowledge base.
POST
Request
This endpoint usesmultipart/form-data for file uploads.
Form Fields
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | The agent’s public ID (ag_*) |
file | file | Yes | The file to upload |
Supported Formats
| Format | Extensions | Max Size |
|---|---|---|
.pdf | 50 MB | |
| Word | .docx, .doc | 50 MB |
| Text | .txt | 10 MB |
| Markdown | .md | 10 MB |
| CSV | .csv | 50 MB |
| Excel | .xlsx, .xls | 50 MB |
| JSON | .json | 10 MB |
cURL Example
Response 201
Errors
| Code | Description |
|---|---|
401 | Missing or invalid authentication |
404 | Agent not found |
413 | File too large |
415 | Unsupported file type |

