Agent Filesystem
Every agent has a persistent workspace. The filesystem API gives you full programmatic access to read, write, search, and organize files within any agent’s workspace. All filesystem endpoints follow the pattern:/v1/agent/{agentId}/filesystem/...
Endpoints
File Operations
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/agent/{id}/filesystem/files/{path} | Read a file |
POST | /v1/agent/{id}/filesystem/files/{path} | Create a file |
PUT | /v1/agent/{id}/filesystem/files/{path} | Update a file |
DELETE | /v1/agent/{id}/filesystem/files/{path} | Delete a file |
PATCH | /v1/agent/{id}/filesystem/files/{path} | Patch a file (append, prepend, insert, replace) |
Directory Operations
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/agent/{id}/filesystem/directories/{path} | List directory contents |
POST | /v1/agent/{id}/filesystem/directories/{path} | Create a directory |
DELETE | /v1/agent/{id}/filesystem/directories/{path} | Delete a directory |
Bulk Operations
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/agent/{id}/filesystem/copy | Copy files or directories |
POST | /v1/agent/{id}/filesystem/move | Move or rename files |
POST | /v1/agent/{id}/filesystem/search | Search by filename or content |
Metadata
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/agent/{id}/filesystem/metadata/{path} | Get file metadata |
PATCH | /v1/agent/{id}/filesystem/metadata/{path} | Update file metadata |
Archives
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/agent/{id}/filesystem/archive | Create an archive |
POST | /v1/agent/{id}/filesystem/extract | Extract an archive |

